segfault when trying to load tflite model in classification example
Closed this issue · 2 comments
boxerab commented
This is on dev-0.7
branch, x86, with r2inference built with tflite backend.
Command:
gdb --arg ./classification -b tflite -m /home/aaron/models/inception_v4_299_quant_20181026/inception_v4_299_quant.tflite
.tflite frozen model from here
Stack trace:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7fa1e15 in gst_backend_install_properties (klass=<optimized out>,
code=r2i::TFLITE) at /usr/include/c++/9/bits/unique_ptr.h:352
352 get() const noexcept
(gdb) bt
#0 0x00007ffff7fa1e15 in gst_backend_install_properties(GstBackendClass*, r2i::FrameworkCode) (klass=<optimized out>, code=r2i::TFLITE)
at /usr/include/c++/9/bits/unique_ptr.h:352
#1 0x00007ffff7e18201 in g_type_class_ref ()
at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#2 0x00007ffff7dfdb38 in g_object_new_with_properties ()
at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#3 0x00007ffff7dfe5f1 in g_object_new ()
at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4 0x00007ffff7fac3c1 in gst_video_inference_set_backend
(self=<optimized out>, backend=2)
at ../gst-libs/gst/r2inference/gstvideoinference.c:1411
#5 0x00007ffff7fadb3e in gst_video_inference_set_property
(object=0x5555560db0f0, property_id=1, value=0x7fffffffc0f0, pspec=0x555555587d20) at ../gst-libs/gst/r2inference/gstvideoinference.c:314
#6 0x00007ffff7dfe83e in g_object_setv ()
at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7 0x00007ffff7dff7af in g_object_set_property ()
at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8 0x00007ffff7f14bc0 in gst_parse_element_set
(value=0x55555607b470 "backend", element=0x5555560db0f0, graph=<optimized out>) at ./grammar.y:441
michaelgruner commented
@tvlenin I don't believe this matches your theory about the segfault being caused by the quantized model. It's crashing installing the backend properties, it hasn't even loaded the model yet.
boxerab commented
@michaelgruner I've update r2inference to dev-0.8, and also used the inception model that you've provided, and this crash has gone away.