Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault when calling Provider Host CPU #9874

Closed
fazeeljunejo opened this issue Nov 29, 2021 · 3 comments
Closed

Segmentation Fault when calling Provider Host CPU #9874

fazeeljunejo opened this issue Nov 29, 2021 · 3 comments
Labels
more info needed issues that cannot be triaged until more information is submitted by the original user

Comments

@fazeeljunejo
Copy link

I am trying to use the C++ API to run an inference session but I keep running into a segmentation fault which links to the g_host _cpu pointer in provider_bridge_provider.cc.

Specs:
onnxruntime version: 1.8.2
OS: Ubuntu 18.0.4 (no sudo rights)
CPP version: c++14

Stack trace:

Program received signal SIGSEGV, Segmentation fault.
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
at /home/onnxruntime/onnxruntime/core/providers/shared_library/provider_bridge_provider.cc:64
64 ProviderHostCPU& g_host_cpu = g_host->GetProviderHostCPU();
(gdb) backtrace
#0 0x00007fffb1c5ba56 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
at /home/onnxruntime/onnxruntime/core/providers/shared_library/provider_bridge_provider.cc:64
#1 0x00007fffb1c5ba56 in _GLOBAL__sub_I_provider_bridge_provider.cc(void) ()
at /home/onnxruntime/onnxruntime/core/providers/shared_library/provider_bridge_provider.cc:577
#2 0x00007ffff7de38d3 in call_init (env=0x7fffffffd988, argv=0x7fffffffd978, argc=1, l=)
at dl-init.c:72
#3 0x00007ffff7de38d3 in _dl_init (main_map=0x7ffff7ffe170, argc=1, argv=0x7fffffffd978, env=0x7fffffffd988) at dl-init.c:119
#4 0x00007ffff7dd40ca in _dl_start_user () at /lib64/ld-linux-x86-64.so.2
#5 0x0000000000000001 in ()
#6 0x00007fffffffdd35 in ()
#7 0x0000000000000000 in ()

@askhade
Copy link
Contributor

askhade commented Nov 30, 2021

Can you try with the latest released version and see if you still run into this issue? Can you also add the code to repo this issue?

@askhade askhade added api:CC++ more info needed issues that cannot be triaged until more information is submitted by the original user labels Nov 30, 2021
@fazeeljunejo
Copy link
Author

It was a mix of a couple of things but I managed to fix it. The latest version (1.10.0 using wget on linux) worked when compiling on the same platform so that helped. Also the cross compilation fix mentioned in the release notes. Thanks anyway. You may close the issue.

@leejinxi
Copy link

leejinxi commented Jan 18, 2022

Can you try with the latest released version and see if you still run into this issue? Can you also add the code to repo this issue?

Hi ~
I compiled openvino4.2+onnx1.10 on CentOS 7 with gcc 7.3, and met this problem too.

gdb ./run_squeezenet

(gdb) set args --use_openvino squeezenet1.1-7.onnx demo.png synset.txt
(gdb) r
Starting program: /data/onnxruntime-1.10.0/build/Linux/Release/./run_squeezenet --use_openvino squeezenet1.1-7.onnx demo.png synset.txt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
at /data/onnxruntime-3.4/onnxruntime/core/providers/shared_library/provider_bridge_provider.cc:64
64 ProviderHostCPU& g_host_cpu = g_host->GetProviderHostCPU();
(gdb) print(g_host)
$1 = (onnxruntime::ProviderHost *) 0x0

Here is the ldd infos:

[root@VM-217-39-centos /data/onnxruntime/build/Linux/Release]# ldd ./run_squeezenet
linux-vdso.so.1 => (0x00007fffa90fb000)
libonnxruntime_providers_openvino.so (0x00007fa2ba33b000)
libonnxruntime_providers_shared.so (0x00007fa2ba139000)
libonnxruntime.so.1.10.0 (0x00007fa2b926c000)
libopencv_imgcodecs.so.4.5 => /opt/intel/openvino_2021.4.752/opencv/lib/libopencv_imgcodecs.so.4.5 (0x00007fa2b8fb8000)
libopencv_dnn.so.4.5 => /opt/intel/openvino_2021.4.752/opencv/lib/libopencv_dnn.so.4.5 (0x00007fa2b8917000)
libopencv_core.so.4.5 => /opt/intel/openvino_2021.4.752/opencv/lib/libopencv_core.so.4.5 (0x00007fa2b7859000)
libopencv_imgproc.so.4.5 => /opt/intel/openvino_2021.4.752/opencv/lib/libopencv_imgproc.so.4.5 (0x00007fa2b550e000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa2b5206000)
libm.so.6 => /lib64/libm.so.6 (0x00007fa2b4f04000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa2b4cee000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa2b4920000)
libinference_engine.so => /opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/lib/intel64/libinference_engine.so (0x00007fa2b453c000)
libinference_engine_c_api.so => /opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/lib/intel64/libinference_engine_c_api.so (0x00007fa2b42f0000)
libonnx_importer.so => /opt/intel/openvino_2021.4.752/deployment_tools/ngraph/lib/libonnx_importer.so (0x00007fa2b3d5d000)
libngraph.so => /opt/intel/openvino_2021.4.752/deployment_tools/ngraph/lib/libngraph.so (0x00007fa2b3431000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fa2b322d000)
librt.so.1 => /lib64/librt.so.1 (0x00007fa2b3025000)
libz.so.1 => /lib64/libz.so.1 (0x00007fa2b2e0f000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa2b2bf3000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa2ba5ac000)
libtbb.so.2 => /opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/external/tbb/lib/libtbb.so.2 (0x00007fa2b298b000)
libtbbmalloc.so.2 => /opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/external/tbb/lib/libtbbmalloc.so.2 (0x00007fa2b2730000)
libinference_engine_transformations.so => /opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/lib/intel64/libinference_engine_transformations.so (0x00007fa2b21e3000)
libonnx_proto.so => /opt/intel/openvino_2021.4.752/deployment_tools/ngraph/lib/libonnx_proto.so (0x00007fa2b1f7c000)
libprotobuf.so.3.7.1.0 => /opt/intel/openvino_2021.4.752/deployment_tools/ngraph/lib/libprotobuf.so.3.7.1.0 (0x00007fa2b1a75000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed issues that cannot be triaged until more information is submitted by the original user
Projects
None yet
Development

No branches or pull requests

3 participants