manager: remove old unkillable process handling (#29209)

This commit is contained in:
Adeeb Shihadeh 2023-08-01 22:18:58 -07:00 committed by GitHub
parent 663fc0d8fe
commit bc0aa1c598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 19 deletions

View File

@ -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}")

View File

@ -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"]),