Android 8 native crash at native library - android

Since the rollout of Android 8 Oreo, our app has been consistently crashing in different places. All the play store crash reports show native crashes. The most frequently occuring one seems to be at native library.
The most frequent device that crashes is the Google Pixel and Pixel XL have also shown a few.
I ll post the crash log below. I m struggling to find what causes the crash.
Any help is appreciated.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sailfish/sailfish:8.0.0/OPR6.170623.012/4283428:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 9857, tid: 9857, name: stampphoto >>> com.******.***** <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
r0 ea26cec8 r1 00000001 r2 0000007f r3 00000002
r4 000030ca r5 00000000 r6 ff7ed650 r7 ff7ed628
r8 13b40240 r9 00000043 sl ea26b470 fp ff7ed664
ip ea0985d1 sp ff7ed5a8 lr ea168b15 pc ea168b1e cpsr 600b0030
backtrace:
#00 pc 00332b1e /system/lib/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithVarArgsERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDSt9__va_list+89)
#01 pc 00262785 /system/lib/libart.so (_ZN3art3JNI17CallObjectMethodVEP7_JNIEnvP8_jobjectP10_jmethodIDSt9__va_list+436)
#02 pc 0006398b /data/app/com.a.a-h8bA8DmI-3kJ2bP4GkGvoA==/base.apk (offset 0x3c4000)
#03 pc 0006468b /data/app/com.a.a-h8bA8DmI-3kJ2bP4GkGvoA==/base.apk (offset 0x3c4000)
#04 pc 0006fddf /data/app/com.a.a-h8bA8DmI-3kJ2bP4GkGvoA==/oat/arm/base.odex (offset 0x45000)
Thanks in advance...

Related

What is Number after symbol in Android Tombstone backtrace?

I was reading Tombstone in Android which have backtrace
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Android/aosp_angler/angler:7.1.1/NYC/enh12211018:eng/test-keys'
Revision: '0'
ABI: 'arm'
pid: 17946, tid: 17949, name: crasher >>> crasher <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
r0 0000000c r1 00000000 r2 00000000 r3 00000000
r4 00000000 r5 0000000c r6 eccdd920 r7 00000078
r8 0000461a r9 ffc78c19 sl ab209441 fp fffff924
ip ed01b834 sp eccdd800 lr ecfa9a1f pc ecfd693e cpsr 600e0030
backtrace:
#00 pc 0004793e /system/lib/libc.so (pthread_mutex_lock+1)
#01 pc 0001aa1b /system/lib/libc.so (readdir+10)
#02 pc 00001b91 /system/xbin/crasher (readdir_null+20)
#03 pc 0000184b /system/xbin/crasher (do_action+978)
#04 pc 00001459 /system/xbin/crasher (thread_callback+24)
#05 pc 00047317 /system/lib/libc.so (_ZL15__pthread_startPv+22)
#06 pc 0001a7e5 /system/lib/libc.so (__start_thread+34)
Tombstone written to: /data/tombstones/tombstone_06
But I am confused what does pthread_mutex_lock+1 and readdir+10 Number after function symbol means?
Source - https://source.android.com/devices/tech/debug
This is the offset of the code location respective to the start of the function.
As an example, readdir+10 indicates that the call was made from the tenth byte in the readdir function.

App crashing when map is loading and camera is moving to the current location

I'm currently debugging an app where it shows the map and it goes to the current location. When I look at the logs, it only shows this log
08-02 20:40:48.907 12558-12568/ph.com.appsample A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x5c in tid 12568 (FinalizerDaemon)
I tried removing the filtering of the logs and was able to retrieve this log
08-02 20:40:48.967 275-275/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/j53gxx/j53g:5.1.1/LMY48B/J500HXXS1AQG1:'
Revision: '5'
ABI: 'arm'
pid: 12558, tid: 12568, name: FinalizerDaemon >>> ph.com.appsample <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x5c
08-02 20:40:48.997 275-275/? I/DEBUG: r0 b7e1e8e0 r1 00000000 r2
9b60f000 r3 00000000
r4 b7e1e8e0 r5 0000005d r6 136959c0 r7 ffffffff
r8 712a9430 r9 b7a6fad0 sl 137295b0 fp 136959c0
ip b6f80fa8 sp b45fca88 lr b6e86be1 pc 0000005c cpsr 60070030
backtrace:
#00 pc 0000005c <unknown>
#01 pc 0001fbdf /system/lib/libbinder.so (_ZN7android6Parcel14freeDataNoInitEv+22)
#02 pc 0001fc39 /system/lib/libbinder.so (_ZN7android6ParcelD1Ev+4)
#03 pc 00083cbf /system/lib/libandroid_runtime.so
#04 pc 00017f45 /system/framework/arm/boot.oat
Is there anyway I can make this readable and does someone encounter this problem also?

Native crash at /system/lib/libskia.so on some Sumsung Android 5.x device

