Repository navigation
fix(agent-init): write each stderr line with a single write - #298
Merged
Merged
Conversation
std's eprintln! issues one write(2) per format piece, so two apps' agent-init sharing a stderr interleave mid-line. That is what made the Multi-App Sandbox Milestone check fail about one run in three. Shadow eprintln! crate-wide with a version that formats first and writes once.
Points both rootfs manifests' agent_init_commit at the fix, which also carries main's dependency bumps, and takes the context-bus and semantic-fs pins from the update_pins runs 40197044617 and 40197047050. The agent-init, rootfs and layer hashes follow from a re-pin run.
From update_pins runs 40198606357 (aarch64) and 40198603422 (x86_64): new agent-init and rootfs hashes in both manifests, the matching rootfs pins in the CLI, and the release names in the docs.
berth-vmm compiles the kernel and rootfs pins in, so the re-pin needs new binaries for all three platforms. Run 40200731376 built them, rebuilt both rootfs images to their pins, and passed the x86_64 e2e. libkrun is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Multi-App Sandbox Milestone check has been failing about one run in three, on main as well as on PRs. The cause is agent-init's logging. std's
eprintln!does one write(2) per piece of the format string, so when two apps' agent-init share a stderr their lines get spliced together mid-line, and the test sees one "restricted" line where it expects two.This shadows
eprintln!across the crate with a version that formats the whole line first and writes it once. A single write under PIPE_BUF to a pipe is atomic, so lines stay whole. No call sites change.Checked with
cargo clippy --all-targetsfor aarch64 Linux (clean). The VM rootfs re-pin that picks this up follows in this branch.