Repository navigation
Check receipt timeouts after the job loop - #102
Open
jamiecounsell wants to merge 1 commit into
Open
jamiecounsell wants to merge 1 commit into
jamiecounsell wants to merge 1 commit into
Conversation
Owner
|
Thanks for tracking this down. A timeout callback that sends and then blocks on Two things before this can go further:
If the link watchdog changes stay in #101, it would also help to say how they were checked against Python RNS (keepalive and stale-link behaviour over LoRa or |
Transport::jobs() checked receipt timeouts inside its job loop, while _jobs_running was set. A timeout callback that sends, such as a retry, reaches Transport::outbound(), which waits for _jobs_running to clear. The loop never finished, so the node hung until a hardware watchdog reset it. The receipt check now runs after the loop, after the resource watchdogs, the same way those were moved. It still runs only on a pass where the jobs ran (not while they were locked), on the same interval. test_receipt_timeout_callback_can_send sends from a timeout handler. Without this change, jobs() never returns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbF8zYqrDkMpUrin37AMCv
jamiecounsell
force-pushed
the
receipt-timeout-after-jobs
branch
from
November 15, 2026 15:52
1e37e64 to
93d9ebf
Compare
Contributor
Author
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.
Problem
Receipt timeouts were checked inside the job loop. A timeout callback that sends (e.g. a retry) never returned, because
Transport::outbound()waits for the job loop to finish.Solution
Move the receipt check after the job loop, after
_jobs_runningis cleared, next to the resource watchdogs (which were moved there for the same reason). It still runs only on a pass where the jobs ran.Compatibility
Packet.pyL542-L545), so a send from it doesn't block the loop. Running the callback after the loop is the closest a single thread gets.)RNS_*preprocessor guard (off by default) (none)Testing
test_transportgainstest_receipt_timeout_callback_can_send: a timeout handler sends a retry, andReticulum::loop()must return. It runs the loop on a worker thread with a 10 s deadline, so without this change it fails with a message instead of hanging the suite (checked: it fails onmasterand passes with this change).Tested with:
wiscore_rak4631.test_interop/): not applicable, no wire changeNot tested on macOS (no machine). Left CI to build the embedded targets.