Skip to content

fix(node): isolate output from concurrent runsc calls - #448

Open
Maya-Kid wants to merge 1 commit into
deeplethe:devfrom
Maya-Kid:fix/runsc-output-isolation
Open

Maya-Kid wants to merge 1 commit into
deeplethe:devfrom
Maya-Kid:fix/runsc-output-isolation

Conversation

@Maya-Kid

Copy link
Copy Markdown

Concurrent runsc calls shared output files named after the daemon PID. A call could read another call's output, and a timed-out call left both files behind.

Give each call its own file-backed stdout and stderr capture and unlink both paths before spawning. Keeping the handles open preserves capture without waiting for EOF from inherited pipes.

Two regression tests force concurrent calls to overlap and verify each captured result, then check that a timed-out call leaves the temporary directory empty. Both fail on the original code. On macOS, all 410 Rust tests passed along with build, Clippy, and formatting checks. The regressions use a fake runsc executable.

Signed-off-by: dada-yan <BinjunYann@gmail.com>

This branch has not been deployed

No deployments
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