Skip to content

Commit

Permalink
dispatcher: fix AccessDenied on process lookup
Browse files Browse the repository at this point in the history
On macOS dispatcher while trying to go through process list gets stuck
on some of the system processes like launchd, logd, systemstats, etc.
and quites unexpectedly with PermissionError and psutil.AccessDenied
exceptions.

Fixes: https://tracker.ceph.com/issues/67313

Signed-off-by: Kyr Shatskyy <[email protected]>
  • Loading branch information
Kyr Shatskyy committed Aug 2, 2024
1 parent 8613d3f commit da7aef6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions teuthology/dispatcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def find_dispatcher_processes() -> Dict[str, List[psutil.Process]]:
def match(proc):
try:
cmdline = proc.cmdline()
except psutil.AccessDenied:
return False
except psutil.ZombieProcess:
return False
if len(cmdline) < 3:
Expand Down

0 comments on commit da7aef6

Please sign in to comment.