Repository navigation
Slow-writer exit test proves the stderr exit fence delivers the terminal line - #1033
Merged
Merged
Conversation
…the stderr fence subc_drain_with_slow_writer_persists_terminal_line read its phase=log_flush_done flushed=false line from module stderr, which in subc mode is an asynchronous best-effort mirror. main returned right after queueing that line and the terminal marker, and nothing waited for the mirror thread, so on a busy runner both lines were lost (merge-queue run 40451058606). The previous commit adds the bounded stderr exit fence. Add a debug-only AFT_TEST_STDERR_EXIT_HOLD hook that parks the mirror worker from the end of the durable flush until the stderr exit fence starts, and set it in the slow-writer test. Without the fence the test now loses both lines every run; with it they are delivered. The test also requires the terminal marker on stderr, not only in the durable file. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 2904e56ed1b42577f4a11115b12fe0ecaf9355b6)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
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.
Test-only follow-up to #984. subc_drain_with_slow_writer_persists_terminal_line ejected #1021's merge-queue group (Linux, job 122018892824): the module exited before its stderr mirror wrote the exit's last lines. #984 added the product fix (a bounded stderr exit fence). This adds a debug-only hold (AFT_TEST_STDERR_EXIT_HOLD) that keeps the stderr mirror from writing until the fence starts, so the test proves the fence delivers the lines rather than depending on the mirror thread being scheduled first, and asserts the process_exit marker reaches stderr. Release builds ignore the hold.
Build server: logging::stderr_mirror tests 6 passed; the slow-writer integration test passed.