-
-
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
process.children(recursive=True) could rise Type error #1353
Comments
Do you have a way to reproduce the issue? Can you print |
It's very unfrequent, one to many thousands calls. I think it's related to situation when one of the processes ends during method execution. It exists in the begging, end does not sometimes later. |
Looking back at this... it's a nasty one. It appears it's a race condition. Are you using |
Despite I couldn't reproduce this issue I assume 96091c2 fixed it. Closing this out. |
Hi, I've encountered this Exception twice today, once with 5.6.1 (this is understandable), but the 2nd time it was after updating to 5.6.7. I can provide Sentry stacktrace & more info if that could help. |
:-( |
Thanks for the reply, I'll provide some more insight as I see my example. I had it happen 2 more times today (for about 350 parent functions calls total).
I tried to reproduce it locally, and was unable to as for now. Some code snippets & traceback below. Sample traceback:
I tried to include everything that would make it as close to production environment and complexity as possible |
Hi there, We also get this in our production environment ~2 times a week and also use it from multiple threads.
I wonder if moving the lock to wrap this whole code block would work? Lines 1426 to 1435 in ea5b2df
|
Python version 3.6.6. psutil version: 5.2.2
Probably some of the new_pids returned None instead of Process
The text was updated successfully, but these errors were encountered: