fix(radio_planner): exempt UNLOCK_RADIO_ACCESS from the failsafe panic - #1
Open
Mikefly123 wants to merge 1 commit into
Open
fix(radio_planner): exempt UNLOCK_RADIO_ACCESS from the failsafe panic#1Mikefly123 wants to merge 1 commit into
Mikefly123 wants to merge 1 commit into
Conversation
The rp_callback() failsafe panics/reboots any task that has been RUNNING for more than 128 s, with an explicit exemption for RP_TASK_TYPE_LOCK_RADIO_ACCESS so a client holding the radio lock open indefinitely doesn't trip it. RP_TASK_TYPE_UNLOCK_RADIO_ACCESS was missing the same exemption. A lock task held open longer than the failsafe window (e.g. continuous RX under the raw RAC) keeps its original start_time_ms. When the client releases the lock, unlock_radio_access() retypes the still-RUNNING task from LOCK to UNLOCK before the engine processes it. The very next rp_callback() then evaluates the failsafe against that stale start_time_ms and panics at the exact moment the client releases the lock, causing a silent reboot after any lock held past 128 s. Add the same task-type exemption for RP_TASK_TYPE_UNLOCK_RADIO_ACCESS so the retype-on-release path is no longer misclassified as a hung task.
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe radio planner’s failsafe callback now excludes both ChangesRadio planner failsafe
Estimated code review effort: 2 (Simple) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Jul 24, 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.
What
The radio planner's
rp_callback()failsafe reboots the board (panic) if the current task has beenRUNNINGfor more than 128 s. It already exemptsRP_TASK_TYPE_LOCK_RADIO_ACCESSfrom this check, but was missing the same exemption forRP_TASK_TYPE_UNLOCK_RADIO_ACCESS.Why
A lock task held open longer than the failsafe window (e.g. continuous RX under the raw RAC) keeps its original
start_time_ms. When the client releases the lock,unlock_radio_access()retypes the still-RUNNINGtask fromLOCKtoUNLOCKbefore the engine processes it. The very nextrp_callback()then evaluates the failsafe against that stalestart_time_msand panics — at the exact moment the client releases the lock. This produced a deterministic silent reboot any time a radio lock was held past 128 s.The fix adds the same task-type exemption for
RP_TASK_TYPE_UNLOCK_RADIO_ACCESSso the retype-on-release path is no longer misclassified as a hung task.HWIL-validated as carried patch on PROVES FCB v5e.
Related: Open-Source-Space-Foundation/proves-core-reference#439
This is a candidate for true upstreaming to Lora-net/usp once validated further.
Stack position: 1/2 — base of stack
main <- #1 <- #2. See #2 for the next layer.