Welcome back! Thank you for continuing your work on this! I’m running the 0.5.1-rc3
docker image.
After a day or two both of my cameras end up stuck again in Frigate.
I can see in the logs that Frigate tried to restart them on the 19th (in the logs) but it never seems to have restarted correctly. They’re both stuck on the same frame from two days ago when I view them under the debug view. I printed out the stacktrace for one of the camera PIDs. Any clues as to what might be happening, or what I can do to help debug?
(Logs +) Stacktrace for PID 53
(Camera)
2020-04-19T19:50:34.878070825Z Camera_process started for front_window: 52
2020-04-19T19:50:34.879669067Z Starting process for front_window: 52
2020-04-19T19:50:34.880408145Z Camera_process started for kitchen: 53
2020-04-19T19:50:34.882295102Z Starting process for kitchen: 53
2020-04-19T19:50:34.895233017Z * Serving Flask app "detect_objects" (lazy loading)
2020-04-19T19:50:34.895262905Z * Environment: production
2020-04-19T19:50:34.895271920Z WARNING: This is a development server. Do not use it in a production deployment.
2020-04-19T19:50:34.895313181Z Use a production WSGI server instead.
2020-04-19T19:50:34.895329698Z * Debug mode: off
2020-04-19T21:34:30.189080017Z Detection appears to be stuck. Restarting detection process
2020-04-19T21:34:30.189153304Z Waiting for detection process to exit gracefully...
2020-04-19T21:34:30.193837621Z /arrow/cpp/src/plasma/store.cc:738: Disconnecting client on fd 6
2020-04-19T21:34:30.198487157Z Starting detection process: 4952
2020-04-19T22:02:51.639817592Z Detection appears to be stuck. Restarting detection process
2020-04-19T22:02:51.640062443Z Waiting for detection process to exit gracefully...
2020-04-19T22:02:51.653388253Z /arrow/cpp/src/plasma/store.cc:738: Disconnecting client on fd 6
2020-04-19T22:02:51.657573892Z Starting detection process: 6282
2020-04-21T15:02:15.361813649Z File "detect_objects.py", line 345, in <module>
2020-04-21T15:02:15.361926332Z main()
2020-04-21T15:02:15.361959646Z File "detect_objects.py", line 226, in main
2020-04-21T15:02:15.361987049Z camera_process['process'].start()
2020-04-21T15:02:15.362012862Z File "/usr/lib/python3.7/multiprocessing/process.py", line 112, in start
2020-04-21T15:02:15.362040043Z self._popen = self._Popen(self)
2020-04-21T15:02:15.362065738Z File "/usr/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
2020-04-21T15:02:15.362136637Z return _default_context.get_context().Process._Popen(process_obj)
2020-04-21T15:02:15.362162303Z File "/usr/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
2020-04-21T15:02:15.362185427Z return Popen(process_obj)
2020-04-21T15:02:15.362206838Z File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
2020-04-21T15:02:15.362230287Z self._launch(process_obj)
2020-04-21T15:02:15.362253211Z File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 74, in _launch
2020-04-21T15:02:15.362277139Z code = process_obj._bootstrap()
2020-04-21T15:02:15.362299507Z File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
2020-04-21T15:02:15.362323081Z self.run()
2020-04-21T15:02:15.362344309Z File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
2020-04-21T15:02:15.362368016Z self._target(*self._args, **self._kwargs)
2020-04-21T15:02:15.362389778Z File "/opt/frigate/frigate/video.py", line 288, in track_camera
2020-04-21T15:02:15.362412560Z region_detections = object_detector.detect(tensor_input)
2020-04-21T15:02:15.362434109Z File "/opt/frigate/frigate/edgetpu.py", line 125, in detect
2020-04-21T15:02:15.362456385Z self.detection_queue.put(now)
2020-04-21T15:02:15.362478065Z File "/usr/lib/python3.7/multiprocessing/queues.py", line 364, in put
2020-04-21T15:02:15.362501428Z self._writer.send_bytes(obj)
2020-04-21T15:02:15.362523727Z File "/usr/lib/python3.7/multiprocessing/connection.py", line 200, in send_bytes
2020-04-21T15:02:15.362546679Z self._send_bytes(m[offset:offset + size])
2020-04-21T15:02:15.362569343Z File "/usr/lib/python3.7/multiprocessing/connection.py", line 404, in _send_bytes
2020-04-21T15:02:15.362592833Z self._send(header + buf)
2020-04-21T15:02:15.362615238Z File "/usr/lib/python3.7/multiprocessing/connection.py", line 368, in _send
2020-04-21T15:02:15.362637822Z n = write(self._handle, buf)
Stacktrace for the PID 6282
(Coral)
2020-04-21T15:11:46.088297658Z File "/usr/lib/python3.7/threading.py", line 890, in _bootstrap
2020-04-21T15:11:46.088351837Z self._bootstrap_inner()
2020-04-21T15:11:46.088367114Z File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
2020-04-21T15:11:46.088379308Z self.run()
2020-04-21T15:11:46.088390145Z File "detect_objects.py", line 98, in run
2020-04-21T15:11:46.088401370Z self.tflite_process.start_or_restart()
2020-04-21T15:11:46.088412543Z File "/opt/frigate/frigate/edgetpu.py", line 108, in start_or_restart
2020-04-21T15:11:46.088423928Z self.detect_process.start()
2020-04-21T15:11:46.088434357Z File "/usr/lib/python3.7/multiprocessing/process.py", line 112, in start
2020-04-21T15:11:46.088445725Z self._popen = self._Popen(self)
2020-04-21T15:11:46.088455881Z File "/usr/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
2020-04-21T15:11:46.088466995Z return _default_context.get_context().Process._Popen(process_obj)
2020-04-21T15:11:46.088477630Z File "/usr/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
2020-04-21T15:11:46.088488581Z return Popen(process_obj)
2020-04-21T15:11:46.088499729Z File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
2020-04-21T15:11:46.088511156Z self._launch(process_obj)
2020-04-21T15:11:46.088521721Z File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 74, in _launch
2020-04-21T15:11:46.088533398Z code = process_obj._bootstrap()
2020-04-21T15:11:46.088544383Z File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
2020-04-21T15:11:46.088555612Z self.run()
2020-04-21T15:11:46.088566245Z File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
2020-04-21T15:11:46.088577975Z self._target(*self._args, **self._kwargs)
2020-04-21T15:11:46.088589062Z File "/opt/frigate/frigate/edgetpu.py", line 71, in run_detector
2020-04-21T15:11:46.088600143Z object_id_str = detection_queue.get()
2020-04-21T15:11:46.088610855Z File "/usr/lib/python3.7/multiprocessing/queues.py", line 351, in get
2020-04-21T15:11:46.088621694Z with self._rlock:
2020-04-21T15:11:46.088631620Z File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 95, in __enter__
2020-04-21T15:11:46.088642857Z return self._semlock.__enter__()
/debug/stats
{
"coral": {
"detection_start": 0,
"fps": 0,
"inference_speed": 8.01,
"pid": 6282
},
"front_window": {
"camera_fps": 0,
"detection_fps": 0,
"ffmpeg_pid": 41,
"frame_info": {
"detect": 1587341586.383989,
"process": 1587341516.53733,
"read": 1587362375.199723
},
"pid": 52,
"process_fps": 0.1,
"read_start": 0,
"skipped_fps": 0
},
"kitchen": {
"camera_fps": 11.9,
"detection_fps": 0,
"ffmpeg_pid": 50,
"frame_info": {
"detect": 1587341465.266168,
"process": 1587341335.084925,
"read": 1587481598.93786
},
"pid": 53,
"process_fps": 0.1,
"read_start": 0,
"skipped_fps": 11.9
},
"plasma_store_rc": null
}
ffmpeg config:
ffmpeg:
global_args:
- -hide_banner
- -loglevel
- panic
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -vsync
- drop
- -use_wallclock_as_timestamps
- '1'
output_args:
- -f
- rawvideo
- -pix_fmt
- rgb24