Closed the-other-james closed 1 year ago
I found the solution to this problem.
In cf_cfdp_r.c near line 600 (I have some changes at the moment):
t->fd = OS_OBJECT_ID_UNDEFINED; /* just in case */
if (t->state == CF_TxnState_R2)
{
CF_CFDP_R2_SetFinTxnStatus(t, CF_TxnStatus_FILESTORE_REJECTION);
}
else
{
/// I THINK THIS IS A BUG BECAUSE IT GETS RESET AGAIN AT THE END OF THIS PROCESS AND TRIES TO ACCESS "history" IN THE INTERIM.
/// The solution is to remove this ... solves the problem for me but I haven't thoroughly explored yet.
//CF_CFDP_R1_Reset(t);
}
@the-other-james @kylenave I was able to repeat this error and am investigating further now. Great catch and thanks for passing this along!!
Checklist (Please check before submitting)
Describe the bug
CF will seg-fault when uploading a file with an invalid destination filename. CF outputs an EVS message that it failed to create the file. It then appears to access a null pointer for a transaction.
Backtrace:
We are using Cosmos 4.5 with the CFDP engine. We are using the SEND FILE command.
To Reproduce Steps to reproduce the behavior:
Expected behavior
CF should report that an error happened (which it currently does), but not seg-fault :)
Code snips
None.
System observed on:
Note that we have modified cFE, OSAL, and the PSP, but mostly to run on our target system: a microblaze running petalinux (upon which we have also observed the seg-fault).
Additional context
Observed with draco-rc2 and draco-rc4
Reporter Info James Marshall, NASA GSFC 587