Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task not found case not explicitly handled in CFE_ES_RunExceptionScan #1345

Closed
skliper opened this issue Apr 14, 2021 · 2 comments · Fixed by #1385 or #1431
Closed

Task not found case not explicitly handled in CFE_ES_RunExceptionScan #1345

skliper opened this issue Apr 14, 2021 · 2 comments · Fixed by #1385 or #1431
Assignees
Labels
CFS-40 docs This change only affects documentation. enhancement
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Apr 14, 2021

Is your feature request related to a problem? Please describe.
Not clear if task not found case is handled correctly:

Describe the solution you'd like
Analyze and explicitly handle if needed or document why not needed for future reference

Describe alternatives you've considered
None

Additional context
Code Review

Requester Info
Jacob Hageman - NASA/GSFC

@jphickey
Copy link
Contributor

Checked this, its fine as-is.

The default behavior after exception is to do a restart of some form (processor or poweron). Only if the exception is specific to a certain task and the app owning that task was configured with "RESTART_APP" option, then only that app will be restarted instead of the whole system.

So in this case if the task was not found it will just fall through as intended to do the full processor restart.

Most likely if this occurs its because data structures are out of sync, which in an exception handling context is most likely because the data structures were possibly clobbered as part of whatever went wrong, before the RTOS actually caught the exception and stopped the task. This can have far reaching effects/unpredictable behavior, so the best bet is to restart ASAP.

I suppose we could add a SysLog if that happens, but even that involves taking a lock which if the data structures are corrupted, could deadlock. All hypothetical though....

@skliper
Copy link
Contributor Author

skliper commented Apr 19, 2021

Recommend a comment to document this intended behavior.

jphickey added a commit to jphickey/cFE that referenced this issue Apr 19, 2021
Adds comments to describe the logic when an exception cannot
be traced back to a specific app, in that it should fall back
to the PSP reset.

Restarting only an app is a special opt-in case that is only
done if specifically selected when starting the app, and the
exception is also positively traced back to that app.
@astrogeco astrogeco added the docs This change only affects documentation. label Apr 21, 2021
astrogeco added a commit that referenced this issue Apr 28, 2021
Fix #1345, exception logic when app/task is not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CFS-40 docs This change only affects documentation. enhancement
Projects
None yet
3 participants