Repository navigation
fix(runtime): retry signal_main once on ambiguous ACK loss - #323
Merged
Merged
Conversation
Guest may have applied kill(main) before the ACK was lost; treat write/ACK timeout/closed as ambiguous and retry once on a fresh stream. Connect failures stay Ok(false) with no retry. Signal delivery is naturally idempotent — avoids false-negative force-kills without request ids or B2 flips.
Holding only the reader open left the write half alive, so the client waited the full ACK timeout instead of seeing a closed stream.
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.
Summary
ExecClient::signal_maintreats write/ACK timeout/closed/bad-frame as Ambiguous and retries once on a fresh stream; connect failures stayOk(false)with no retry.signal_main_retries_once_after_lost_ackproves lost ACK recovers via one retry; fixture closes both stream halves so the client sees closed-without-ACK (not the 10s timeout).Honesty
spawn_main(not idempotent without observe-before-retry).b2_process_session_recovery_closed.Test plan
cargo test -p a3s-box-runtime --features vm --lib signal_main(WSL): 3 passedcargo test -p a3s-box-runtime --features vm --lib keyed_exec(WSL): 3 passedEOF