-
Notifications
You must be signed in to change notification settings - Fork 45
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
Directory polling does not clean up open directory file descriptors #321
Comments
I'm not quite following. The initiate should only happen if the polling directory isn't busy: Lines 1584 to 1596 in 8053882
And busy is only set to zero when the directory has been closed and there's no remaining transactions: Lines 1499 to 1511 in 8053882
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
The text was updated successfully, but these errors were encountered: