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
741 stars 54 forks source link

node: exception leaks from is_node_process() #824

Closed Jongy closed 12 months ago

Jongy commented 1 year ago
Traceback (most recent call last):
File gprofiler/main.py, line 381, in run_continuous
File gprofiler/main.py, line 313, in _snapshot
File concurrent/futures/_base.py, line 451, in result
File concurrent/futures/_base.py, line 403, in __get_result
File concurrent/futures/thread.py, line 58, in run
File gprofiler/profilers/perf.py, line 512, in snapshot
File gprofiler/profilers/perf.py, line 513, in <dictcomp>
File gprofiler/profilers/perf.py, line 524, in _generate_profile_data
File gprofiler/profilers/perf.py, line 477, in _get_metadata
File gprofiler/profilers/perf.py, line 564, in relevant_for_process
File granulate_utils/node.py, line 12, in is_node_process
File granulate_utils/linux/process.py, line 140, in is_process_basename_matching
File granulate_utils/linux/process.py, line 36, in process_exe
granulate_utils.exceptions.MissingExePath: No exe path was found for psutil.Process(...), threads: [...]

This exception should not leak to run_continuous() - it should be handled as "the process is not node".