Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
756 stars 55 forks source link

python: Add missing NoSuchProcess catch #652

Closed Jongy closed 1 year ago

Jongy commented 1 year ago

Fixes:

Traceback (most recent call last):
File "psutil/_pslinux.py", line 1576, in wrapper
File "psutil/_pslinux.py", line 1696, in cmdline
File "psutil/_common.py", line 725, in open_text
FileNotFoundError: [Errno 2] No such file or directory: '/proc/17961/cmdline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "gprofiler/profilers/python.py", line 262, in _select_processes_to_profile
File "gprofiler/profilers/python.py", line 278, in _should_skip_process
File "psutil/__init__.py", line 677, in cmdline
File "psutil/_pslinux.py", line 1583, in wrapper
psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=17961)
Jongy commented 1 year ago

Flaky tests