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

Unloading module after failed app start #2616

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

tandharia
Copy link

Checklist (Please check before submitting)

Describe the contribution
Fixes #2615 - Unloading module from memory when an app fails to start

Testing performed
Built and ran all tests

Expected behavior changes
If an app fails to start because of bad parameters, the module is unloaded from memory and the entry in the OS_module_table removed

System(s) tested on
OS: RHEL 8.10

Contributor Info - All information REQUIRED for consideration of pull request
Tvisha Andharia - GSFC 582 intern

Copy link

@RichLandau RichLandau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pipeline for commit style is failing, could you please fix your commit message to use the standard form that links the change to the issue?

modules/es/fsw/src/cfe_es_apps.c Outdated Show resolved Hide resolved
@@ -799,6 +799,10 @@ int32 CFE_ES_AppCreate(CFE_ES_AppId_t *ApplicationIdPtr, const char *AppName, co
/*
* Set the table entry back to free
*/
if (OS_ObjectIdDefined(AppRecPtr->LoadStatus.ModuleId)) {
OS_ModuleUnload(AppRecPtr->LoadStatus.ModuleId);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please capture the return code and log on error.

@tandharia tandharia force-pushed the fix-2615-unloading-module branch 2 times, most recently from 79d1bbf to 9db4d27 Compare December 3, 2024 12:59
@dzbaker
Copy link
Collaborator

dzbaker commented Dec 5, 2024

CCB 5 December 2024: Provisionally approved pending squash of commits.

@tandharia tandharia force-pushed the fix-2615-unloading-module branch from 9db4d27 to f35e304 Compare December 5, 2024 19:51
@dzbaker dzbaker added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Provisionally-Approved labels Dec 10, 2024
dzbaker added a commit to nasa/cFS that referenced this pull request Dec 10, 2024
*Combines:*

cFE equuleus-rc1+dev219
osal equuleus-rc1+dev93
PSP equuleus-rc1+dev55
cFS-GroundSystem equuleus-rc1+dev14

**Includes:**

*cFE*
- nasa/cFE#2308
- nasa/cFE#2612
- nasa/cFE#2616
- nasa/cFE#2309

*osal*
- nasa/osal#1486

*PSP*
- nasa/PSP#441

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#233
- nasa/cFS-GroundSystem#235
- nasa/cFS-GroundSystem#236

Co-authored by: Avi Weiss <thnkslprpt@users.noreply.github.com>
Co-authored by: Tvisha Andharia <tandharia@users.noreply.github.com>
Co-authored by: Chris Knight <CDKnightNASA@users.noreply.github.com>
@dzbaker dzbaker mentioned this pull request Dec 10, 2024
2 tasks
dzbaker added a commit to nasa/cFS that referenced this pull request Dec 10, 2024
*Combines:*

cFE equuleus-rc1+dev219
osal equuleus-rc1+dev93
PSP equuleus-rc1+dev55
cFS-GroundSystem equuleus-rc1+dev14

**Includes:**

*cFE*
- nasa/cFE#2308
- nasa/cFE#2612
- nasa/cFE#2616
- nasa/cFE#2309

*osal*
- nasa/osal#1486

*PSP*
- nasa/PSP#441

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#233
- nasa/cFS-GroundSystem#235
- nasa/cFS-GroundSystem#236

Co-authored by: Avi Weiss <thnkslprpt@users.noreply.github.com>
Co-authored by: Tvisha Andharia <tandharia@users.noreply.github.com>
Co-authored by: Chris Knight <CDKnightNASA@users.noreply.github.com>
@dzbaker dzbaker merged commit 914ad7a into nasa:main Dec 10, 2024
21 checks passed
dzbaker added a commit to nasa/cFS that referenced this pull request Dec 10, 2024
*Combines:*

cFE equuleus-rc1+dev219
osal equuleus-rc1+dev93
PSP equuleus-rc1+dev55
cFS-GroundSystem equuleus-rc1+dev14

**Includes:**

*cFE*
- nasa/cFE#2308
- nasa/cFE#2612
- nasa/cFE#2616
- nasa/cFE#2309

*osal*
- nasa/osal#1486

*PSP*
- nasa/PSP#441

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#233
- nasa/cFS-GroundSystem#235
- nasa/cFS-GroundSystem#236

Co-authored by: Avi Weiss <thnkslprpt@users.noreply.github.com>
Co-authored by: Tvisha Andharia <tandharia@users.noreply.github.com>
Co-authored by: Chris Knight <CDKnightNASA@users.noreply.github.com>
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.

Uncleaned Resources After Failed App Start
3 participants