-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Lots of file handles left open due to return before closing #556
Comments
Many (all?) of those files which were left open should have already been fixed by 7c629de. |
that commit points to a test file changes :) |
Whops! Wrong one. Here: 02d58e9 |
aaah ok I was looking into the possible commit of that issue but was confused by the "remove 2.4/5 compat" name :) cool so any plan to release a new version with those fixes? :) |
It will happen very soon. Closing this out for now. |
@giampaolo hi! dont know if you had a look at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772543#27 but it seems there are more fd leaks to address? |
Ciao Sandro. What is the method leaking file handles? Process.threads()? I can't see anything wrong with it. Note: I'm talking about the current latest repo version which is not released yet. |
the user attached a patch in the next message, this: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=32;filename=psutil-filehandle-leaks-more-fixes.patch;att=1;bug=772543 which he mention was under test (still with the version released in debian, 2.1.1) but not come back, but you might still want to give it a look |
Why don't you guys just make a patch for psutil instead? What are the methods leaking fds? |
i'm not making any patch, i'm just passing by the information the reporter wrote on the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772543 maybe you can contact him (the email is in the bug report)? |
…fully this should fix all fds leaks
OK, I took a look at the patch and guessed where the problem might be. ad2624a is the result of it: now every open() call uses the 'with' context manager. I suppose all the issues described in that bug report should be addressed now. Could you report back to them asking if they can try latest GIT version and see if the problem still occurs? |
Fixed in 2.2.0. Closing. |
Hello,
as reported in Debian bug bugs.debian.org/772543 here are several file handles left opened due to the use of return before the handle closure; some have been fixed in 3760d95 but several others are still around (even in that very same commit, the first hunk leave the fd opened.
for programs meant to keep running, leaving fd opened will hit linux limits, like the reported described
Regards,
Sandro
The text was updated successfully, but these errors were encountered: