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

Interpreter run crash #62240

Closed
lyz1005 opened this issue Oct 26, 2023 · 4 comments
Closed

Interpreter run crash #62240

lyz1005 opened this issue Oct 26, 2023 · 4 comments
Assignees
Labels
Android comp:lite TF Lite related issues stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF2.14 For issues related to Tensorflow 2.14.x type:bug Bug

Comments

@lyz1005
Copy link

lyz1005 commented Oct 26, 2023

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

2.14.0

Custom code

No

OS platform and distribution

No response

Mobile device

Android 14

Python version

No response

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

8Gen3

GPU model and memory

SM8650

Current behavior?


10-26 11:48:06.897823 6722 7142 D _V_EPM : Build fingerprint: 'vivo/PD2307/PD2307:14/UP1A.231005.007/compiler10260115:user/release-keys'
10-26 11:48:06.897823 6722 7142 D _V_EPM : Revision: '0'
10-26 11:48:06.897823 6722 7142 D _V_EPM : ABI: 'arm64'
10-26 11:48:06.897823 6722 7142 D _V_EPM : Timestamp: 2023-10-26 11:48:06.614691059+0800
10-26 11:48:06.897823 6722 7142 D _V_EPM : Process uptime: 2644s
10-26 11:48:06.897823 6722 7142 D _V_EPM : Cmdline: com.jingdong.app.mall
10-26 11:48:06.897823 6722 7142 D _V_EPM : pid: 20955, tid: 12166, name: ImageClassifyTh >>> com.jingdong.app.mall <<<
10-26 11:48:06.897823 6722 7142 D _V_EPM : uid: 10300
10-26 11:48:06.897823 6722 7142 D _V_EPM : tagged_addr_ctrl: 00000001 (PR_TAGGED_ADDR_ENABLE)
10-26 11:48:06.897823 6722 7142 D _V_EPM : pac_enabled_keys: 0000000
f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
10-26 11:48:06.897823 6722 7142 D _V_EPM : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000709f80e000
10-26 11:48:06.897823 6722 7142 D _V_EPM : x0 000000709f697f80 x1 000000709f80e000 x2 0000000000031000 x3 00000000
10-26 11:48:06.897823 6722 7142 D _V_EPM : x4 000000709f83f000 x5 000000709f6c8f80 x6 0000000000031000 x7 0000000000000020
10-26 11:48:06.897823 6722 7142 D _V_EPM : x8 000000709f80e000 x9 000000709f697f80 x10 0000000
0 x11 0000000000000022
10-26 11:48:06.897823 6722 7142 D _V_EPM : x12 0000007143d4b848 x13 0000007143d4b888 x14 ffffffffffe89f80 x15 00000000ebad6a89
10-26 11:48:06.897823 6722 7142 D _V_EPM : x16 0000007134e95b90 x17 00000073d8af2480 x18 0000006691b84000 x19 0000000000031000
10-26 11:48:06.897823 6722 7142 D _V_EPM : x20 00000000 x21 00000000 x22 000000703dffafe0 x23 0000007188a35850
10-26 11:48:06.897823 6722 7142 D _V_EPM : x24 000000703dffc000 x25 0000000000031000 x26 00000000 x27 0000000015ad2658
10-26 11:48:06.897823 6722 7142 D _V_EPM : x28 0000000
0 x29 000000703dffaee0
10-26 11:48:06.897823 6722 7142 D _V_EPM : lr 0000007134e8d8a4 sp 000000703dffae90 pc 00000073d8af2560 pst 00000000a0001000
10-26 11:48:06.897823 6722 7142 D _V_EPM : 32 total frames
10-26 11:48:06.897823 6722 7142 D _V_EPM : backtrace:
10-26 11:48:06.897823 6722 7142 D _V_EPM : #00 pc 000000000009d560 /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+224) (BuildId: 4425ba3ccfed552700ceb9be545d3599)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #1 pc 00000000000378a0 /apex/com.android.art/lib64/libjavacore.so (Memory_memmove(_JNIEnv*, _jclass*, _jobject*, int, _jobject*, int, long)+136) (BuildId: 669c662a8342cf22a2088ad204ebbc9d)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #2 pc 0000000000011ebc /system/framework/arm64/boot-core-libart.oat (art_jni_trampoline+156) (BuildId: b4f8ea6f20c11de7002804f101a922d4b869a7a3)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #3 pc 00000000001799fc /system/framework/arm64/boot.oat (java.nio.ByteBuffer.put+380) (BuildId: 8b4e4d5982e6b09d6b17d75175d3f3ad9f6c82aa)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #4 pc 00000000002922b8 /system/framework/arm64/boot.oat (java.nio.DirectByteBuffer.put+152) (BuildId: 8b4e4d5982e6b09d6b17d75175d3f3ad9f6c82aa)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #5 pc 000000000020a330 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #6 pc 0000000000097f48 anonymous:709977e000 (org.tensorflow.lite.TensorImpl.A+68)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #7 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #8 pc 0000000000097e9e anonymous:709977e000 (org.tensorflow.lite.TensorImpl.z+62)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #9 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #10 pc 00000000000969cc anonymous:709977e000 (org.tensorflow.lite.NativeInterpreterWrapper.D+96)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #11 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #12 pc 0000000000095992 anonymous:709977e000 (org.tensorflow.lite.g.d+10)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #13 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #14 pc 0000000000095d10 anonymous:709977e000 (org.tensorflow.lite.b.d+0)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #15 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #16 pc 0000000000095970 anonymous:709977e000 (org.tensorflow.lite.g.k+36)
10-26 11:48:06.897823 6722 7142 D _V_EPM : #17 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) <023>
10-26 11:48:06.897853 6722 7142 D _V_EPM : #18 pc 0000000000095cf8 anonymous:709977e000 (org.tensorflow.lite.b.k+0)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #19 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #20 pc 00000000000941b8 anonymous:709977e000 (.ImageClassifierQuantizedMobileNet.runInference+16)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #21 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #22 pc 000000000009362e anonymous:709977e000
10-26 11:48:06.897853 6722 7142 D _V_EPM : #23 pc 0000000000570afc /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+76) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #24 pc 0000000000573c18 /system/framework/arm64/boot-framework.oat (android.os.Looper.loopOnce+1080) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #25 pc 000000000057374c /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+572) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #26 pc 0000000000572a24 /system/framework/arm64/boot-framework.oat (android.os.HandlerThread.run+596) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #27 pc 00000000002109a4 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #28 pc 0000000000254770 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+176) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #29 pc 000000000067ebb4 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1408) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #30 pc 000000000010cbd8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+228) (BuildId: 4425ba3ccfed552700ceb9be545d3599)
10-26 11:48:06.897853 6722 7142 D _V_EPM : #31 pc 00000000000a64a4 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 4425ba3ccfed552700ceb9be545d3599) <024>

