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

Get crash when call MMKV.clear when launch app #1169

Closed
shenglinW opened this issue Sep 6, 2023 · 5 comments
Closed

Get crash when call MMKV.clear when launch app #1169

shenglinW opened this issue Sep 6, 2023 · 5 comments

Comments

@shenglinW
Copy link

The language of MMKV

Kotlin

The version of MMKV

v1.2.16-static

The platform of MMKV

Android

The installation of MMKV

Maven

What's the issue?

get exception when call MMKV.clear

09-01 10:52:23.350 21123 21185 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 21185 (Alpha Thread #4), pid 21123 (anssnet.palmpay)
09-01 10:52:23.621 21196 21196 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-01 10:52:23.621 21196 21196 F DEBUG : Build fingerprint: 'Infinix/X680-OP/Infinix-X680:10/QP1A.190711.020/DE-OP-220822V461:user/release-keys'
09-01 10:52:23.621 21196 21196 F DEBUG : Revision: '0'
09-01 10:52:23.621 21196 21196 F DEBUG : ABI: 'arm'
09-01 10:52:23.621 21196 21196 F DEBUG : Timestamp: 2023-09-01 10:52:23+0800
09-01 10:52:23.621 21196 21196 F DEBUG : pid: 21123, tid: 21185, name: Alpha Thread #4 >>> com.transsnet.palmpay <<<
09-01 10:52:23.621 21196 21196 F DEBUG : uid: 10359
09-01 10:52:23.621 21196 21196 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-01 10:52:23.621 21196 21196 F DEBUG : Cause: null pointer dereference
09-01 10:52:23.621 21196 21196 F DEBUG : r0 00000000 r1 66a2919c r2 00000004 r3 995d6e68
09-01 10:52:23.621 21196 21196 F DEBUG : r4 a9fe07cc r5 00000001 r6 00000002 r7 66a291a0
09-01 10:52:23.621 21196 21196 F DEBUG : r8 00000000 r9 955dca00 r10 66a29358 r11 66a292dc
09-01 10:52:23.621 21196 21196 F DEBUG : ip 80000000 sp 66a29170 lr 800cdcdf pc a76101c8
09-01 10:52:24.399 21196 21196 F DEBUG :
09-01 10:52:24.399 21196 21196 F DEBUG : backtrace:
09-01 10:52:24.399 21196 21196 F DEBUG : #00 pc 0005d1c8 /apex/com.android.runtime/lib/bionic/libc.so (__memcpy_a53+184) (BuildId: dfc5cec3d85eb53950c282bb1b58fa02)
09-01 10:52:24.399 21196 21196 F DEBUG : #1 pc 00031cdb /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/lib/arm/libmmkv.so (BuildId: c48ff679696a28c04d8ef28cf86a772ec3a34e64)
09-01 10:52:24.399 21196 21196 F DEBUG : #2 pc 00030d5f /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/lib/arm/libmmkv.so (BuildId: c48ff679696a28c04d8ef28cf86a772ec3a34e64)
09-01 10:52:24.399 21196 21196 F DEBUG : #3 pc 00032c5d /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/lib/arm/libmmkv.so (BuildId: c48ff679696a28c04d8ef28cf86a772ec3a34e64)
09-01 10:52:24.399 21196 21196 F DEBUG : #4 pc 0001dae9 /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/lib/arm/libmmkv.so (BuildId: c48ff679696a28c04d8ef28cf86a772ec3a34e64)
09-01 10:52:24.399 21196 21196 F DEBUG : #5 pc 000803eb /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.odex (art_jni_trampoline+74)
09-01 10:52:24.399 21196 21196 F DEBUG : #6 pc 000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.399 21196 21196 F DEBUG : #7 pc 0042e837 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #8 pc 000dffb7 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #9 pc 00210bd9 /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+280) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #10 pc 0020c51b /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+774) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #11 pc 00428fcb /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+518) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #12 pc 000d6594 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #13 pc 01e20334 /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.tencent.mmkv.MMKV.clear)
09-01 10:52:24.400 21196 21196 F DEBUG : #14 pc 004251f9 /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1432) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #15 pc 000d2a14 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #16 pc 01e3fbf8 /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.transsnet.adsdk.utils.AdSpUtils.clear+44)
09-01 10:52:24.400 21196 21196 F DEBUG : #17 pc 00423d59 /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtual+1148) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #18 pc 000d2814 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #19 pc 01e38eae /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.transsnet.adsdk.AdManager.init+194)
09-01 10:52:24.400 21196 21196 F DEBUG : #20 pc 00426a25 /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualRange+948) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.400 21196 21196 F DEBUG : #21 pc 000d2b14 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_range+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #22 pc 01e38dd2 /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.transsnet.adsdk.AdManager.init+38)
09-01 10:52:24.401 21196 21196 F DEBUG : #23 pc 00423d59 /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtual+1148) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #24 pc 000d2814 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #25 pc 00423f0c /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.transsnet.palmpay.core.init.InitTask1.initAdSdk+124)
09-01 10:52:24.401 21196 21196 F DEBUG : #26 pc 00425bc9 /apex/com.android.runtime/lib/libart.so (MterpInvokeDirect+980) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #27 pc 000d2914 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_direct+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #28 pc 00423e60 /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.transsnet.palmpay.core.init.InitTask1.access$initAdSdk)
09-01 10:52:24.401 21196 21196 F DEBUG : #29 pc 004262bf /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+910) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #30 pc 000d2994 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #31 pc 00423e04 /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.transsnet.palmpay.core.init.InitTask1$getTask$1.run+32)
09-01 10:52:24.401 21196 21196 F DEBUG : #32 pc 00429223 /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+1118) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #33 pc 000d6594 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #34 pc 011a4e76 /data/app/com.transsnet.palmpay-d3UZJbotD2zoqP7dQlNJNQ==/oat/arm/base.vdex (com.alibaba.android.alpha.Task$a.run+42)
09-01 10:52:24.401 21196 21196 F DEBUG : #35 pc 001ec455 /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.14360885028676311589+192) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #36 pc 001f0c39 /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+124) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #37 pc 004183a9 /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+808) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #38 pc 000dc5a1 /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.401 21196 21196 F DEBUG : #39 pc 0029e697 /system/framework/arm/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+1014) (BuildId: 8aa86abffccc880238afc40743a2a5014ba6dada)
09-01 10:52:24.401 21196 21196 F DEBUG : #40 pc 0029c32f /system/framework/arm/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+54) (BuildId: 8aa86abffccc880238afc40743a2a5014ba6dada)
09-01 10:52:24.402 21196 21196 F DEBUG : #41 pc 0017f4a9 /system/framework/arm/boot.oat (java.lang.Thread.run+64) (BuildId: 8aa86abffccc880238afc40743a2a5014ba6dada)
09-01 10:52:24.402 21196 21196 F DEBUG : #42 pc 000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.402 21196 21196 F DEBUG : #43 pc 0042e837 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.402 21196 21196 F DEBUG : #44 pc 000dffb7 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.402 21196 21196 F DEBUG : #45 pc 00370427 /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.402 21196 21196 F DEBUG : #46 pc 00371119 /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+304) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.402 21196 21196 F DEBUG : #47 pc 003a1bd7 /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+978) (BuildId: 67f0eee037cdac7f67c38ff79ca038bb)
09-01 10:52:24.402 21196 21196 F DEBUG : #48 pc 000a6093 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: dfc5cec3d85eb53950c282bb1b58fa02)
09-01 10:52:24.402 21196 21196 F DEBUG : #49 pc 00060763 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: dfc5cec3d85eb53950c282bb1b58fa02)

What's the log of MMKV when that happened?

sorry,the issue is happened in customer side,so there is not log
when the issue occur, the phone crash all the time at launch. but it gets ok after reinstall the app
ps: clear user data still get crash when launch

@shenglinW
Copy link
Author

@longlene is there anywhere to download mmkv so file include symbols, we tried to build with source code and get different build id, then fail to parse the crash log

@lingol
Copy link
Collaborator

lingol commented Sep 6, 2023

The unstripped so (with debug symbols) is also on Maven Central.

@kaitian521
Copy link
Contributor

kaitian521 commented Sep 8, 2023

I notice that you call MMKV in Alpha Thread
You can have a try,by putting clear to main thread for that user to test if it was OK.

By the way, do you ever called restoreAllFromDirectory?

@shenglinW
Copy link
Author

shenglinW commented Sep 27, 2023

We didn't call restoreAllFromDirectory in our code
We have removed clear action from init code, hope it works

@kaitian521
Copy link
Contributor

By the way, can you know the available disk space for that user?

@lingol lingol closed this as completed Nov 3, 2023
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

3 participants