question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Support]: Failed to load delegate from libedgetpu.so.1.0

See original GitHub issue

Describe the problem you are having

Running the addon beta 0.11.0, fails to boot container.

Version

0.11.0-beta2

Frigate config file

mqtt:
  host: core-mosquitto
  topic_prefix: frigate
  user: xxx
  password: xxx
birdseye:
  enabled: false
objects:
  track:
  - person
#  - bicycle
  - car
  - truck
  - cat
  - dog
#  filters:
#    person:
#      min_area: 10000
#      max_area: 1000000
#      threshold: 0.92
detectors:
  coral:
    type: edgetpu
    device: usb
ffmpeg:
  hwaccel_args: []
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - nobuffer+genpts+discardcorrupt
    - -flags
    - low_delay
    - -strict
    - experimental
    - -analyzeduration
    - 1000M
    - -probesize
    - 1000M
    - -rw_timeout
    - "5000000"

cameras:
  kitchen:
    ffmpeg:
      inputs:
      - path: rtmp://192.168.1.213/bcs/channel0_main.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - record
        - rtmp
      - path: rtmp://192.168.1.252/bcs/channel0_sub.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - detect
    record:
      enabled: True
      retain:
        days: 0
      events:
        pre_capture: 5
        post_capture: 5
        retain:
          default: 14
        
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
        
  driveway:
    ffmpeg:
      inputs: 
      - path: rtmp://192.168.1.248/bcs/channel0_main.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - record
        - rtmp
      - path: rtmp://192.168.1.248/bcs/channel0_sub.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - detect

    zones:
      the_driveway_shadow:
        coordinates: 636,120,779,116,873,116,984,220,428,236,530,132
      the_driveway:
        coordinates: 1280,720,1280,618,1231,534,1147,419,1068,304,984,220,428,236,267,426,176,559,82,720
      front_left_yard:
        coordinates: 0,218,94,196,210,172,385,140,528,126,538,145,497,172,345,331,285,404,171,574,103,720,0,720
      front_right_yard:
        coordinates: 1145,325,1240,316,1193,316,1280,324,1280,153,1187,134,1066,121,950,116,870,117,942,181,1097,350
      street:
        coordinates: 204,167,355,144,526,126,701,118,863,115,1027,119,1177,131,1280,156,1280,0,0,0,0,220
        
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
      
    record:
      enabled: True
      retain:
        days: 14
      events:
        pre_capture: 5
        post_capture: 5
        
  backyard:
    ffmpeg:
      inputs: 
      - path: rtmp://192.168.1.142/bcs/channel0_main.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - record
        - rtmp
      - path: rtmp://192.168.1.142/bcs/channel0_sub.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - detect
        
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
      
    record:
      enabled: True
      retain:
        days: 14
      events:
        pre_capture: 5
        post_capture: 5

    zones:
      patio:
        coordinates: 0,720,1050,720,1075,677,1099,642,1116,594,1117,562,1093,523,1057,472,1003,409,968,382,935,354,860,296,832,248,785,220,663,203,497,263,457,0,0,0
      back_right_yard:
        coordinates: 1280,720,1042,720,1072,672,1102,630,1122,595,1114,558,1095,525,1053,471,1003,413,930,349,855,293,832,242,778,217,668,198,502,256,448,0,1280,0

  foyer:
    ffmpeg:
      inputs: 
      - path: rtmp://192.168.1.215/bcs/channel0_main.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - record
        - rtmp
      - path: rtmp://192.168.1.215/bcs/channel0_sub.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - detect
    record:
      enabled: True
      retain:
        days: 0
      events:
        pre_capture: 5
        post_capture: 5
        retain:
          default: 14
        
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True

  garage:
    ffmpeg:
      inputs: 
      - path: rtmp://192.168.1.112/bcs/channel0_main.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - record
        - rtmp
      - path: rtmp://192.168.1.112/bcs/channel0_sub.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - detect
    record:
      enabled: True
      retain:
        days: 0
      events:
        pre_capture: 5
        post_capture: 5
        retain:
          default: 14
        
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True

  floating:
    ffmpeg:
      inputs: 
      - path: rtmp://192.168.1.213/bcs/channel0_main.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - record
        - rtmp
      - path: rtmp://192.168.1.213/bcs/channel0_sub.bcs?channel=0&stream=0&user=xxx&password=xxx
        roles:
        - detect
    record:
      enabled: True
      retain:
        days: 0
      events:
        pre_capture: 5
        post_capture: 5
        retain:
          default: 14
        
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True

