Repository navigation
Fix race in forked tests under heavy load (rt#92200) - #7
Merged
Merged
Conversation
plicease
force-pushed
the
graham/rt-92200-forked2-race
branch
from
October 6, 2026 09:03
bc5f6e1 to
f48cd57
Compare
The parent may see the connect event for a new connection before the eof event for the previous one. On the last test group the connect handler empties @tests first, so the eof handler exits early and the child dies with SIGPIPE / connection reset. Have the child wait for the parent's eof sync ("e") before opening the next connection, and send "e" before exiting on the final connection so the child does not read from a closed pipe. Patch by Niko Tyni. Bug: https://rt.cpan.org/Ticket/Display.html?id=92200 Bug-Debian: https://bugs.debian.org/730908 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plicease
force-pushed
the
graham/rt-92200-forked2-race
branch
from
October 6, 2026 09:16
f48cd57 to
a9376bf
Compare
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.
Fixes the intermittent
t/forked2.tfailure reported in rt#92200 / Debian #730908.Cause
Under load, the parent can see the connect event for a new connection before the eof event for the previous one. On the last test group
ie_connectionempties@testsfirst, thenie_eofthinks testing is done and exits. The child gets SIGPIPE / connection reset (planned 115 tests but ran 111).Fix
esync after closing each socket, before opening the next connection (patch by Niko Tyni, attached to the RT ticket).ebeforeexit 0 unless @tests, so the child's lastsyncto("e")doesn't read from a closed pipe (which otherwise emits an uninitialized-value warning).Testing
prove -l tpasses exceptt/getline3.t, which fails identically onmain(unrelated, AnyEvent pure-Perl loop).🤖 Generated with Claude Code