Skip to content

fix(native-sidecar): stop stranding child process.fd_read on mapped fds#1814

Open
NathanFlurry wants to merge 1 commit into
stack/fix-native-sidecar-close-maxfilesystembytes-gaps-on-host-backed-writes-tksxsmytfrom
stack/fix-native-sidecar-stop-stranding-child-process-fd_read-on-mapped-fds-qrmuouks
Open

fix(native-sidecar): stop stranding child process.fd_read on mapped fds#1814
NathanFlurry wants to merge 1 commit into
stack/fix-native-sidecar-close-maxfilesystembytes-gaps-on-host-backed-writes-tksxsmytfrom
stack/fix-native-sidecar-stop-stranding-child-process-fd_read-on-mapped-fds-qrmuouks

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Last instance of the class fixed in the mapped-host-fd work: a guest-supplied
fd was stat'ed against the kernel fd table with a bare ?, but mapped host
fds live in the per-process map. The resulting EBADF escapes to the
process-event pump and strands the in-flight sync RPC, so the guest blocks
until the ~31s bridge deadline. The sibling process.fd_write arm already
converted its errors into a delivered RPC error; this one did not.

Adds the regression test the class never had. crash_isolation.rs previously
covered only a guest THROWING, which never reaches the sidecar's own error
paths and so could not catch either production failure. The new phase drives
a host-backed write beside a peer VM and asserts both properties:

  • it completes within the collector's deadline (catches the 31s hang; a test
    that only checked eventual success would pass while hanging, which is
    exactly how that failure went unnoticed), and
  • the peer VM still executes afterwards (catches the cross-tenant crash).

Verified by negative control that the new phase actually executes rather
than silently passing.

Last instance of the class fixed in the mapped-host-fd work: a guest-supplied
fd was stat'ed against the kernel fd table with a bare `?`, but mapped host
fds live in the per-process map. The resulting EBADF escapes to the
process-event pump and strands the in-flight sync RPC, so the guest blocks
until the ~31s bridge deadline. The sibling process.fd_write arm already
converted its errors into a delivered RPC error; this one did not.

Adds the regression test the class never had. crash_isolation.rs previously
covered only a guest THROWING, which never reaches the sidecar's own error
paths and so could not catch either production failure. The new phase drives
a host-backed write beside a peer VM and asserts both properties:

- it completes within the collector's deadline (catches the 31s hang; a test
  that only checked eventual success would pass while hanging, which is
  exactly how that failure went unnoticed), and
- the peer VM still executes afterwards (catches the cross-tenant crash).

Verified by negative control that the new phase actually executes rather
than silently passing.
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