Open dennisafa opened 2 years ago
I'm not quite following. The initiate should only happen if the polling directory isn't busy: https://github.com/nasa/CF/blob/80538827ad62f4a12c91259c98001cfbadd47a87/fsw/src/cf_cfdp.c#L1584-L1596
And busy is only set to zero when the directory has been closed and there's no remaining transactions: https://github.com/nasa/CF/blob/80538827ad62f4a12c91259c98001cfbadd47a87/fsw/src/cf_cfdp.c#L1499-L1511
Can you elaborate on the flow that causes multiple directory opens without a close?
Tried to recreate using the main branch and I see a successful close for every open. Any chance there's something else using up the FDs?
Checklist (Please check before submitting)
Describe the bug CF_CFDP_PlaybackDir is called by CF_CFDP_ProcessingPollingDirectories when the interval for the CF_Poll_t structure has expired. This function will attempt to reopen the directory. If the polling directory does not continuously receive new files to process, then the OS_DirectoryOpen call happens without a corresponding OS_DirectoryClose call, exhausting the amount of available file descriptors and causing this error.
CF: failed to open playback directory /cf/dl , error=-14
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect the directory file descriptor to be cleaned up before each OS_DirectoryOpen call.
Code snips Configuration table used:
System observed on:
Additional context I added a check in CF_CFDP_PlaybackDir that looks to see if the FD is 0. If it isn't, I close the directory and reopen it. This gets rid of the problem.
Reporter Info Dennis Afanasev, NASA Goddard Code 587