[BUG] Launch resolution exhausts Vfsd's process stack #33
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/vfsd#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Launch-artifact resolution can exhaust Vfsd's 256 KiB process stack. The initial shell then fails to commit after the foundation services start. Large component return values and nested description buffers consume too much stack.
Reproduction
Run Integration's existing
appliance-disk-image-exact-selector-race-negative.tomlscenario with the source selections below. The original workflow faults during initial-shell resolution.The component regression proposed in #3 resolves both an executable and its manifest sidecar, exports the complete physical report, and retires the original objects. Its fixture storage is allocated before entering a 256 KiB thread:
With only that regression added, the original production code overflows. The repair passes the identical test in debug and optimized PIC builds.
Expected and actual behavior
Launch resolution should preserve complete names and retire provider state within the existing stack allocation. The original guest instead faults in Vfsd and reports
INITIAL_EXSH:REJECTED:COMMIT,RESULT_NOT_FOUND, and startup stage0x155. The independent host reproduction aborts with a stack-overflow diagnostic.Environment and identity
2df8f7b9d2fe189a9b1f304bd90e3ecab31419d8through Integrationb0cea358d53451a9991154e094b702b13afd5273.ad936bf56c22590410f3fa8e2c0eb83fe61301c0has identical Rust and Cargo source.x86_64-unknown-none, releasevfsd-runtime, three mounts and 64 handle rows.1.90.0-nightly (430d6eddf), LLVM20.1.8.Evidence and prior checks
The original Integration workflow retains the guest failure. The original and repaired host tests use the same stack size, full-name assertions and cleanup checks. All 516 component tests pass with the repair.
The existing provider-read frame gate covers a different call chain. Repaired guest confirmation and a separate launch-frame audit remain open.
Tracking
Implementation PR · Phase tracking
Preserve the 256 KiB allocation, complete component/path capacity, arena admissions and provider retirement rules.
The repair is published and selected by Integration. It reuses one component buffer and copies description fragments directly into admitted rows, preserving complete names and the 256 KiB stack allocation.
The original host regression overflows; the same repaired debug and optimized PIC controls pass. All 518 component tests and the original component workflow pass. Repaired guest confirmation and the launch-frame audit remain open.
The repaired Integration run still fails during initial shell materialization. The component regression covered launch resolution, but it did not execute the complete native file-read and reply path.
Source review found large inline read buffers returned through several calls, followed by another full response buffer. Work is underway to replace those copies with caller-owned output throughout the exact-object read path and add a regression that covers it. The existing wire bytes, provider custody and 256 KiB stack budget remain required. The issue stays open.
The second read-path repair is published in 367a1c1e. Reads now fill caller-owned output and return scalar progress; provider and clock requests share one exclusively held packet. The fixed-stack controls and 540 component cases pass. Guest confirmation and the launch-frame audit remain open. The new component workflow stops before Cargo on a separate dependency mismatch, which is being repaired from suppliers upward.
Published
fe7b078a: launch-path reports now copy the counted parent and basename directly into independent description rows, keeping both original keys live until composition finishes. Component parsing borrows its caller-owned buffer. With the same local Rust 1.97.1 runtime build, the nine-function stack bound falls from 271,168 to 238,528 bytes, chiefly from removing the flattened basename. This is a static bound; the failing CI guest still needs checking on the updated graph.