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 #684, order of CleanupTaskResources #685

Merged

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented May 7, 2020

Describe the contribution
When cleaning up a task the child task resources should be cleaned first, followed by the main task resources.

This is because child tasks are also associated with the original creator within OSAL and will be found through OSAL ForEachObject, and also via links within the ES task table.

By cleaning child tasks first, this avoids attempting to delete the child task twice.

Fixes #684

Testing performed
Hack "sample_app" to create a child thread AND trigger an exception after period of time. Confirmed the original bug report where the attempt to clean up the sample_app resources results in CFE_ES_TASK_DELETE_ERR in the unmodified master branch.

Then apply this patch and re-test, and confirm that "sample_app" is successfully restarted.

Also confirm unit tests passing.

Expected behavior changes
Both the main task and the child task(s) are successfully deleted and restarted after the exception occurs.

System(s) tested on
Ubuntu 20.04

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

When cleaning up a task the child task resources should be
cleaned first, followed by the main task resources.

This is because child tasks are also associated with the original
creator within OSAL and will be found through OSAL ForEachObject,
and also via links within the ES task table.

By cleaning child tasks first, this avoids attempting to delete
the child task twice.
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label May 7, 2020
@jphickey jphickey requested a review from skliper May 7, 2020 14:29
@skliper skliper added this to the 6.8.0 milestone May 7, 2020
@skliper
Copy link
Contributor

skliper commented May 13, 2020

CCB 20200513 - Approved

@skliper skliper added CCB-20200613 and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels May 13, 2020
@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB IC-20200513 labels May 19, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate May 19, 2020 20:05
@astrogeco astrogeco merged commit df31b09 into nasa:integration-candidate May 19, 2020
@jphickey jphickey deleted the fix-684-cleanup-reorder branch June 4, 2020 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CFE_ES_CleanupTaskResources attempts to delete child task twice
4 participants