-
Notifications
You must be signed in to change notification settings - Fork 217
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
osal_core_UT hanging on MCP750/VxWorks #1088
Comments
Perplexingly, as a debug test I added an osal/src/unit-tests/oscore-test/ut_oscore_task_test.c Lines 150 to 166 in 64a6b31
My objective was to see if the test was just getting ahead of the console output... But then the test actually passed.... !! |
Actually, I may have realized what is going on, and it turns out maybe the OS_TaskDelay() isn't that bad... The test creates all these tasks, waits for a short period, then deletes all the tasks. Each task calls If the parent thread doesn't wait long enough and deletes the task while it is still in the midst of the |
In the osal_core_UT test, the test task was being deleted while it was in the midst of a UtPrintf call, which left the BSP mutex in a locked state, causing deadlock. Using SEM_DELETE_SAFE attribute avoids task deletion for the mutex holder, and adding a small delay to the test case makes all the messages appear as expected (accounts for slow serial console on test platform).
Fix #1088, avoid task delete during UtPrintf
cFE Integration candidate: 2021-01-12
Describe the bug
When I run
osal_core_UT
on the MCP750, it seems to run fine until it gets to theOS_TaskCreate
test. About 5 tasks into the process of creating OS_MAX_TASKS, output stops, and the test just hangs. Here are the last few lines of output:To Reproduce
Run
osal_core_UT
on the MCP750 test platformExpected behavior
Test should pass
System observed on:
MCP750 VxWorks 6.9
Additional context
This test used to pass, so very confusing as to why it seems to be locking up now.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: