From 8c2f78b411eff15f8d3ac1fae8c89a89a39c388b Mon Sep 17 00:00:00 2001 From: George Tsiamasiotis Date: Thu, 3 Oct 2024 19:34:23 +0300 Subject: [PATCH] Make sure faulthandler is enabled in all processes This has no effect currently since we're using the fork start_method. However, when we inevidably switch to forkserver (either by choice, or by upgrading to python 3.14+) not having this makes for some really fun failure modes :D --- frigate/util/process.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frigate/util/process.py b/frigate/util/process.py index 6ab84dc76..ac15539fe 100644 --- a/frigate/util/process.py +++ b/frigate/util/process.py @@ -1,3 +1,4 @@ +import faulthandler import logging import multiprocessing as mp import signal @@ -73,6 +74,8 @@ class Process(BaseProcess): self.__log_queue = frigate.log.log_listener.queue def before_run(self) -> None: + faulthandler.enable() + def receiveSignal(signalNumber, frame): # Get the stop_event through the dict to bypass lazy initialization. stop_event = self.__dict__.get("stop_event")