Standalone code to reproduce the issue

在Android14 设备,CPU 8Gen3 GPU SM8650 会出现,其他设备没有出现crash
Interpreter.Options tfliteOptions = new Interpreter.Options();
tfliteOptions.setNumThreads(3);
MappedByteBuffer tfliteModel = loadModelFile(context);
Interpreter tflite = new Interpreter(tfliteModel, tfliteOptions);
imgOut.clear();
imgOut.rewind();
tflite.run(imgData, imgOut);

Relevant log output

No response

@google-ml-butler google-ml-butler bot added the type:bug Bug label Oct 26, 2023
@LakshmiKalaKadali LakshmiKalaKadali added comp:lite TF Lite related issues Android TF2.14 For issues related to Tensorflow 2.14.x labels Nov 29, 2023
@pkgoogle
Copy link

pkgoogle commented Dec 1, 2023

Hi @lyz1005, are imgData & imgOut both ByteBuffers? TFLite takes the ByteBuffer's capacity as the ByteBuffer's size, so ensure that imgOut has the correct capacity for your model's output. Can you share your model file so that we may reproduce? If you can share a toy project (export to zip in android studio) which includes the model and more context around your code that would also be ideal as well. Also your output does not seem to log/show the crash, are you sure you don't have more relevant logs?

@pkgoogle pkgoogle added the stat:awaiting response Status - Awaiting response from author label Dec 1, 2023
Copy link

github-actions bot commented Dec 9, 2023

This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Dec 9, 2023
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android comp:lite TF Lite related issues stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF2.14 For issues related to Tensorflow 2.14.x type:bug Bug
Projects
None yet
Development

No branches or pull requests

3 participants