From bc0aa1c59865645ea40f8b26fd2fc2cc58a7eb92 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 1 Aug 2023 22:18:58 -0700 Subject: [PATCH] manager: remove old unkillable process handling (#29209) --- selfdrive/manager/process.py | 21 ++++----------------- selfdrive/manager/process_config.py | 3 +-- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/selfdrive/manager/process.py b/selfdrive/manager/process.py index b5f1e7a71a..76a49eda5b 100644 --- a/selfdrive/manager/process.py +++ b/selfdrive/manager/process.py @@ -17,7 +17,6 @@ from common.basedir import BASEDIR from common.params import Params from common.realtime import sec_since_boot from system.swaglog import cloudlog -from system.hardware import HARDWARE from cereal import log WATCHDOG_FN = "/dev/shm/wd_" @@ -67,7 +66,6 @@ def join_process(process: Process, timeout: float) -> None: class ManagerProcess(ABC): - unkillable = False daemon = False sigkill = False onroad = True @@ -132,22 +130,11 @@ class ManagerProcess(ABC): join_process(self.proc, 5) - # If process failed to die send SIGKILL or reboot + # If process failed to die send SIGKILL if self.proc.exitcode is None and retry: - if self.unkillable: - cloudlog.critical(f"unkillable process {self.name} failed to exit! rebooting in 15 if it doesn't die") - join_process(self.proc, 15) - - if self.proc.exitcode is None: - cloudlog.critical(f"unkillable process {self.name} failed to die!") - os.system("date >> /data/unkillable_reboot") - os.sync() - HARDWARE.reboot() - raise RuntimeError - else: - cloudlog.info(f"killing {self.name} with SIGKILL") - self.signal(signal.SIGKILL) - self.proc.join() + cloudlog.info(f"killing {self.name} with SIGKILL") + self.signal(signal.SIGKILL) + self.proc.join() ret = self.proc.exitcode cloudlog.info(f"{self.name} is dead with {ret}") diff --git a/selfdrive/manager/process_config.py b/selfdrive/manager/process_config.py index 71f63175fa..f151a51d10 100644 --- a/selfdrive/manager/process_config.py +++ b/selfdrive/manager/process_config.py @@ -30,8 +30,7 @@ def qcomgps(started, params, CP: car.CarParams) -> bool: return started and not ublox_available() procs = [ - # due to qualcomm kernel bugs SIGKILLing camerad sometimes causes page table corruption - NativeProcess("camerad", "system/camerad", ["./camerad"], unkillable=True, callback=driverview), + NativeProcess("camerad", "system/camerad", ["./camerad"], callback=driverview), NativeProcess("clocksd", "system/clocksd", ["./clocksd"]), NativeProcess("logcatd", "system/logcatd", ["./logcatd"]), NativeProcess("proclogd", "system/proclogd", ["./proclogd"]),