fix(comms): make ComQueue comStatusIn blocking so the one-shot arming status can't be dropped (#494) - #495
fix(comms): make ComQueue comStatusIn blocking so the one-shot arming status can't be dropped (#494)#495Mikefly123 wants to merge 2 commits into
Conversation
…atusIn blocking (#494) Bumps the fprime pin to pick up fix/comqueue-blocking-comstatus-main (03c645123, one FPP change in Svc/ComQueue/ComQueue.fpp): async input port comStatusIn: Fw.SuccessCondition block The com-status arming protocol is one-shot: the single SUCCESS emitted at startup (ComAggregator preamble) shares ComQueue's IPC message queue with the boot event burst on comPacketQueueIn. If that queue is momentarily full, the generated handlerBase FW_ASSERTs -- which on this deployment reports to a disabled console and continues -- and the arming message is silently lost. ComQueue then stays in WAITING forever: no telemetry, no events, no command acks, on every boot of that binary (the race is deterministic per-build). Both the UART and LoRa com stacks wedge identically. GDB-traced end to end on bench hardware and verified on two V5e units: pre-fix binary fails every boot (comQueue.m_state == WAITING, enqueue -> PriorityQueue FULL -> assert hook), fixed binary passes every boot including cold reset, with full GET_SEQ_NUM round-trips and flowing telemetry. Blocking the low-rate status sender until a queue slot frees guarantees delivery at zero memory cost. Deepening the queue instead is not viable: depth >=48 exhausts the malloc arena at boot (BufferManager's ~27KB contiguous allocation fails). Fixes #494 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpBURCutAx8281i59nj6fo
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request updates the ChangesF´prime Submodule Update
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
nateinaction
left a comment
There was a problem hiding this comment.
This worked for me.
|
Oh wait. It looks like I did not use this. |
…idn't exist The previous gitlink (03c645123ba8933e33e4c621bafd433d5c1a56de) shares only its first 9 hex chars with the real commit and exists in no repo — it looks like an abbreviated SHA that was expanded incorrectly. The actual ComQueue blocking-comStatusIn fix is the tip of the fork branch fix/comqueue-blocking-comstatus-main: 03c6451237d4442248703947693c1985a1948e88. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes #494.
What
One-line FPP change in the fprime fork, delivered as a submodule pin bump (
03c645123onfix/comqueue-blocking-comstatus-main, based directly on main's current pin8a62e455a):Why
See #494 for the full trace. Summary: the com-status arming protocol is one-shot — the single
SUCCESSemitted at startup byComAggregator::preamble()shares ComQueue's IPC message queue with the boot event burst oncomPacketQueueIn. If the queue is momentarily full, the generated handler FW_ASSERTs (invisibly, withCONFIG_LOG=n) and the arming message is lost. ComQueue then sits inWAITINGforever: no telemetry, no events, no command acks — on every boot of that binary, for both the UART and LoRa stacks. The race outcome is deterministic per build, so any change to startup workload (components, events, init timing — e.g. PR #472's littlefs mount) can flip a passing build into a permanently silent one.blockmakes the low-rate status sender wait for a queue slot instead: delivery guaranteed, zero RAM, no deadlock exposure (the comQueue thread never blocks back toward the aggregator; at most one frame is in flight per status).Why not just deepen the queue
Tried first:
QueueSizes.comQueueat 48/64/100 all exhaust the malloc arena at boot (BufferManager's ~27KB contiguousconfigComponentsallocation returns NULL → usage fault). Heap slack with littlefs on is <8KB. Depth also only re-wins the race probabilistically;blockremoves it categorically.Verification (bench, two V5e units)
comQueue.m_state == WAITING, GDB-traced enqueue →PriorityQueueFULL → assert hookSequenceNumberGet/OpCodeCompletedround-tripsNote this PR fixes the latent protocol bug on
mainitself;maincurrently happens to win the boot race, so there is no observable behavior change expected — the regression only manifests when combined with boot-workload changes like the #472 keystore. Suggested review focus: the blocking-semantics deadlock argument in the fork commit message.🤖 Generated with Claude Code
https://claude.ai/code/session_01WpBURCutAx8281i59nj6fo