Skip to content

fix(native-sidecar): close remaining guest-reachable fatal paths#1811

Open
NathanFlurry wants to merge 1 commit into
stack/fix-runtime-core-bound-retained-sidecar-stderr-and-always-forward-it-sunnqwnxfrom
stack/fix-native-sidecar-close-remaining-guest-reachable-fatal-paths-ukzxvruw
Open

fix(native-sidecar): close remaining guest-reachable fatal paths#1811
NathanFlurry wants to merge 1 commit into
stack/fix-runtime-core-bound-retained-sidecar-stderr-and-always-forward-it-sunnqwnxfrom
stack/fix-native-sidecar-close-remaining-guest-reachable-fatal-paths-ukzxvruw

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Review found the cross-tenant crash was narrowed, not closed:

  • stdio.rs: the event_ready branch called poll_event_wire(..).await? with no
    guard, and that reaches the SAME process-event pump the notify branch
    guards. Both run in one select!, so whether a guest errno killed every
    co-located VM came down to scheduling. Isolate per session here too.

  • launch.rs: only the shadow-sync write arm tolerated a guest hitting its own
    budget. mkdir (charged against maxInodeCount) and symlink (charged against
    both bytes and inodes) still returned a fatal InvalidState, so a guest
    exhausting its inode limit could still kill the shared sidecar.

Also narrows the tolerated set to ENOSPC only. EDQUOT/EFBIG were dead matches
that nothing on this path constructs, and they signal HOST disk exhaustion —
a real fault that must keep failing loudly, not be downgraded to a skip.

Known gap recorded in the helper doc comment: skipping leaves the shadow copy
and the kernel VFS divergent without telling the guest. The correct end state
is to fail THIS VM with a typed ENOSPC rather than skip the entry.

Review found the cross-tenant crash was narrowed, not closed:

- stdio.rs: the event_ready branch called poll_event_wire(..).await? with no
  guard, and that reaches the SAME process-event pump the notify branch
  guards. Both run in one select!, so whether a guest errno killed every
  co-located VM came down to scheduling. Isolate per session here too.

- launch.rs: only the shadow-sync write arm tolerated a guest hitting its own
  budget. mkdir (charged against maxInodeCount) and symlink (charged against
  both bytes and inodes) still returned a fatal InvalidState, so a guest
  exhausting its inode limit could still kill the shared sidecar.

Also narrows the tolerated set to ENOSPC only. EDQUOT/EFBIG were dead matches
that nothing on this path constructs, and they signal HOST disk exhaustion —
a real fault that must keep failing loudly, not be downgraded to a skip.

Known gap recorded in the helper doc comment: skipping leaves the shadow copy
and the kernel VFS divergent without telling the guest. The correct end state
is to fail THIS VM with a typed ENOSPC rather than skip the entry.
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