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

NativeCrash SIGBUS(BUS_ADRERR) when read/write on all kinds of Android devices #1474

Open
fzzwork opened this issue Jan 17, 2025 · 1 comment

Comments

@fzzwork
Copy link

fzzwork commented Jan 17, 2025

The language of MMKV

Java

The version of MMKV

v1.3.2

The platform of MMKV

Android(8~15)

The installation of MMKV

Git clone

What's the issue?

Native crash report, SIGBUS(BUS_ADRERR) happened when read/write on all kinds of Android devices

What's the log of MMKV when that happened?

解出符号(decode)

0
#00 pc 000000000005a544 armv8_crc32 (/data/orange-ci/workspace/Core/crc32/crc32_armv8.cpp:115) [arm64-v8a]
1
#1 pc 000000000003de7c checkFileCRCValid (/data/orange-ci/workspace/Core/MMKV.cpp:414) [arm64-v8a]
2
#2 pc 0000000000047fac checkDataValid (/data/orange-ci/workspace/Core/MMKV_IO.cpp:259) [arm64-v8a]
3
#3 pc 0000000000047818 loadFromFile (/data/orange-ci/workspace/Core/MMKV_IO.cpp:75) [arm64-v8a]
4
#4 pc 0000000000048998 checkLoadData (/data/orange-ci/workspace/Core/MMKV_IO.cpp:296) [arm64-v8a]
5
#5 pc 000000000004a18c getRawDataForKey (/data/orange-ci/workspace/Core/MMKV_IO.cpp:532) [arm64-v8a]
6
#6 pc 000000000003fc1c getBool (/data/orange-ci/workspace/Core/MMKV.cpp:795) [arm64-v8a]
7
#7 pc 00000000000373e4 decodeBool (../../../../src/main/cpp/native-bridge.cpp:491) [arm64-v8a]
8
#8 pc 000000000067e088 /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/oat/arm64/base.odex (art_jni_trampoline+168) [arm64-v8a::00000000000000000000000000000000]

解出符号(encode)

0
#00 pc 000000000005a544 armv8_crc32 (/data/orange-ci/workspace/Core/crc32/crc32_armv8.cpp:115) [arm64-v8a]
1
#1 pc 000000000003de7c checkFileCRCValid (/data/orange-ci/workspace/Core/MMKV.cpp:414) [arm64-v8a]
2
#2 pc 0000000000047fac checkDataValid (/data/orange-ci/workspace/Core/MMKV_IO.cpp:259) [arm64-v8a]
3
#3 pc 0000000000047818 loadFromFile (/data/orange-ci/workspace/Core/MMKV_IO.cpp:75) [arm64-v8a]
4
#4 pc 0000000000048998 checkLoadData (/data/orange-ci/workspace/Core/MMKV_IO.cpp:296) [arm64-v8a]
5
#5 pc 000000000004a18c getRawDataForKey (/data/orange-ci/workspace/Core/MMKV_IO.cpp:532) [arm64-v8a]
6
#6 pc 000000000003f2ec getString (/data/orange-ci/workspace/Core/MMKV.cpp:704) [arm64-v8a]
7
#7 pc 0000000000037f60 decodeString (../../../../src/main/cpp/native-bridge.cpp:639) [arm64-v8a]

未解出符号(decode)


Crash type: 'native'
Start time: '2025-01-16T20:35:23.174+0800'
Crash time: '2025-01-16T20:35:24.493+0800'
Rooted: 'No'
API level: '29'
Build fingerprint: 'vivo/PD1831/PD1831:10/QP1A.190711.020/compiler10111745:user/release-keys'
ABI: 'arm64'
pid: 12541, tid: 12639, name: thread_sp_norma >>> com.tencent.mobileqq <<<
signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x77c1fb2000
x0 0000000000000000 x1 00000077c1fb1fc8 x2 0000000000017e8e x3 0000000000000003
x4 0000000000000168 x5 00000077c5d3ecdd x6 000000000003fe92 x7 0000000000040000
x8 00000000626b5ad3 x9 00000077c1fb2008 x10 755f79656b5f7869 x11 54656f515566505f
x12 31373933325f7965 x13 000000007ff000fe x14 0000000000000000 x15 00000000000000ff
x16 00000077ba5f9550 x17 00000077ba5b1e40 x18 f457687a182866d3 x19 0000000085a5be75
x20 00000077744795e0 x21 000000778f7f7d04 x22 000000778f7fc020 x23 000000778f7fc020
x24 000000778f7fc020 x25 00000077443d10e0 x26 00000077ba7a98b0 x27 0000000000000005
x28 0000000000000002 x29 000000778f7f7c40
sp 000000778f7f7c40 lr 00000077ba5b1e80 pc 00000077ba5ce544

