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] Process.memory_maps() should remove (deleted) from "path" #759

Closed
giampaolo opened this issue Feb 7, 2016 · 1 comment
Closed

Comments

@giampaolo
Copy link
Owner

======================================================================
FAIL: test_memory_maps (test_process.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/giampaolo/svn/psutil/psutil/tests/test_process.py", line 601, in test_memory_maps
    os.path.islink(nt.path), nt.path
AssertionError: /run/shm/sem.SiOnY9 (deleted)
@giampaolo giampaolo changed the title [Linux] Process.memory_maps() should remove delete from path [Linux] Process.memory_maps() should remove (deleted) from "path" Feb 8, 2016
@giampaolo
Copy link
Owner Author

Fixed in cc16e96.

nkorb pushed a commit to grnet/cephtools that referenced this issue May 9, 2018
Since v4.0.0 [1], psutil strips the ' (deleted)' string from mapped
libraries that have been deleted from the disk. That renders our check
useless, because psutil has no way to tell about this info.

Work around this behavior by reading the maps file of each target
process in procfs. We decided not to run subprocesses and parse output
from linux utilities, but the behavior of this library forces us to do
so.

[1] giampaolo/psutil#759
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