Describe the bug
Application linked with release build of libonnxruntime.so crashes due to SIGBUS. Logcat output:
F/libc (30024): Fatal signal 7 (SIGBUS), code 1, fault addr 0xb7acf8a1 in tid 30024 (app)
I/DEBUG ( 194): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 194): Build fingerprint: 'lge/palman/palman:5.1/LMY47O.L017/1474611459:user/release-keys'
I/DEBUG ( 194): Revision: '11'
I/DEBUG ( 194): ABI: 'arm'
I/DEBUG ( 194): pid: 30024, tid: 30024, name: app >>> ./app <<<
I/DEBUG ( 194): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb7acf8a1
W/NativeCrashListener( 630): Couldn't find ProcessRecord for pid 30024
I/DEBUG ( 194): r0 b7b53938 r1 b7b53938 r2 b7b53940 r3 bed7e058
E/DEBUG ( 194): AM write failure (32 / Broken pipe)
I/DEBUG ( 194): r4 b7acf8a9 r5 b7acf8a1 r6 00000000 r7 bed7e038
I/DEBUG ( 194): r8 00000000 r9 00000008 sl b64c4dd4 fp bed7e050
I/DEBUG ( 194): ip b64c064c sp bed7e000 lr b649513b pc b6536a78 cpsr 20010030
I/DEBUG ( 194):
I/DEBUG ( 194): backtrace:
I/DEBUG ( 194): #00 pc 00069a78 /data/local/tmp/libonnxruntime.so
I/DEBUG ( 194): #01 pc 0002b137 /system/lib/libc.so (dlmalloc_real+3486)
I/DEBUG ( 194): #02 pc 0020f4f4 [heap]
I/DEBUG ( 194):
I/DEBUG ( 194): Tombstone written to: /data/tombstones/tombstone_00
I/BootReceiver( 630): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)
Urgency
None.
System information
- OS Platform and Distribution: Android 5.1 on arm-v7a (NDK versions 21 and 19 were tested).
- ONNX Runtime installed from source: yes.
- ONNX Runtime version: 1.3.0 (1.2.0 is affected too).
- Python version: none
- Visual Studio version (if applicable): not applicable.
- GCC/Compiler version (if compiling from source): clang from NDK version 21.
- CUDA/cuDNN version: not applicable.
- GPU model and memory: not applicable.
To Reproduce
- Describe steps/code to reproduce the behavior.
Code to reproduce:
const char *model_path = "ssd-10.onnx";
Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "somestring");
Ort::SessionOptions session_options;
session_options.SetIntraOpNumThreads(1);
session_options.SetGraphOptimizationLevel(ORT_ENABLE_BASIC);
Ort::Session session(env, model_path, session_options);
This is how I build libonnxruntime.so:
./build.sh --android --android_sdk_path /home/username/Android/Sdk/ --android_ndk_path /home/username/Android/Sdk/ndk/21.0.6113669/ --android_abi armeabi-v7a --android_api 21 --build_shared_lib --config Release
Expected behavior
InferenceSession is created without errors.
Screenshots
Not applicable.
Additional context
Debug build works fine.
Other models with NMS layers are affected too.
Describe the bug
Application linked with release build of libonnxruntime.so crashes due to SIGBUS. Logcat output:
Urgency
None.
System information
To Reproduce
Code to reproduce:
This is how I build libonnxruntime.so:
https://github.com/onnx/models/tree/master/vision/object_detection_segmentation/ssd
Expected behavior
InferenceSession is created without errors.
Screenshots
Not applicable.
Additional context
Debug build works fine.
Other models with NMS layers are affected too.