Relevant log output

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-05-26 18:37:42] frigate.app                    INFO    : Starting Frigate (0.11.0-d2c3cdc)
[2022-05-26 18:37:42] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2022-05-26 18:37:42] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-05-26 18:37:42] peewee_migrate                 INFO    : There is nothing to migrate
[2022-05-26 18:37:42] detector.coral                 INFO    : Starting detection process: 224
[2022-05-26 18:37:42] frigate.app                    INFO    : Output process started: 226
[2022-05-26 18:37:42] ws4py                          INFO    : Using epoll
[2022-05-26 18:37:42] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-05-26 18:37:42] frigate.app                    INFO    : Camera processor started for kitchen: 232
Process detector:coral:
[2022-05-26 18:38:08] frigate.edgetpu                ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
[2022-05-26 18:37:42] frigate.app                    INFO    : Camera processor started for driveway: 235
[2022-05-26 18:37:42] frigate.app                    INFO    : Camera processor started for backyard: 236
[2022-05-26 18:37:43] frigate.app                    INFO    : Camera processor started for foyer: 238
[2022-05-26 18:37:43] frigate.app                    INFO    : Camera processor started for garage: 240
[2022-05-26 18:37:43] frigate.app                    INFO    : Camera processor started for floating: 241
[2022-05-26 18:37:43] frigate.app                    INFO    : Capture process started for kitchen: 243
[2022-05-26 18:37:43] frigate.app                    INFO    : Capture process started for driveway: 246
[2022-05-26 18:37:43] frigate.app                    INFO    : Capture process started for backyard: 251
[2022-05-26 18:37:43] frigate.app                    INFO    : Capture process started for foyer: 258
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
    raise ValueError(capture.message)
ValueError
[2022-05-26 18:37:43] frigate.app                    INFO    : Capture process started for garage: 266
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
[2022-05-26 18:37:43] frigate.app                    INFO    : Capture process started for floating: 274
  File "/opt/frigate/frigate/edgetpu.py", line 135, in run_detector
    object_detector = LocalObjectDetector(
  File "/opt/frigate/frigate/edgetpu.py", line 43, in __init__
    edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
[2022-05-26 18:37:43] ws4py                          INFO    : Using epoll
[2022-05-26 18:38:13] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...
[2022-05-26 18:38:13] frigate.app                    INFO    : Stopping...
[2022-05-26 18:38:13] ws4py                          INFO    : Closing all websockets with [1001] 'Server is shutting down'
[2022-05-26 18:38:13] frigate.watchdog               INFO    : Exiting watchdog...
[2022-05-26 18:38:13] frigate.record                 INFO    : Exiting recording cleanup...
[2022-05-26 18:38:13] frigate.events                 INFO    : Exiting event cleanup...
[2022-05-26 18:38:13] frigate.object_processing      INFO    : Exiting object processor...
[2022-05-26 18:38:13] frigate.stats                  INFO    : Exiting watchdog...
[2022-05-26 18:38:13] frigate.events                 INFO    : Exiting event processor...
[2022-05-26 18:38:14] frigate.record                 INFO    : Exiting recording maintenance...
[2022-05-26 18:38:14] peewee.sqliteq                 INFO    : writer received shutdown request, exiting.
[2022-05-26 18:38:14] root                           INFO    : Waiting for detection process to exit gracefully...
[cmd] python3 exited 0
/usr/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 25 leaked shared_memory objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

FFprobe output from your camera

NA, camera's worked in Beta1

Frigate stats

Crashes before I have access to this.

Operating system

Debian

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

reolink

Any other information that may be helpful

camera name -> reolink camera model garage -> RLC-410-5mp floating -> C2-Pro foyer -> RLC-410-5mp kitchen -> RLC-422 driveway -> RLC-423 backyard -> RLC-423

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:54 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
forkineyecommented, Oct 6, 2022

@Jimmy-SafeCash I’m using close to the same setup as you. Proxmox->Ubuntu->Docker, but with the single core PCIe TPU. Didn’t see a new issue created by you, so posting here. I’m not sure if it was upgrading Proxmox 7 or Ubuntu 22.04 caused the issue, but disabling pcie_aspm in grub has fixed it for me so far.

Within /etc/default/grub add pcie_aspm=off to the default boot line, then run update-grub. I did Proxmox first and still experienced the issue, then changed grub in Ubuntu and it started working again. GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=off"

from https://github.com/google-coral/edgetpu/issues/345#issuecomment-1018129753

1reaction
Petro31commented, Oct 9, 2022

Updated to this version (not the beta), no longer seeing this issue. Closing. Anyone else who runs into this should open a separate issue.

Make sure you run with protection mode off. Other than that, I didn’t really adjust anything. No clue why I was getting the issues initially running with protection mode off.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to load delegate from libedgetpu.so.1.0 with ... - GitHub
ValueError : Failed to load delegate from libedgetpu.so.1.0 really is just due to the delegate library not being able to communicate with the ......
Read more >
Coral.ai Dev Board: ValueError: Failed to load delegate from ...
I solved this with the help of Google Support: If I stop the script with ctrl - c instead of ctrl - z...
Read more >
Build Coral for your platform
Failed to load delegate from libedgetpu.so.1link ... Failing to load the delegate is a very general error that can indicate a few issues...
Read more >
Coral USB inference not working on Windows 10 (ValueError
The last line, “ValueError: Failed to load delegate from edgetpu.dll” usually means that no Coral USB device could be recognized. (If you unplug ......
Read more >
Coral Pcie not detected in docker : r/unRAID - Reddit
format( ValueError: Failed to load delegate from libedgetpu.so.1.0 [2022-06-21 23:35:38] frigate.watchdog INFO : Detection appears to have ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found