backtrace:
#00 pc 000000000005a544 /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so
#1 pc 000000000003de7c /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so (_ZN4MMKV17checkFileCRCValidEmj+60)
#2 pc 0000000000047fac /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so (ZN4MMKV14checkDataValidERbS0+384)
#3 pc 0000000000047818 /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so (_ZN4MMKV12loadFromFileEv+168)
#4 pc 0000000000048998 /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so (_ZN4MMKV13checkLoadDataEv+84)
#5 pc 000000000004a18c /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so (_ZN4MMKV16getRawDataForKeyERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE+44)
#6 pc 000000000003fc1c /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so (_ZN4MMKV7getBoolERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEbPb+148)
#7 pc 00000000000373e4 /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/lib/arm64/libmmkv.so
#8 pc 000000000067e088 /data/app/com.tencent.mobileqq--5e_VQHsz7Wv2muY3appMQ==/oat/arm64/base.odex (art_jni_trampoline+168)
#9 pc 0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)

未解出符号(encode)


Crash type: 'native'
Start time: '2025-01-17T15:10:38.652+0800'
Crash time: '2025-01-17T17:00:43.590+0800'
App version: '9.1.35.8708'
Rooted: 'No'
API level: '30'
Build fingerprint: 'OPPO/PCHM10/OP4A4D:11/RKQ1.200903.002/1652688527676:user/release-keys'
ABI: 'arm64'
pid: 5683, tid: 5683, name: encent.mobileqq >>> com.tencent.mobileqq <<<
signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x763c272000
x0 0000000000000000 x1 000000763c271fc8 x2 00000000000286ad x3 0000000000000004
x4 00000000000000b5 x5 00000076c288a2d5 x6 00000000001b06b1 x7 0000000000200000
x8 00000000d2007c28 x9 000000763c272008 x10 2e0074006e006500 x11 690062006f006d00
x12 0000740063006900 x13 0000000000000034 x14 b400007572704900 x15 ffffffffffffffff
x16 00000076b8aca550 x17 00000076b8a82e40 x18 e6c4f8c928fb6f76 x19 00000000ca3251c3
x20 b40000767dfe4b20 x21 0000007fde369514 x22 00000077c3881000 x23 00000077c3881000
x24 00000077c3881000 x25 b40000767df2e320 x26 b40000767dfe4b20 x27 00000000a02e9830
x28 0000000000000000 x29 0000007fde369450
sp 0000007fde369450 lr 00000076b8a82e80 pc 00000076b8a9f544

backtrace:
#00 pc 000000000005a544 /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so
#1 pc 000000000003de7c /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so (_ZN4MMKV17checkFileCRCValidEmj+60)
#2 pc 0000000000047fac /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so (ZN4MMKV14checkDataValidERbS0+384)
#3 pc 0000000000047818 /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so (_ZN4MMKV12loadFromFileEv+168)
#4 pc 0000000000048998 /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so (_ZN4MMKV13checkLoadDataEv+84)
#5 pc 000000000004a18c /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so (_ZN4MMKV16getRawDataForKeyERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE+44)
#6 pc 000000000003f2ec /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so (_ZN4MMKV9getStringERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERS6_b+148)
#7 pc 0000000000037f60 /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/lib/arm64/libmmkv.so
#8 pc 0000000000be4ecc /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/oat/arm64/base.odex (art_jni_trampoline+188)
#9 pc 0000000001ea266c /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/oat/arm64/base.odex (com.tencent.mobileqq.qmmkv.v2.CloseableMMKV.getString+572)
#10 pc 0000000001e99dac /data/app/~~K1xVjN9Sy-7Jk8Fv0oZP7A==/com.tencent.mobileqq-l9-VR3ecPN8jTKoA3YDHkw==/oat/arm64/base.odex (com.tencent.mobileqq.qmmkv.MMKVOptionEntity.decodeString+1036)
#11 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)

@lingol
Copy link
Collaborator

lingol commented Jan 17, 2025

signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x763c272000

The disk is likely almost full, or the file has some bad records on the disk. Check your logs for possible leads on these two assumptions.
If you are building MMKV by source code, you can try cherry-picking these two commits on the dev_namsespace branch to see if it helps.
aad8e48 and ead3e46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants