Fix #684, order of CleanupTaskResources#685
Merged
astrogeco merged 1 commit intonasa:integration-candidatefrom May 19, 2020
Merged
Fix #684, order of CleanupTaskResources#685astrogeco merged 1 commit intonasa:integration-candidatefrom
astrogeco merged 1 commit intonasa:integration-candidatefrom
Conversation
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.
CDKnightNASA
approved these changes
May 7, 2020
skliper
approved these changes
May 7, 2020
Contributor
|
CCB 20200513 - Approved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_ERRin 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.