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

[Mobile] Not able to create session due to some package in armeabi-v7a #22965

Open
minh-nguyenhoang opened this issue Nov 28, 2024 · 3 comments
Labels
api:Java issues related to the Java API platform:mobile issues related to ONNX Runtime mobile; typically submitted using template

Comments

@minh-nguyenhoang
Copy link

Describe the issue

We are using Onnxruntime to deploy some image processing algorithms to mobile devices, when it is in debugging mode it works fine but when we release the production version, some devices reported really strange error when create session, at a glance it seem like the error come from some package that was built for armeabi-v7a. Sadly we do not have the tool to re-create the error, as all our test devices seem to work fine and we do not have access to the devices that reports the error. The error logs look like this:

[split_config.armeabi_v7a.apk] Java_ai_onnxruntime_OrtSession_createSession__JJ_3BJ
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 23451 >>> com.fzones.removeit <<<

backtrace:
  #00  pc 0x00000000003bac9e  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #01  pc 0x00000000003b89f3  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #02  pc 0x00000000003b7c43  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #03  pc 0x000000000039ea43  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #04  pc 0x000000000039ee5f  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #05  pc 0x00000000002da44d  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #06  pc 0x00000000002dd4f7  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #07  pc 0x00000000002bc90b  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #08  pc 0x00000000002bcb19  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk!libonnxruntime.so (BuildId: 180f910a3536e8cc5a1ce19936a409dbd877ecaa)
  #09  pc 0x00000000000095ad  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/split_config.armeabi_v7a.apk (Java_ai_onnxruntime_OrtSession_createSession__JJ_3BJ+84) (BuildId: 0a4f0eb583edeccc93eb9fe017fdcee5d7bae7ef)
  #10  pc 0x000000000016853d  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/oat/arm/base.odex (art_jni_trampoline+100)
  #11  pc 0x000000000030f9b7  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/oat/arm/base.odex (w4.b.<init>+1662)
  #12  pc 0x000000000034cc17  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/oat/arm/base.odex (com.flabs.remove_object.MainActivity.w+462)
  #13  pc 0x00000000004b4919  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/oat/arm/base.odex (qf.e.s+488)
  #14  pc 0x00000000004dc373  /data/app/~~rpKk7DrkjYyq0T45gIsC6w==/com.fzones.removeit-i55bIHc7CkBdQ3fu6UKQ9w==/oat/arm/base.odex (qf.d.onCreate+186)
  #15  pc 0x0000000000a07e49  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.Activity.performCreate+1104)
  #16  pc 0x000000000070a09f  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.Instrumentation.callActivityOnCreate+70)
  #17  pc 0x000000000081f751  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.ActivityThread.performLaunchActivity+2456)
  #18  pc 0x0000000000827c07  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.ActivityThread.handleLaunchActivity+1238)
  #19  pc 0x0000000000a156b1  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.servertransaction.LaunchActivityItem.execute+144)
  #20  pc 0x0000000000741b61  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.servertransaction.TransactionExecutor.executeCallbacks+2312)
  #21  pc 0x00000000007411bf  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.servertransaction.TransactionExecutor.execute+950)
  #22  pc 0x00000000008077b3  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.ActivityThread$H.handleMessage+1242)
  #23  pc 0x0000000000a8dfc9  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.os.Handler.dispatchMessage+144)
  #24  pc 0x0000000000a91013  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.os.Looper.loopOnce+882)
  #25  pc 0x0000000000a90c17  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.os.Looper.loop+1022)
  #26  pc 0x000000000081de9d  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (android.app.ActivityThread.main+2804)
  #27  pc 0x00000000000a4575  /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68)
  #28  pc 0x00000000005acf41  /apex/com.android.art/lib/libart.so (art_quick_invoke_static_stub+246)
  #29  pc 0x0000000000208c4f  /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+162)
  #30  pc 0x00000000004dd905  /apex/com.android.art/lib/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)4>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+1488)
  #31  pc 0x000000000046c953  /apex/com.android.art/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*) (.__uniq.165753521025965369065708152063621506277)+22)
  #32  pc 0x00000000003cc6e9  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (art_jni_trampoline+56)
  #33  pc 0x0000000000d7e1e7  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+118)
  #34  pc 0x0000000000d87a2f  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (com.android.internal.os.ZygoteInit.main+3622)
  #35  pc 0x00000000000a4575  /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68)
  #36  pc 0x00000000005acf41  /apex/com.android.art/lib/libart.so (art_quick_invoke_static_stub+246)
  #37  pc 0x0000000000208c4f  /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+162)
  #38  pc 0x00000000004df06f  /apex/com.android.art/lib/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+362)
  #39  pc 0x00000000003f3471  /apex/com.android.art/lib/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+400)
  #40  pc 0x0000000000076c5d  /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+28)
  #41  pc 0x000000000007fda7  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+602)
  #42  pc 0x00000000000026cb  /system/bin/app_process32 (main+1182)
  #43  pc 0x0000000000031eed  /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+56)

To reproduce

From the google report, the error occur in some devices like: Redmi A2+, Samsung J8, LG K20 (LM-420). Here are 2 onnx files that we use that cause the error: model1.onnx and model2.onnx

Urgency

Yes, it's urgent

Platform

Android

OS Version

29, 30, 31, 32, 33, 34

ONNX Runtime Installation

Released Package

Compiler Version (if 'Built from Source')

No response

Package Name (if 'Released Package')

onnxruntime-android

ONNX Runtime Version or Commit ID

1.20.0

ONNX Runtime API

Java/Kotlin

Architecture

ARM64

Execution Provider

NNAPI

Execution Provider Library Version

No response

@minh-nguyenhoang minh-nguyenhoang added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Nov 28, 2024
@github-actions github-actions bot added the api:Java issues related to the Java API label Nov 28, 2024
@skottmckay
Copy link
Contributor

Is this a 32-bit ARM device you're running on? armeabi_v7a is for 32-bit arm but you listed the architecture as ARM64.

You could try setting the log severity to VERBOSE and checking via logcat for an error message.

@minh-nguyenhoang
Copy link
Author

@skottmckay Sorry but we cannot reproduce the error on any of our test devices, everything works perfectly. The stacktrace is reported from Google Crash Analytics, which only show users device's name and Android SDK version. I've check through the list of affected devices and confirms that they all use arm-v8a chipset (atleast Cortex-A53 or upper), while not able to gather more infomation about the ROM version of the users.

@skottmckay
Copy link
Contributor

Unfortunately without a way to repro the issue we can't do much about it.

If the devices are arm-v8a, do you know why this is in the trace? split_config.armeabi_v7a.apk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:Java issues related to the Java API platform:mobile issues related to ONNX Runtime mobile; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants