selfdrived: add permanent alert for processNotRunning#38238
Open
srijavuppala wants to merge 1 commit into
Open
selfdrived: add permanent alert for processNotRunning#38238srijavuppala wants to merge 1 commit into
srijavuppala wants to merge 1 commit into
Conversation
processNotRunning only had NO_ENTRY and SOFT_DISABLE alerts. The SOFT_DISABLE alert is transient (2-4s), and NO_ENTRY only shows while the driver is actively trying to engage. Once both expire, there is nothing left to display for it, so an unrelated lower-priority permanent alert (e.g. steerUnavailable's 'LKAS Fault: Restart the car to engage') ends up shown instead, masking the real cause of the disengagement. Add a PERMANENT alert for processNotRunning at Priority.LOW, following the same pattern already used for modeldLagging, so it keeps showing and outranks other default-priority (LOWER) permanent alerts.
Contributor
Process replay diff reportReplays driving segments through this PR and compares the behavior to master. ✅ 0 changed, 66 passed, 0 errors |
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.
Summary
Fixes #34751.
processNotRunningonly definesET.NO_ENTRYandET.SOFT_DISABLEalerts. TheSOFT_DISABLEalert is transient (2-4s depending onsoft_disable_time), andNO_ENTRYis only ever included incurrent_alert_typeswhile the driver is actively trying to engage (seeStateMachine.updateinselfdrive/selfdrived/state.py,ET.PERMANENTis always active butET.NO_ENTRYis only appended inside theevents.contains(ET.ENABLE)branch).So once a process dies, after both of those alerts expire there is nothing left in
EVENTS[processNotRunning]forET.PERMANENT, the alert type that's always considered. If a consequential fault is also active and has aPERMANENTalert (e.g.steerUnavailable's "LKAS Fault: Restart the car to engage"), that unrelated, lower-severity alert is the only thing left to display, masking the real cause exactly as described in the issue.modeldLaggingalready follows the pattern this needs:SOFT_DISABLE+NO_ENTRY+PERMANENT. This PR adds the samePERMANENTalert forprocessNotRunning, atPriority.LOW(one step above the defaultPriority.LOWERused byNormalPermanentAlert/steerUnavailable's permanent alert) so it reliably outranks other default-priority permanent alerts that are just side effects of the same underlying process crash, regardless of which one happened to start first.Test plan
ruff checkpassesAlertManager.process_alerts(selfdrive/selfdrived/alertmanager.py) to confirm selection ismax(priority, start_frame)across all active alerts, and reproduced both the before/after outcome with a standalone script mirroring that exact comparison using the realPriorityvalues:processNotRunningcontributes noPERMANENTalert, sosteerUnavailable'sPERMANENT(Priority.LOWER) wins by defaultprocessNotRunning's newPERMANENTalert (Priority.LOW) wins regardless of start orderea1f52a90cc05090/00000001--1fc11d46d7) thatprocessNotRunningwas present inonroadEventswith noPERMANENTentry, whilesteerUnavailablewas permanent and is what actually displayed