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
A thread may exit after the open_binary() call and before the read() call. In this case open_binary() will succeed but read() will raise ProcessLookupError.
I think this should be treated the same as FileNotFoundError from open_binary(), since in both cases it means the thread disappeared on us.
Here's some code I used to trigger the race condition:
Summary
Description
Process.threads()
has a race condition in this code:psutil/psutil/_pslinux.py
Lines 2061 to 2068 in 69b572e
A thread may exit after the
open_binary()
call and before theread()
call. In this caseopen_binary()
will succeed butread()
will raiseProcessLookupError
.I think this should be treated the same as
FileNotFoundError
fromopen_binary()
, since in both cases it means the thread disappeared on us.Here's some code I used to trigger the race condition:
The text was updated successfully, but these errors were encountered: