Skip to content

Guard pending fork transitions and verify cleanup ownership - #604

Closed
yummybomb wants to merge 1 commit into
hypeship/recover-interrupted-forksfrom
hypeship/fork-recovery-guards
Closed

yummybomb wants to merge 1 commit into
hypeship/recover-interrupted-forksfrom
hypeship/fork-recovery-guards

Conversation

@yummybomb

@yummybomb yummybomb commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #555. This targets its branch so the diff contains only the fixes.

  • On macOS, resolve the shim by its process name and configured control socket, even if the recorded hypervisor PID still exists. If ownership is ambiguous, return an error rather than signal the recorded PID or tear down its guest.
  • Reject public start and restore requests for any pending fork before resuming, clearing restart state, or returning an already-running guest. Restart and health policy also leave pending forks to their creator. The fork operation can still perform its own transitions.
  • Ignore metadata naming another guest during macOS identity, address, and MAC admission checks. Missing/invalid IDs and undecodable records still fail admission.
  • Stop an unbind if the driver override cannot be cleared. Verify the driver binding after the probe; retain the pending fork's device attachment if the device rebound or the binding cannot be read.

Verification

The Linux API build, vet for the changed packages, device and restart-policy package tests, and targeted instance and shim matching tests passed. The new platform-independent regressions also passed with -race. Native Darwin teardown is covered by a Darwin-only regression; it was not run locally. The VFIO tests use a test binder rather than a physical device.

One unrelated hypervisor test (TestSocketCacheKeyChangesWhenSocketIsRecreated) fails locally because the socket inode is immediately reused. The same test failed on the unchanged #555 head; the rest of that package passed.

CI run: both Linux and macOS stopped at the Docker Hub login step before tests ran. Rerun after CI authentication is restored.

@yummybomb yummybomb closed this Nov 23, 2026
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