Svc: drop periodic Sched/Ping ticks on queue-full instead of asserting - #2
Open
Mikefly123 wants to merge 1 commit into
Open
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Adds the drop queue-full annotation to two classes of periodic async input ports across Svc, where none currently exists: 1. The Svc.Sched async input on active components that receive a rate- group tick but did not have drop set: CmdSequencer.schedIn, CmdDispatcher.run, TlmChan.Run, TlmPacketizer.Run, FileDownlink.Run, BufferLogger.schedIn, DpManager.schedIn, DpWriter.schedIn. 2. PingIn/pingIn async ports across Svc, including ActiveRateGroup.PingIn and FpySequencer.pingIn (the latter previously priority 10 assert, with an open TODO questioning priority/behavior), plus two ports added upstream since this defect class was first scoped: BufferAccumulator.pingIn and FileDispatcher.pingIn. This is the same defect class fixed for ComAggregator (see companion PR): any active component fed periodic ticks by a rate group can, if its own dispatch thread stalls longer than queue_depth / tick_rate, accumulate enough queued ticks to trip the autocoded FW_ASSERT on queue-full -- turning a transient stall into an unrecoverable FATAL/reboot. Captured on hardware (PROVES CubeSat, RP2350/Zephyr) during HWIL soak testing, in two independently reproduced instances: - CmdSequencer::schedIn_handlerBase (10 Hz sched tick) hit the identical QUEUE_FULL assert as the ComAggregator case, while a sequencer's dispatch thread was stalled. - ActiveRateGroup::PingIn_handlerBase hit the same assert via Svc::Health's 1 Hz ping -- the health-check mechanism itself killed the board. Health's ping-timeout policy exists specifically to detect an unresponsive component and react gracefully; asserting on the ping enqueue short-circuits that design. Both classes of tick (rate-group sched, and ping) are periodic and idempotent by construction -- a dropped tick is simply retried on the next cycle -- so drop is behaviorally safe. Upstream already uses drop for exactly this reason on ComQueue.run and ActiveRateGroup.CycleIn; this extends the same reasoning to the remaining periodic producers that were missed. Related to issue nasa#4195 ("Add a 'Drop But Warn' on Queue Full"), which is in the same design space but currently leans assert-by-default; this change is narrower in scope (periodic/idempotent producers only, per-port opt-in via the existing drop annotation, no new mechanism). This is an fpp-only annotation change consumed by the autocoder; no new C++ logic. A reviewer sweep of existing per-component UTs that assert on QUEUE_FULL behavior for these ports is recommended before merge. Generative AI (Claude, Anthropic) was used to help root-cause this defect class during HWIL debugging (two independently captured hardware instances of the same assert) and to enumerate affected ports; disclosed per AI_POLICY.md in the upstream pull request description.
Mikefly123
force-pushed
the
fix/sched-tick-drop-annotations
branch
from
July 31, 2026 03:00
07ecfbb to
a7b34ce
Compare
Mikefly123
changed the base branch from
pcr-usp-base
to
fix/com-aggregator-bounded-timeout
July 31, 2026 03:00
Author
This was referenced Jul 31, 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
Adds the
dropqualifier to periodicSvc.Sched/Svc.Pingasync input ports on 8Svc components, so a queue-full condition on these periodic ticks drops the tick
instead of tripping the autocoded queue-full assertion. Prevents a stalled/slow
component from crashing the system on a missed housekeeping tick.
Base branch note
This PR targets
pcr-usp-base, a branch pinned at8a62e455a90b6d4f498c332d45d65a2a819988d8(the v4.2.2-era commit that
lib/fprimeis pinned to inproves-core-reference#439),
not
devel, which has diverged significantly from that pinned commit. Seefix/com-aggregator-bounded-timeoutPR for the same rationale.Provenance
Cherry-picked from
Mikefly123/fprimebranchfix/sched-tick-drop-annotations(commit
bc4641af3) ontopcr-usp-base. Cherry-pick auto-merged cleanly against theolder base for 16 of 18 touched
.fppfiles. Two files in the source branch(
Svc/BufferAccumulator/BufferAccumulator.fpp,Svc/FileDispatcher/FileDispatcher.fpp)carried the same
dropannotation on newer-upstream-only ping ports that are out ofscope for the carried patch; those two hunks were reverted from this branch to keep
scope identical to the carried patch.
Verified byte-equivalent:
git diff pcr-usp-base..fix/sched-tick-drop-annotationsisbyte-for-byte identical to applying the carried patch
fprime-sched-tick-drop.patchto a pristine checkout of8a62e455. No extras.Related