Skip to content

fix(ci): live-session cleanup + keyed-exec retries on v4 - #300

Merged
ZhiXiao-Lin merged 9 commits into
mainfrom
fix/live-session-cleanup-on-v4
Sep 11, 2026
Merged

ZhiXiao-Lin merged 9 commits into
mainfrom
fix/live-session-cleanup-on-v4

Conversation

@ZhiXiao-Lin

Copy link
Copy Markdown

Summary

Test plan

  • Format / Clippy green
  • SDK Local Sandbox x86_64: live-session v4 + Verify cleanup pass
  • SDK Local Sandbox aarch64: live-session v4 + Verify cleanup pass
  • Download both arch reports and run scripts/verify-linux-native-live-session-report.py
  • Confirm report: retained_stream_handle_proven + retained_filesystem_proven true; B2/fixture/utility false

@ZhiXiao-Lin

Copy link
Copy Markdown
Author

Rebased onto main after #301 (KVM Live filesystem v2) so cleanup/retry lands cleanly on the current tip.

@ZhiXiao-Lin
ZhiXiao-Lin force-pushed the fix/live-session-cleanup-on-v4 branch from 816c6a0 to 8fe4dc4 Compare September 10, 2026 16:27
ZhiXiao-Lin and others added 7 commits September 11, 2026 06:34
Port the post-#297 honesty fixes onto main after Native Live filesystem v4:
tear down live-session host owners and elevate leftovers in Verify cleanup,
and retry keyed captured exec Unavailable with distinct request ids.

Co-authored-by: Cursor <[email protected]>
Unblock Format on the cleanup/retry PR; includes main's KVM example
rustfmt debt that cargo fmt --check already fails on.

Co-authored-by: Cursor <[email protected]>
Main lost 100755 after filesystem merges; Sandbox failed closed with
missing executable elevate-linux-sandbox-owner.sh before the v4 gate ran.

Co-authored-by: Cursor <[email protected]>
Filesystem merge elevated the whole example and dropped probe-cgroup migrate,
staged launcher, and $ORIGIN/lib. That fails closed on cgroup v2 delegation.
Restore the greened #297 harness path while keeping the v4 filesystem gate.

Co-authored-by: Cursor <[email protected]>
@ZhiXiao-Lin
ZhiXiao-Lin force-pushed the fix/live-session-cleanup-on-v4 branch from a15a1d8 to 535a2ef Compare September 10, 2026 22:35
@ZhiXiao-Lin

Copy link
Copy Markdown
Author

Root cause on tip a15a1d86: both arches failed with honest cgroup v2 delegation … lacks controllers: cpu, memory, pids — not a timeout/schema cheat.

The filesystem v4 merge had replaced the greened #297 harness (run-linux-sandbox-ci matched creds + probe migrate + staged launcher/lib) with elevating the whole example via elevate-linux-sandbox-owner.sh.

Restored that harness on tip after rebase onto main (#303 OCI pin). New CI should exercise the real v4 gate again.

Orphan {id}.retry-N process journals left active_operation claims that
blocked generation delete after Live reopen. Same-key retries reconcile
the partial prepare-exec journal instead. Also disarm the exec timeout
watchdog when Exit is observed.

Co-authored-by: Cursor <[email protected]>
@ZhiXiao-Lin

Copy link
Copy Markdown
Author

Root cause (first principles)

x86 v4 report failed at generation delete with process
…exec-process-4bd8b169… owned by an active_operation (0 active I/O).

That process id hashes to
a3s.box.live-session.keyed-exec.after-reopen.retry-2.

Keyed-exec retries were minting {id}.retry-N request ids after a retryable
Unavailable. The first attempt left a durable process journal with an
active_operation claim; the successful retry used a different process id,
so the orphan claim blocked prepare-delete.

Fix (8e050c96)

  • Retry keyed captured exec with the same request_id so prepare-exec
    reconciles the partial journal (no orphan keys).
  • Disarm the detached OCI exec timeout watchdog when Exit is observed.

Not overfit: no timeout widening, no schema weakening, no Force-delete bypass.

@ZhiXiao-Lin
ZhiXiao-Lin merged commit d07648d into main Sep 11, 2026
14 checks passed
@ZhiXiao-Lin
ZhiXiao-Lin deleted the fix/live-session-cleanup-on-v4 branch September 11, 2026 00:21
ZhiXiao-Lin added a commit that referenced this pull request Sep 11, 2026
ZhiXiao-Lin added a commit that referenced this pull request Sep 11, 2026
* fix(live-session): same-request_id keyed-exec retry on KVM

Port Native #300 Unavailable retries to the KVM harness so partial
prepare-exec journals reconcile instead of orphaning active_operation
claims. Disarm the exec timeout watchdog when wait_process observes a
terminal status, and CI-enforce script +x plus retry-identity parity.

Co-authored-by: Cursor <[email protected]>

* fix(oci_session): preserve TIMED_OUT when disarming watchdog

Only compare-exchange WAITING to FINISHED so timeout kills still publish
the legacy stderr notice expected by captured_exec_timeout tests.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant