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

Fix #623, add debug messages for mutex double locks #634

Merged

Conversation

jphickey
Copy link
Contributor

Describe the contribution

If OS_DEBUG is enabled, this adds a message if mutex give/take actions occur outside the expected sequence. In particular,
this warns if a task takes a mutex more than once.

Fixes #623

Testing performed
Build and sanity test CFE with debug events enabled, confirm normal boot and operation.
Send "remove packet" request to TO_LAB.

Confirm warning is generated as follows (this is a known issue in CFE doing multiple locks):

OS_MutSemTake():216:WARNING: Task 65547 taking mutex 327685 while owned by task 65547

Expected behavior changes
If debugging is enabled this now informs the user (via the debug console) if a lock is taken more than once.
It will also warn if a lock is given by a different task than what originally took it.

System(s) tested on
Ubuntu 20.04

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

if OS_DEBUG is enabled, this adds a message if mutex give/take
actions occur outside the expected sequence.  In particular,
this warns if a task takes a mutex more than once.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Oct 27, 2020
@astrogeco astrogeco removed the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Oct 28, 2020
@astrogeco
Copy link
Contributor

CCB 2020-10-28 APPROVED

@astrogeco astrogeco changed the base branch from main to integration-candidate October 30, 2020 15:43
@astrogeco astrogeco merged commit b2974e8 into nasa:integration-candidate Oct 30, 2020
astrogeco added a commit to nasa/cFS that referenced this pull request Oct 30, 2020
@jphickey jphickey deleted the fix-623-mutex-multilock branch December 3, 2020 17:26
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Fix nasa#632, Infer OSAL_SYSTEM_BSPTYPE from CFE_SYSTEM_PSP_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add OS_DEBUG warning if task locks a mutex multiple times
4 participants