Persistent Crashes on Android/armeabi-v7a
When testing onnxruntime v1.22.0 with several models on an armeabi-v7a Android device, I get the following crash, no matter how the model is loaded (memory/file-path). I'm using rust bindings via ort. And the model is exported from torch. I'm using onnxruntime Android library from Nuget.
06-17 10:41:34.696 4893 4893 F DEBUG : pid: 4744, tid: 4830, name: com.mush42.tts >>> com.mush42.tts <<<
06-17 10:41:34.696 4893 4893 F DEBUG : #00 pc 006d1322 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #01 pc 006cf10d /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #02 pc 006b5f3f /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #03 pc 006b62fd /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #04 pc 005f7f91 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #05 pc 005fb3c5 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #06 pc 0065811f /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #07 pc 005daadd /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk!libonnxruntime.so (offset 0x16f8000) (BuildId: 81ef71703e9f97ac9742d97aafc6c76980b09b87)
06-17 10:41:34.696 4893 4893 F DEBUG : #08 pc 0848d287 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (ort::session::builder::impl_commit::_$LT$impl$u20$ort..session..builder..SessionBuilder$GT$::commit_from_memory::h992de71bc0598e28+698)
06-17 10:41:34.696 4893 4893 F DEBUG : #09 pc 0848cee5 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (ort::session::builder::impl_commit::_$LT$impl$u20$ort..session..builder..SessionBuilder$GT$::commit_from_memory_directly::h6e40e553f4d8348f+200)
06-17 10:41:34.696 4893 4893 F DEBUG : #10 pc 083b34df /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tts::FlexTTSVoice::new_ja_jp::h7b9cf0d03db286e2+538)
06-17 10:41:34.696 4893 4893 F DEBUG : #11 pc 08138fbb /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (app_lib::run::_$u7b$$u7b$closure$u7d$$u7d$::h67074e82ba5aadeb+514)
06-17 10:41:34.696 4893 4893 F DEBUG : #12 pc 081a62e9 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::he8c1ee030bb7a4a2+10)
06-17 10:41:34.696 4893 4893 F DEBUG : #13 pc 080ce1cd /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (_$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3cad362caf784f49+22)
06-17 10:41:34.696 4893 4893 F DEBUG : #14 pc 080729a3 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tauri::app::setup::ha472b33d97e7b034+210)
06-17 10:41:34.696 4893 4893 F DEBUG : #15 pc 08071183 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tauri::app::App$LT$R$GT$::make_run_event_loop_callback::_$u7b$$u7b$closure$u7d$$u7d$::hdba91023f2bded6e+138)
06-17 10:41:34.696 4893 4893 F DEBUG : #16 pc 082112af /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tauri_runtime_wry::handle_event_loop::hc9fed375680f5c5f+574)
06-17 10:41:34.696 4893 4893 F DEBUG : #17 pc 082130b9 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tauri_runtime_wry::make_event_handler::_$u7b$$u7b$closure$u7d$$u7d$::hbd5beaf27067cc27+448)
06-17 10:41:34.696 4893 4893 F DEBUG : #18 pc 081073df /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tao::platform_impl::platform::EventLoop$LT$T$GT$::run_return::h57e8b2c231687f95+682)
06-17 10:41:34.696 4893 4893 F DEBUG : #19 pc 08109207 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tao::platform_impl::platform::EventLoop$LT$T$GT$::run::h5354859e1598a1de+6)
06-17 10:41:34.696 4893 4893 F DEBUG : #20 pc 08060cd3 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tao::event_loop::EventLoop$LT$T$GT$::run::h01e6c55425a02598+34)
06-17 10:41:34.696 4893 4893 F DEBUG : #21 pc 0821c9a5 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (_$LT$tauri_runtime_wry..Wry$LT$T$GT$$u20$as$u20$tauri_runtime..Runtime$LT$T$GT$$GT$::run::heaee8d4fa66391e6+84)
06-17 10:41:34.696 4893 4893 F DEBUG : #22 pc 08071559 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tauri::app::App$LT$R$GT$::run::h2e88291621b2bae0+400)
06-17 10:41:34.696 4893 4893 F DEBUG : #23 pc 08071675 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tauri::app::Builder$LT$R$GT$::run::h4e31a601703eab80+52)
06-17 10:41:34.696 4893 4893 F DEBUG : #24 pc 081c2799 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (app_lib::run::h4d3cba5263b18227+684)
06-17 10:41:34.696 4893 4893 F DEBUG : #25 pc 081a7e7b /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (core::ops::function::FnOnce::call_once::h8ca52f133e553920+4)
06-17 10:41:34.696 4893 4893 F DEBUG : #26 pc 080da8c1 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (_$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h173ee78230897725+4)
06-17 10:41:34.696 4893 4893 F DEBUG : #27 pc 080d1783 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (std::panicking::try::do_call::h62a2eac51c2e03d6+10)
06-17 10:41:34.696 4893 4893 F DEBUG : #28 pc 08044589 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (__rust_try+12)
06-17 10:41:34.696 4893 4893 F DEBUG : #29 pc 0803f209 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (std::panic::catch_unwind::h217bd8c3cc4c7b4c+20)
06-17 10:41:34.696 4893 4893 F DEBUG : #30 pc 08138d51 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (app_lib::stop_unwind::h8549d1bdc48c9e2c+4)
06-17 10:41:34.696 4893 4893 F DEBUG : #31 pc 081c28a7 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (app_lib::_start_app::haa58e8e9f265901a+2)
06-17 10:41:34.696 4893 4893 F DEBUG : #32 pc 089234cb /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (tao::platform_impl::platform::ndk_glue::create::_$u7b$$u7b$closure$u7d$$u7d$::hdf224d7b69111812+478)
06-17 10:41:34.696 4893 4893 F DEBUG : #33 pc 08921b63 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (std::sys::backtrace::__rust_begin_short_backtrace::h9de407a66af22757+8)
06-17 10:41:34.696 4893 4893 F DEBUG : #34 pc 0891cae3 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hf2eb754e4c21ab35+66)
06-17 10:41:34.696 4893 4893 F DEBUG : #35 pc 0891a749 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (_$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hdf91a83fef819760+18)
06-17 10:41:34.696 4893 4893 F DEBUG : #36 pc 089178db /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (std::panicking::try::do_call::hb727dc8d9b92a960+24)
06-17 10:41:34.697 4893 4893 F DEBUG : #37 pc 0891cc9f /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (__rust_try+12)
06-17 10:41:34.697 4893 4893 F DEBUG : #38 pc 0891c3a5 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h5216336f52cee727+432)
06-17 10:41:34.697 4893 4893 F DEBUG : #39 pc 0891e2d1 /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h1142439e0a26ed07+6)
06-17 10:41:34.697 4893 4893 F DEBUG : #40 pc 08d5ce9b /data/app/~~XYZ1rSV7Wv3bPqJ28qEHiw==/com.mush42.tts-CKVVz1VmkMntYZI7aT86Ow==/base.apk (offset 0x199c8000) (std::sys::pal::unix::thread::Thread::new::thread_start::h8d72f5d7b803d925+18)
Have you already filed an issue with the ORT Rust repo? If it's happening with every model, the issue most likely originates from the Rust wrapper since we don't encounter this issue on Android devices with ORT. How are you loading the model or model file?
This is not a rust bindings issue, as the rust bindings can load some reference models fine.
The issue is that ONNXRuntime hard crashes on shape inference during load.
While infusing shape info in the model resolves the issue, ONNXRuntime should not crash and instead return a sensible error.
Best
Hey, thanks for the info -- could you provide more information on what in the shape inference is causing the issue or could you provide a sample ONNX model file to repro the issue? @mush4camb
@carzh Here's a model that causes the crash:
https://huggingface.co/mush42/optispeech/resolve/main/onnx/lightspeech/en-us/emily-step_400k.onnx
Best
@carzh any clues or updates?
Same here #25138
Applying stale label due to no activity in 30 days
Applying stale label due to no activity in 30 days
Closing issue due to no activity in 30 days