You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this message finds you well. I have identified a potential "File Descriptor Leak" issue in the project, and I would like to bring it to your attention as it may impact resource management and stability. This issue could lead to resource exhaustion if not addressed, as the file descriptor is left open without being properly released. Could you please help me check it? Thank you for your effort and patience!
Issue Description:
The bug is located in the file src/rdb.c, within the rdbRemoveTempFile function. The specific code flow is as follows:
On line 1648, a file descriptor fd is created by calling the open function with the parameters O_RDONLY | O_NONBLOCK.
After this file descriptor is created, it is marked as unused with UNUSED(fd); but is not explicitly closed before the function returns.
This omission leads to a "File Descriptor Leak" issue, as the descriptor remains open until the process exits, causing potential resource management problems if this function is called multiple times.
The text was updated successfully, but these errors were encountered:
Haven't read the code, but the comment above that indicates that the file descriptor would get released as part of the exit of the child process created for background save. @oilfacer Did you face any particular issue with leaking fd ?
I hope this message finds you well. I have identified a potential "File Descriptor Leak" issue in the project, and I would like to bring it to your attention as it may impact resource management and stability. This issue could lead to resource exhaustion if not addressed, as the file descriptor is left open without being properly released. Could you please help me check it? Thank you for your effort and patience!
Issue Description:
The bug is located in the file src/rdb.c, within the rdbRemoveTempFile function. The specific code flow is as follows:
On line 1648, a file descriptor fd is created by calling the open function with the parameters O_RDONLY | O_NONBLOCK.
After this file descriptor is created, it is marked as unused with UNUSED(fd); but is not explicitly closed before the function returns.
This omission leads to a "File Descriptor Leak" issue, as the descriptor remains open until the process exits, causing potential resource management problems if this function is called multiple times.
The text was updated successfully, but these errors were encountered: