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

Task ID Not Valid in CFE_ES_DeleteApp #374

Closed
skliper opened this issue Oct 10, 2019 · 4 comments · Fixed by #388
Closed

Task ID Not Valid in CFE_ES_DeleteApp #374

skliper opened this issue Oct 10, 2019 · 4 comments · Fixed by #388
Assignees
Labels
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Oct 10, 2019

Describe the bug
When deleting an app the Task ID Not Valid message was observed:

1980-012-14:06:24.50399 ES Startup: TST_ES4 loaded and created                                                                                             
EVS Port1 66/1/CFE_ES 6: Started TST_ES4 from /ram/tst_es4.o, AppID = 8                                                                                    
EVS Port1 66/1/TST_ES4 1: TST_ES4: Version 2.0.0.0: Task Initialized                                                                                       
1980-012-14:07:01.50000 CFE_ES_DeleteApp: Delete Application TST_ES4 Initiated                                                                             
1980-012-14:07:06.00100 CFE_ES_GetTaskInfo: Task ID Not Valid: 8                                                                                           
EVS Port1 66/1/CFE_ES 8: Stop Application TST_ES4 Completed.

The app was still deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Should be able to recreate by just deleting an app (say sample_app) on VxWorks6.9 OSAL
    (I haven't had a chance to verify myself)

Expected behavior
AppID = 8, TaskID seem to start in the 655xx range. I'd expect the code to use the right values in the right calls.

Code snips
Needs investigation

System observed on:

  • mcp750
  • OS: VxWorks6.9
  • Versions: rc-6.7 bundle

Additional context
Seen during build verification testing.

Reporter Info
Jacob Hageman - NASA/GSFC
Found by Walt M.

@jphickey
Copy link
Contributor

Is it possible to get a stack trace when the error occurs? Or can you compile your same mission config on Linux via e.g. SIMULATION=native and reproduce the error, where it is possible to get a stack trace?

Of note here, is that that CFE_ES_DeleteApp() does not seem to invoke CFE_ES_GetTaskInfo(), at least not that I can see. A stack trace would show whether this is really from the delete call, or if it happened in a different call that happened just after it.

However, I do see that the CFE_ES_ListTasks() function does invoke CFE_ES_GetTaskInfo() and also invokes it improperly. It is calling it with an array index, whereas it should be calling it with a task ID.

Basically, the line:
Result = CFE_ES_GetTaskInfo(&TaskInfo,i);
should probably be:
Result = CFE_ES_GetTaskInfo(&TaskInfo,CFE_ES_Global.TaskTable[i].TaskID);
instead.

I will push a fix for the above, but I'd still like to explain why you saw this in relation to CFE_ES_DeleteApp somehow.

jphickey added a commit to jphickey/cFE that referenced this issue Oct 12, 2019
Fix 2 areas where the CFE_ES_GetTaskInfo() function could
have been passed an App ID rather than a task ID, which
would create an incorrect result.
@skliper skliper added this to the 6.8.0 milestone Oct 13, 2019
@skliper
Copy link
Contributor Author

skliper commented Oct 13, 2019

Looks like the commit fixed the events in the delete app, is more information still needed?

@skliper skliper added the bug label Oct 14, 2019
@jphickey
Copy link
Contributor

Nope, its all fixed. I was able to reproduce it locally. This should be good to go.

@skliper
Copy link
Contributor Author

skliper commented Oct 30, 2019

Could you submit a pull request?

Whoops, nevermind.

skliper pushed a commit that referenced this issue Oct 31, 2019
Fix 2 areas where the CFE_ES_GetTaskInfo() function could
have been passed an App ID rather than a task ID, which
would create an incorrect result.
skliper added a commit that referenced this issue Oct 31, 2019
Fixes #361, #373, #374, #381
Code reviewed and approved at 20191023 and 30 CCBs
skliper pushed a commit that referenced this issue Oct 31, 2019
Fix 2 areas where the CFE_ES_GetTaskInfo() function could
have been passed an App ID rather than a task ID, which
would create an incorrect result.
skliper added a commit that referenced this issue Oct 31, 2019
Fixes #361, #373, #374, #381
Code reviewed and approved at 20191023 and 30 CCBs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants