I get a segmentation fault error when trying to initialize a TFLite interpreter on Edge TPU devices. Specifically, I have a Python script that uses the TFLite interpreter to load and execute models. I'm conducting this testing on multiple Edge TPU devices, specifically Google Coral Board Minis. The script functions correctly on one of the devices but results in a segmentation fault on all the others, despite my belief that both devices share the same environment (Python version, pip version, tflite_runtime version, installed packages, and hardware).

Here's a simplified code snippet that triggers this error:


import tflite_runtime.interpreter as tf

interpreter = tf.Interpreter(model_path='cloud_model.tflite', experimental_delegates=[tf.load_delegate('libedgetpu.so.1')])

What I've tried and observed:

  • The script itself doesn't contain any memory-related issues that would typically cause a segmentation fault.
  • If I initialize the interpreter with a different .tflite file on the non-working devices, it functions correctly. The segmentation fault only occurs with this specific model. However, this same model functions properly on one of the Edge TPU devices.
  • I ran my script on the non working devices with gdb and it returned the following:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ff5c691e0 (LWP 14894)]
[New Thread 0x7ff52a41e0 (LWP 14895)]
[New Thread 0x7ff08df1e0 (LWP 14896)]
[Thread 0x7ff08df1e0 (LWP 14896) exited]
[Thread 0x7ff52a41e0 (LWP 14895) exited]
[Thread 0x7ff5c691e0 (LWP 14894) exited]
[Detaching after fork from child process 14897]

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
0x0000007ff7d0c710 in strlen () from /lib/aarch64-linux-gnu/libc.so.6
  • I already ran sudo apt-get update and sudo apt-get upgrade

I am not sure how to proceed from here and I did not find any helpful answers online. Any insights or suggestions for further troubleshooting would be greatly appreciated.

0

There are 0 best solutions below