Skip to content

Commit

Permalink
Fix macOS ZombieProcess Exception (intel-analytics#3221)
Browse files Browse the repository at this point in the history
* Fix macOS ZombieProcess
* Add ProcessLookupError catch
  • Loading branch information
qiyuangong committed Dec 10, 2020
1 parent 2c48799 commit 5fb06f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/orca/src/bigdl/orca/ray/raycontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ def kill_redundant_log_monitors(redis_address):
is_same_redis = "--redis-address={}".format(redis_address)
if is_log_monitor and is_same_redis in cmdline:
log_monitor_processes.append(proc)
except psutil.AccessDenied:
# psutil may encounter AccessDenied exceptions
# when it's trying to visit core services
except (psutil.AccessDenied, psutil.ZombieProcess, psutil.ProcessLookupError):
# psutil may encounter AccessDenied or ZombieProcess exceptions
# when it's trying to visit some MacOS core services
if psutil.MACOS:
continue
else:
raise
raise Exception("List process with list2cmdline failed!")

if len(log_monitor_processes) > 1:
for proc in log_monitor_processes[1:]:
Expand Down

0 comments on commit 5fb06f6

Please sign in to comment.