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

ps.top is throwing traceback in case process doesn't exist #9274

Closed
syphernl opened this issue Dec 15, 2013 · 2 comments
Closed

ps.top is throwing traceback in case process doesn't exist #9274

syphernl opened this issue Dec 15, 2013 · 2 comments
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix

Comments

@syphernl
Copy link
Contributor

Executing ps.top with limit 1000 (want to see all processes) and a timeout of 1 second sometimes results in traceback stating the process no longer exists:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/salt/minion.py", line 691, in _thread_return
    return_data = func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/salt/modules/ps.py", line 62, in top
    user, system = process.get_cpu_times()
  File "/usr/lib/python2.7/dist-packages/psutil/__init__.py", line 364, in get_cpu_times
    return self._platform_impl.get_cpu_times()
  File "/usr/lib/python2.7/dist-packages/psutil/_pslinux.py", line 327, in wrapper
    raise NoSuchProcess(self.pid, self._process_name)
NoSuchProcess: process no longer exists (pid=13920)
@cachedout
Copy link
Contributor

That's an easy fix. Thanks for alerting is to this issue!

whiteinge added a commit that referenced this issue Dec 16, 2013
Exception handling from psutil for processes that go missing.
@cachedout
Copy link
Contributor

Since this fix is now in Salt-proper, I'm going to close this. If this issue re-surfaces somehow, please feel free to ping this issue and we'll re-open it. Thanks!

whiteinge added a commit that referenced this issue Dec 25, 2013
related to #9274, another place needs exception handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix
Projects
None yet
Development

No branches or pull requests

2 participants