blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.94k stars 1.73k forks source link

[Support]: #2268

Closed pbix closed 2 years ago

pbix commented 2 years ago

Describe the problem you are having

"Fatal Python error: Bus error" detected in log files.

I am not sure what is the meaning of these messages and if they might be related to my cameras occasionally going offline.

Version

0.9.4-26ae608

Frigate config file

mqtt:
  host: 192.168.2.190
  user: paul
  password: xxxxxxx

logger:
  default: info

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

  output_args:
    # Optional: output args for detect streams (default: shown below)
    #detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    #record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
    rtmp: -c copy -f flv -flvflags no_duration_filesize

rtmp:
  enabled: True

snapshots:
  enabled: True
  timestamp: false
  bounding_box: true
  retain:
    default: 3

# Required
cameras:
  # Required: name of the camera
  basementnorth:

    ffmpeg:
      # Required: A list of input streams for the camera. See documentation for more information.

      inputs:
        # Required: the path to the stream
        # NOTE: path may include environment variables, which must begin with 'FRIGATE_' and be referenced in {}
        # https://github.com/roleoroleo/yi-hack-Allwinner-v2
        - path: rtsp://192.168.2.241/ch0_0.h264
          # Required: list of roles for this stream. valid values are: detect,record,rtmp
          # NOTICE: In addition to assigning the record, and rtmp roles,
          # they must also be enabled in the camera config.
          roles:
            - record

        - path: rtsp://192.168.2.241/ch0_1.h264
          roles:
            - detect
            - rtmp

    detect:
      width: 640
      height: 360
      fps: 20

  dogdoor:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.2.224:80/live/1/h264.sdp
          roles:
            - detect
            - rtmp

        - path: rtsp://192.168.2.224:80/live/0/h264.sdp
          roles:
            - record
    detect:
      width: 768
      height: 432
      fps: 5

  frontdoor:

    ffmpeg:
      inputs:
        - path: rtsp://admin:xxxxxxxx@192.168.2.122:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
          roles:
            - rtmp

        - path: rtsp://admin:xxxxxxxx@192.168.2.122:554/cam/realmonitor?channel=1&subtype=0&authbasic=64
          roles:
            - detect
            - record

    detect:
      width: 2560
      height: 1920
      fps: 15

    motion:
      mask:    
        - 2560,0,2533,966,1722,918,1719,714,1243,733,0,1309,0,0
        - 1897,1227,2102,1230,2112,994,1962,948

record:
  enabled: true
  retain_days: 0
  events:
    retain:
      default: 10

# Optional: Object configuration
# NOTE: Can be overridden at the camera level
objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - dog
    - cat
    - car

Relevant log output

Fatal Python error: Bus error

Thread 0x00007fc57513e700 (most recent call first):
  File "/usr/lib/python3.8/threading.py", line 302 in wait
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed
  File "/usr/lib/python3.8/threading.py", line 870 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Thread 0x00007fc576047700 (most recent call first):
  File "/usr/lib/python3.8/threading.py", line 302 in wait
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed
  File "/usr/lib/python3.8/threading.py", line 870 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Thread 0x00007fc5970a4700 (most recent call first):
  File "/opt/frigate/frigate/log.py", line 65 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Current thread 0x00007fc5978a5700 (most recent call first):
  File "/opt/frigate/frigate/video.py", line 150 in capture_frames
  File "/opt/frigate/frigate/video.py", line 290 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Thread 0x00007fc5980a6700 (most recent call first):
  File "/usr/lib/python3.8/multiprocessing/synchronize.py", line 261 in wait
  File "/usr/lib/python3.8/multiprocessing/synchronize.py", line 349 in wait
  File "/opt/frigate/frigate/video.py", line 215 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Thread 0x00007fc57f5eb700 (most recent call first):
  File "/opt/frigate/frigate/log.py", line 65 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Thread 0x00007fc59e4bc740 (most recent call first):
  File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock
  File "/usr/lib/python3.8/threading.py", line 1011 in join
  File "/opt/frigate/frigate/video.py", line 321 in capture_camera
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__
  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen
  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen
  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start
  File "/opt/frigate/frigate/app.py", line 255 in start_camera_capture_processes
  File "/opt/frigate/frigate/app.py", line 330 in start
  File "/opt/frigate/frigate/__main__.py", line 17 in <module>
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main

FFprobe output from your camera

ffprobe "rtsp://admin:xxxxxx@192.168.2.122:554/cam/realmonitor?channel=1&subtype=0&authbasic=64"
ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, rtsp, from 'rtsp://admin:xxxxx@192.168.2.122:554/cam/realmonitor?channel=1&subtype=0&authbasic=64':
  Metadata:
    title           : Media Server
  Duration: N/A, start: 0.069000, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuv420p(progressive), 2560x1920, 15 fps, 100 tbr, 90k tbn, 30 tbc
    Stream #0:1: Audio: aac (LC), 8000 Hz, mono, fltp

Frigate stats

Could not find this file.

Operating system

Other Linux

Install method

Docker CLI

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Amcrest D410, TriVision NC-350W, Yi 1080p Home

Any other information that may be helpful

No response

blakeblackshear commented 2 years ago

https://docs.frigate.video/faqs/#fatal-python-error-bus-error

Makin-Things commented 2 years ago

Could you please clarify the shm_size calculation. After calculating the size for each camera do you then need to add these together to get to the final size?

blakeblackshear commented 2 years ago

After calculating the size for each camera do you then need to add these together to get to the final size?

Yes

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.