Recently I have got some crash report of my app. It seemed that it's only happened on some Samsung Android 5.x devices. Currently we have got samsung/a5ltezt and samsung/tbltezt on the error list. While it's all OK when those devices running Android 4.x system.
Below is the crash log:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/a5ltezt/a5ltezt:5.0.2/LRX22G/A500YZZTU1BOK2:user/release-keys'
Revision: '10'
ABI: 'arm'
pid: 15001, tid: 15034, name: Thread-3294 >>> com.tecom.sip <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb0cb2c38
r0 b90eb578 r1 b0cb2c58 r2 0000000c r3 b5a7d363
r4 0000000c r5 b90eb578 r6 b0cf2cac r7 b0cf2c58
r8 00000000 r9 b0cf2c64 sl 0000000c fp b0cb2c58
ip 00000050 sp b0cb2c50 lr b5ac4f5b pc b5a7d362 cpsr 600f0030
backtrace:
#00 pc 00155362 /system/lib/libskia.so (FrontBufferedStream::readDirectlyFromStream(char*, unsigned int)+41)
#01 pc e1520001 <unknown>
Really thanks if someone shows me a clue.

Android Crash Report - Native crash at /system/lib/libc.so caused by webview

A user with a Galaxy Note4 with Android 5.0 had my app crash yesterday. This was the stack trace.
My app is mostly just a webview wrapper of a website. Is there anything I can do to improve the webview or make it more efficient to prevent the 20 or so crashes I'm getting a week that all have this same stack trace?
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/trlteuc/trlteatt:5.0.1/LRX22C/N910AUCU2COC6:user/release-keys'
Revision: '12'
ABI: 'arm'
pid: 421, tid: 421, name: ****.app >>> org.***********.app <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:jni_android.cc(249)] Check failed: false. Please include Java exception stack in crash report
'
r0 00000000 r1 000001a5 r2 00000006 r3 00000000
r4 b6fd3114 r5 00000006 r6 0000000b r7 0000010c
r8 b6fb2e04 r9 be972e14 sl 00000000 fp b3be8ac4
ip 000001a5 sp be972968 lr b6f5cff5 pc b6f7f9fc cpsr 600f0010
backtrace:
#00 pc 000369fc /system/lib/libc.so (tgkill+12)
#01 pc 00013ff1 /system/lib/libc.so (pthread_kill+52)
#02 pc 00014c0f /system/lib/libc.so (raise+10)
#03 pc 00011531 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0000fcbc /system/lib/libc.so (abort+4)
#05 pc 002b8bf9 /data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so

How to use addr2line in Android

I am stuck with my app, as I am unable to debug as it is a multithreaded one and crashes with error SIGSEGV. I get lot of information from LogCat, which gives me addresses in my native library. It would be helpful if I could convert these addresses into my code.
Does anybody have any idea how to use addr2line, which is provided with android-ndk?
Let's say that logcat show you the following crash log (this is from one of my projects):
I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 31): Build fingerprint: 'generic/sdk/generic:2.3/GRH55/79397:eng/test-keys'
I/DEBUG ( 31): pid: 378, tid: 386 >>> com.example.gltest <<<
I/DEBUG ( 31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG ( 31): r0 001dbdc0 r1 00000001 r2 00000000 r3 00000000
I/DEBUG ( 31): r4 00000000 r5 40a40000 r6 4051a480 r7 42ddbee8
I/DEBUG ( 31): r8 43661b24 r9 42ddbed0 10 42ddbebc fp 41e462d8
I/DEBUG ( 31): ip 00000001 sp 436619d0 lr 83a12f5d pc 8383deb4 cpsr 20000010
I/DEBUG ( 31): #00 pc 0003deb4 /data/data/com.example.gltest/lib/libnativemaprender.so
I/DEBUG ( 31): #01 pc 00039b76 /data/data/com.example.gltest/lib/libnativemaprender.so
I/DEBUG ( 31): #02 pc 00017d34 /system/lib/libdvm.so
Look at the last 3 lines; this is your callstack. 'pc' is the program counter, and the pc for stack frame #00 gives you the address where the crash occurred. This is the number to pass to addr2line.
I'm using NDK r5, so the executable I'm using is located at $NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin; make sure that is in your $PATH. The command to use looks like
arm-linux-androideabi-addr2line -C -f -e obj/local/armeabi/libXXX.so <address>
Or, for the case above:
arm-linux-androideabi-addr2line -C -f -e obj/local/armeabi/libnativemaprender.so 0003deb4
Which gives you the location of the crash.
Note:
The -C flag is to demangle C++ code
Use the .so file under
obj/local/armeabi, since this is the
non-stripped version
Also, when using NDK r5 with a 2.3 AVD, it is actually possible to debug multithreaded code.
There's an easier way to do this now (ndk-r7). Check out the ndk-stack command. The docs are in you_android_ndk_path/docs/NDK-STACK.html

Categories

Resources