Repository navigation
indy: make a stalled replication join name the loop it is waiting for (#564) - #568
Merged
Merged
Conversation
…#564) GracefulShutdownUnresponsiveSlave wedges on aarch64 about one CI run in eighteen. The wedge is in JoinReplicationServices(), which pops a blocking semaphore once per replication loop that started -- so one loop that never returns hangs shutdown forever, silently. The only syslog between the connection drain and "TServer::Shutdown() complete" is the drain's own deadline warning, so from the log a wedge here is indistinguishable from a wedge anywhere else in Shutdown(), and the process is dead by the time anyone reads CI. 83 attempts across four harnesses failed to reproduce it locally or on demand in CI, so waiting for a reproduction is not a plan. Make the first natural occurrence diagnose itself instead. Each loop now sets a bit on entry and clears it on exit, alongside the existing started-count and Exited push -- one RAII latch doing all three, so every exit path stays covered including the exceptional ones the loops rely on. The join polls the semaphore's fd rather than blocking on it outright, and every 15s of no progress logs which loops have still not returned. The wait stays unbounded on purpose. The teardown that follows frees the very fds and collections a still-parked loop references (#440); giving up would trade a hang for a use-after-free. Nothing about the shutdown contract changes -- this only removes the silence. Verified by injecting a 35s stall into RunReplicationWork: the report fires at 15s and 30s naming [RunReplicationWork], shutdown still completes afterwards, and the fixture still passes 2/2. Without the injection there are no warnings at all and both fixtures pass, so a healthy shutdown stays quiet.
This was referenced Sep 18, 2026
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.
indy: make a stalled replication join name the loop it is waiting for (#564)
GracefulShutdownUnresponsiveSlave wedges on aarch64 about one CI run in
eighteen. The wedge is in JoinReplicationServices(), which pops a blocking
semaphore once per replication loop that started -- so one loop that never
returns hangs shutdown forever, silently. The only syslog between the
connection drain and "TServer::Shutdown() complete" is the drain's own
deadline warning, so from the log a wedge here is indistinguishable from a
wedge anywhere else in Shutdown(), and the process is dead by the time anyone
reads CI.
83 attempts across four harnesses failed to reproduce it locally or on demand
in CI, so waiting for a reproduction is not a plan. Make the first natural
occurrence diagnose itself instead.
Each loop now sets a bit on entry and clears it on exit, alongside the
existing started-count and Exited push -- one RAII latch doing all three, so
every exit path stays covered including the exceptional ones the loops rely
on. The join polls the semaphore's fd rather than blocking on it outright,
and every 15s of no progress logs which loops have still not returned.
The wait stays unbounded on purpose. The teardown that follows frees the very
fds and collections a still-parked loop references (#440); giving up would
trade a hang for a use-after-free. Nothing about the shutdown contract
changes -- this only removes the silence.
Verified by injecting a 35s stall into RunReplicationWork: the report fires at
15s and 30s naming [RunReplicationWork], shutdown still completes afterwards,
and the fixture still passes 2/2. Without the injection there are no warnings
at all and both fixtures pass, so a healthy shutdown stays quiet.