-
Notifications
You must be signed in to change notification settings - Fork 29
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
Under Windows, file handles stay open even though the FSHandle instances are closed #38
Comments
I don't even get to see any instances, because of #33. |
Okay, so I can confirm that this is also the case on macOS. It is actually the root cause for #33, because on macOS Sierra the default limit for the number of open files per process appears to be 256. Raising the limit temporarily "fixes" #33 until the new limit is hit. After a few seconds, unfortunately, the number of open pack files already is larger than 10,000. |
I can only guess at this point, but is it possible that the unpacker ends up in an endless recursion for some reason? |
The image does not hanging there is no forking going on in FileSystem-Git so there should not be an endless recursion. The count temporary is doubly used as a "remaining" counter. Do not remember from the top of my head what it is used for (sitting in a car atm). A missing close on garbage collection would explain why the OS handles remain open, but no open FSHandles exist. Don't know if I'll be able to find and fix the problem before my departure to Finland, though. |
Okay, so
|
I think I solved it in 721bc9d. Implementing |
Thanks, I realized that I need a |
FileSystem-Git is the likely culprit, yes. Currently, each time an object is looked up, a new file stream is opened. There is some caching in place already, but it could be better or is not very helpful yet. The Squit browser could also do less when a reference has not changed, for example. Or generating the object list should not involve extracting the artifacts from the files, etc. There is a lot of work to do (or to save...), when there is time. |
Sounds good! 😃 And even better: your version seems to be working just fine. Thanks! |
Inspecting the VM process with Process Explorer revealed that the file handles for pack files stay open, even though the corresponding FSHandle instances are already garbage collected or closed, as far as the object memory is concerned.
@fniephaus can you please check if the same is true for Mac OS? Just work a while in your image and check the process after some git operations.
Snippets to find (officially) open files:
The tools to inspect the actually open file descriptors or handles vary by OS, of course.
The text was updated successfully, but these errors were encountered: