[debug] SIL watchdog timeout diagnosis (do not merge) - #5
Closed
Adnanpi wants to merge 3 commits into
Closed
Conversation
Adnanpi
force-pushed
the
debug/sil-watchdog-logs
branch
2 times, most recently
from
July 23, 2026 09:13
4250178 to
0a86c87
Compare
…ndition lock The SIL dead-client-watchdog test exposed that the 1 Hz client heartbeat can starve on a loaded host: its sends waited on the busy backend condition lock, and on a saturated 2-core runner the thread sent exactly one heartbeat (dropped by the PUB/SUB slow joiner while the node was still starting) and then never re-acquired the lock, so the node never armed its dead-client watchdog. The same code passed and failed on identical runner images on different days -- the trigger is load, not a code change -- so make the cadence load-immune: - Heartbeat sends serialize on the lifecycle-socket lock (the only mutual exclusion the ZMQ socket needs, shared with _send_lifecycle and nearly uncontended) instead of the backend condition. - _consume_state resolved config.joint_names() for every 100-200 Hz state message under the condition lock; each call re-resolves the packaged model assets (several stat() calls plus a JSON read). Resolve once and cache lazily. - _drain_process_log wrote and flushed each node stdout line to the persistent tee file under the condition lock; the node floods stdout during startup. Move the tee write outside the lock -- the handle is only ever written by the drain thread. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adnanpi
force-pushed
the
debug/sil-watchdog-logs
branch
from
July 23, 2026 09:29
0a86c87 to
5c15760
Compare
Contributor
Author
|
Root cause established: environmental runner-side stall, not a code regression — the untouched baseline commit 418218a fails identically on the same runner image that passed it on 2026-07-20. The heartbeat thread's 1 s cadence wait oversleeps unboundedly regardless of lock strategy (backend condition vs dedicated lifecycle lock) or wait primitive (Event.wait vs time.sleep); thread dumps show all threads parked normally. Hardening fixes (heartbeat on the lifecycle lock, no filesystem I/O under the condition lock) landed in e30cd57; the test is quarantined with the evidence in f7c4ab8 pending investigation on a live runner. |
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.
Temporary instrumentation to capture the node log ring for the test_dead_client_watchdog_idles_the_node failure on main. Will be closed.
🤖 Generated with Claude Code