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

null pointer dereference #630

Closed
532922397 opened this issue Feb 5, 2021 · 8 comments
Closed

null pointer dereference #630

532922397 opened this issue Feb 5, 2021 · 8 comments

Comments

@532922397
Copy link

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x19
Cause: null pointer dereference
x0 0000000000000019 x1 00000000714ed438 x2 0000007fcb7615c4 x3 0000000000000000
x4 0000000019f94b94 x5 000000000000057e x6 000000001a50e1b0 x7 0000000000000010
x8 0000000000000019 x9 0000000000008000 x10 0000000000430000 x11 0000000000000000
x12 0000000000000000 x13 0000007678aebdfc x14 00000000000024eb x15 0000000000000040
x16 0000007fcb761600 x17 000000000000006d x18 6a3889e92b188a3a x19 0000000000000019
x20 000000776e387020 x21 00000000a02b3448 x22 0000000000000002 x23 000000009fe23e50
x24 0000000019f94b90 x25 0000007673c67540 x26 000000001a50e1a0 x27 0000000000000000
x28 0000000000000000 x29 0000007fcb7615b0
sp 0000007fcb7615a0 lr 0000007664a0285c pc 0000007664a0e708

backtrace:
#00 pc 0000000000027708 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/lib/arm64/libmmkv.so (BuildId: 1d4d460b8122bc59765ac014d2cea4a6342c6d14)
#1 pc 000000000001b858 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/lib/arm64/libmmkv.so (BuildId: 1d4d460b8122bc59765ac014d2cea4a6342c6d14)
#2 pc 0000000000012378 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/lib/arm64/libmmkv.so (BuildId: 1d4d460b8122bc59765ac014d2cea4a6342c6d14)
#3 pc 00000000004f0188 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (art_jni_trampoline+152)
#4 pc 00000000012f76a0 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (com.tencent.mmkv.MMKV.checkProcessMode+176)
#5 pc 00000000012f7f90 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (com.tencent.mmkv.MMKV.mmkvWithID+112)
#6 pc 000000000119d53c /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (xxxxa.a+300)
#7 pc 000000000119ddfc /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (xxxx.a.b+60)
#8 pc 00000000011e795c /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (xx.f.c+172)
#9 pc 00000000011e77e0 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (xx.helper.f.a+48)
#10 pc 00000000001455b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#11 pc 00000000001541c4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+284) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#12 pc 00000000002f049c /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#13 pc 00000000002eb76c /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+912) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#14 pc 00000000005c3d1c /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+368) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#15 pc 000000000013f994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#16 pc 00000000013dc2ee /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.vdex (xx.a.e.+16)
#17 pc 00000000002c0fbc /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.14699443157220891705+320) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#18 pc 00000000005b1e88 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#19 pc 000000000014e468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#20 pc 00000000001455b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#21 pc 00000000001541c4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+284) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#22 pc 000000000017fb8c /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::InitializeClass(art::Thread*, art::Handleart::mirror::Class, bool, bool)+1964) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#23 pc 000000000017f79c /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::InitializeClass(art::Thread*, art::Handleart::mirror::Class, bool, bool)+956) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#24 pc 000000000016aba0 /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::EnsureInitialized(art::Thread*, art::Handleart::mirror::Class, bool, bool)+92) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#25 pc 00000000005a1658 /apex/com.android.runtime/lib64/libart.so (artAllocObjectFromCodeResolvedRegionTLAB+400) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#26 pc 000000000014cf8c /apex/com.android.runtime/lib64/libart.so (art_quick_alloc_object_resolved_region_tlab+108) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#27 pc 0000000000bf7538 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (xxxx.app.d.a+264)
#28 pc 0000000001220be8 /data/app/xxxx-Fh3pFazB8-AaHlwr6yJ8kA==/oat/arm64/base.odex (Application.onCreate+72)
#29 pc 0000000000437eac /system/framework/arm64/boot-framework.oat (android.app.Instrumentation.callApplicationOnCreate+124) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#30 pc 00000000005729f8 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.handleBindApplication+7992) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#31 pc 00000000005681b8 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread$H.handleMessage+9256) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#32 pc 0000000000890354 /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+180) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#33 pc 00000000008939c8 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1512) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#34 pc 000000000057bd8c /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+2300) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#35 pc 00000000001455b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#36 pc 00000000001541c4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+284) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#37 pc 00000000004d00a0 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#38 pc 00000000004d1ac8 /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1476) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#39 pc 000000000045c230 /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#40 pc 00000000000f8c34 /system/framework/arm64/boot.oat (art_jni_trampoline+180) (BuildId: 36bde9ba3308c7c2eaaa8e050d41e9ddbc4dcb34)
#41 pc 0000000000b134d8 /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#42 pc 0000000000b1bb5c /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3388) (BuildId: 26fef007e527b52273e98f04f8899a28be0c2b03)
#43 pc 00000000001455b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#44 pc 00000000001541c4 /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+284) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#45 pc 00000000004d00a0 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#46 pc 00000000004cfd0c /apex/com.android.runtime/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+408) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#47 pc 00000000003c7b3c /apex/com.android.runtime/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+636) (BuildId: 236478a0e705bb91628aa89aef3e8e7f)
#48 pc 00000000000fe5c4 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116) (BuildId: 556dd7cf2bfe36e4de7dd84f03ee3074)
#49 pc 0000000000101c30 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+1224) (BuildId: 556dd7cf2bfe36e4de7dd84f03ee3074)
#50 pc 00000000000034e0 /system/bin/app_process64 (main+1168) (BuildId: 3dc4e1c3832386d747cee6ace24f22b9)
#51 pc 000000000006b050 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: 928809e4bdb773b35f649f8fb0d674ce)

@532922397
Copy link
Author

Mobile phone brand:HUAWEI

@lingol
Copy link
Collaborator

lingol commented Feb 5, 2021

Follow the issue template, please.
No mmkv version, no abi, no client logs. No one can diagnose your crash.

@532922397
Copy link
Author

请遵循问题模板。
没有mmkv版本,没有abi,没有客户端日志。没有人可以诊断您的崩溃。

version:1.2.5
This is all the crash logs of channel feedback. What else do you need?

@lingol
Copy link
Collaborator

lingol commented Feb 5, 2021

Logs. Not crash call stacks, but logs.

@lingol
Copy link
Collaborator

lingol commented Feb 5, 2021

Assuming you are using mmkv-static with arm64 abi, here are the symbolized call stacks:

mmkv::FileLock::isFileLockValid()
/Users/lingol/Developer/mmkv/Core/InterProcessLock.h:48
mmkv::InterProcessLock::try_lock(bool*)
/Users/lingol/Developer/mmkv/Core/InterProcessLock.h:104
mmkv::checkProcessMode(_JNIEnv*, _jobject*, long)
/Users/lingol/Developer/mmkv/Android/MMKV/mmkv/.cxx/cmake/StaticCppRelease/arm64-v8a/../../../../src/main/cpp/native-bridge.cpp:349

It crashed in an uncrashable place. https://github.com/Tencent/MMKV/blob/v1.2.5/Core/InterProcessLock.h#L48
My best guess is that the device was running with a low memory footprint.

Still, I need your logs from the logcat to further diagnose the problem.

@lingol
Copy link
Collaborator

lingol commented Feb 22, 2021

Hello, any update on logs?

@lingol
Copy link
Collaborator

lingol commented Feb 26, 2021

Close due to inactive.

@lingol
Copy link
Collaborator

lingol commented May 6, 2021

Released with v1.2.8.

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