Skip to content

Commit

Permalink
Add temporary logging to see if that's useful
Browse files Browse the repository at this point in the history
  • Loading branch information
benjyw committed Apr 2, 2023
1 parent 898c216 commit f8d6c7b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/python/pants/pantsd/process_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

from __future__ import annotations

import datetime
import logging
import os
import signal
import subprocess
import sys
import time
import traceback
Expand Down Expand Up @@ -381,6 +383,16 @@ def is_alive(self, extended_check=None):
"""
try:
process = self._as_process()
if process:
print(
f"{str(datetime.datetime.now())} 111111111111 "
f"Process state: id={process.pid}, status={process.status()}, "
f"process_name={self.process_name}, "
f"computed process_name={self._get_process_name(process)}"
)
print("XXXXXXX " + subprocess.check_output(["strace", "-p", f"{process.pid}"]))
else:
print(f"{str(datetime.datetime.now())} 22222222222 Process is None, somehow")
return not (
# Can happen if we don't find our pid.
(not process)
Expand Down

0 comments on commit f8d6c7b

Please sign in to comment.