You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
OS_TaskExit() calls OS_ObjectIdFinalizeDelete(). This function sets the task's record->active_id to 0, which is also being used as the task ID on VxWorks. ObjectIdFinalizeDelete() subsequently calls OS_Unlock_Global, which errors out and does not clear the owner, as the task ID is now zeroed out and does not match the owner of the table. This does not occur on Linux
To Reproduce
Steps to reproduce the behavior:
On VxWorks, call CFE_ES_ExitChildTask with OSAL_CONFIG_DEBUG_PRINTF enabled
Expected behavior
Error message should not be printed out
Although the tickets don't seem related, what I'm working on for #642 will likely implement a process where the deleted task record is only "marked" as deleted but keeps its ID valid while it waits for the task to actually exit.
So - it should fix this too, because the ID in the global record will still be valid when the unlocking is done.
Implement an "unlock key" - based on task ID - which can be part of the local
token, rather than relying on the task ID being the same between the lock
and unlock ops. Notably, the task ID can change, in particular if the task
is exiting.
Also Fixesnasa#701, other general cleanup
Implement all global lock/unlock error checking in shared layer, not in
impl layer, for consistency. Remove redundant checks.
Make all functions return void (should never fail) and in the
unlikely event that something does fail then report the error,
but no other recourse possible.
Describe the bug
OS_TaskExit() calls OS_ObjectIdFinalizeDelete(). This function sets the task's record->active_id to 0, which is also being used as the task ID on VxWorks. ObjectIdFinalizeDelete() subsequently calls OS_Unlock_Global, which errors out and does not clear the owner, as the task ID is now zeroed out and does not match the owner of the table. This does not occur on Linux
To Reproduce
Steps to reproduce the behavior:
On VxWorks, call CFE_ES_ExitChildTask with OSAL_CONFIG_DEBUG_PRINTF enabled
Expected behavior
Error message should not be printed out
Code snips
osal/src/os/shared/src/osapi-idmap.c
Lines 745 to 777 in 1a82657
osal/src/os/shared/src/osapi-idmap.c
Lines 625 to 676 in 1a82657
osal/src/os/vxworks/src/os-impl-tasks.c
Lines 385 to 413 in 1a82657
osal/src/os/posix/src/os-impl-tasks.c
Lines 736 to 751 in 1a82657
System observed on:
Additional context
See attached screenshots for stack traces
Reporter Info
John N. Pham, Northrop Grumman
The text was updated successfully, but these errors were encountered: