Skip to content
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

(Linux) race condition in process files, threads and connections #292

Closed
giampaolo opened this issue May 23, 2014 · 4 comments
Closed

(Linux) race condition in process files, threads and connections #292

giampaolo opened this issue May 23, 2014 · 4 comments

Comments

@giampaolo
Copy link
Owner

From g.rodola on June 28, 2012 17:23:03

These 3 functions have the peculiarity that we read multiple files in /proc to 
extract the information we need.
While doing so we ignore ENOENT (no such file) errors because that means a 
certain file/thread/connection disappeared on us while iterating: 
https://code.google.com/p/psutil/source/browse/tags/release-0.5.0/psutil/_pslinux.py#601

https://code.google.com/p/psutil/source/browse/tags/release-0.5.0/psutil/_pslinux.py#715

https://code.google.com/p/psutil/source/browse/tags/release-0.5.0/psutil/_pslinux.py#778
 That might also mean, though, that also the *process* disappeared on us, and 
that's not taken into accout.
The risk is that if we hit the race condition we get an empty list as a result, 
meaning the process has no threads/files/connections, while instead we should 
get a NoSuchProcess exception.

Original issue: http://code.google.com/p/psutil/issues/detail?id=292

@giampaolo giampaolo self-assigned this May 23, 2014
@giampaolo
Copy link
Owner Author

From g.rodola on June 28, 2012 08:27:04

Fixed in r1393 .

Status: FixedInSVN

@giampaolo
Copy link
Owner Author

From g.rodola on June 29, 2012 09:48:19

Labels: -Milestone-1.0.0 Milestone-0.5.1

@giampaolo
Copy link
Owner Author

From g.rodola on June 29, 2012 11:46:17

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:09:48

Updated csets after the SVN -> Mercurial migration: r1393 == revision 
ef6815f3634e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant