I use the public RevCommit parseCommit(final AnyObjectId id) method to get the commit and its content。Over time, my application memory will gradually increase until oom。
After I dumped the memory, I found that the top1 object is PackIndexV2。
I noticed that there is an open operation in the implementation of the parseCommit method, and I suspect that it opened the file without releasing it, causing a memory leak.
So, I logged into the server and used the lsof command to view the pack file opened by the java process.
Moreover, with the end of the stress testing process, the number of open files has not decreased.
Actual behavior
After the parseCommit method call ends, the pack file descriptor is not released,
Expected behavior
After the parseCommit method is called, the pack file descriptor is released normally to save memory.
Version
6.8.0
Operating System
Linux/Unix
Bug description
I use the
I noticed that there is an open operation in the implementation of the parseCommit method, and I suspect that it opened the file without releasing it, causing a memory leak.
So, I logged into the server and used the lsof command to view the pack file opened by the java process.
public RevCommit parseCommit(final AnyObjectId id)
method to get the commit and its content。Over time, my application memory will gradually increase until oom。 After I dumped the memory, I found that the top1 object is PackIndexV2。Moreover, with the end of the stress testing process, the number of open files has not decreased.
Actual behavior
After the parseCommit method call ends, the pack file descriptor is not released,
Expected behavior
After the parseCommit method is called, the pack file descriptor is released normally to save memory.
Relevant log output
No response
Other information
No response