Skip to content

Slow-writer exit test proves the stderr exit fence delivers the terminal line - #1033

Merged
github-merge-queue[bot] merged 2 commits into
mainfrom
land/stderr-exit-hold-test
Oct 27, 2026
Merged

github-merge-queue[bot] merged 2 commits into
mainfrom
land/stderr-exit-hold-test

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 27, 2026

Copy link
Copy Markdown

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.

ualtinok and others added 2 commits October 27, 2026 07:05
…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>
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
@ualtinok
ualtinok removed this pull request from the merge queue due to a manual request Oct 27, 2026
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
@ualtinok
ualtinok removed this pull request from the merge queue due to a manual request Oct 27, 2026
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
@ualtinok
ualtinok removed this pull request from the merge queue due to a manual request Oct 27, 2026
@github-merge-queue
github-merge-queue Bot merged commit 322e0f0 into main Oct 27, 2026
90 checks passed
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