Skip to content

Commit

Permalink
Aborting OOM update if the process has terminated
Browse files Browse the repository at this point in the history
  • Loading branch information
PalNilsson committed Nov 26, 2024
1 parent 9141f27 commit ed52d3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pilot/util/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ def update_oom_info(bash_pid, payload_cmd):
return

fname = f"/proc/{payload_pid}/oom_score"
# abort if the file does not exist
if not os.path.exists(fname):
logger.warning(f'oom_score file does not exist: {fname} (abort)')
return

fname_adj = fname + "_adj"
payload_score = get_score(payload_pid) if payload_pid else 'UNKNOWN'
pilot_score = get_score(os.getpid())
Expand Down

0 comments on commit ed52d3f

Please sign in to comment.