This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Looper crash on MapboxMapTest #7447
Copy link
Copy link
Closed
Description
We have seen multiple occurrences of type of crash on CI builds.
12-14 10:46:19.399: A/libc(5925): Fatal signal 6 (SIGABRT), code -6 in tid 5925 (pboxsdk.testapp)
12-14 10:46:19.503: I/DEBUG(359): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-14 10:46:19.503: I/DEBUG(359): Build fingerprint: 'google/shamu/shamu:5.1.1/LMY48Y/2364368:user/release-keys'
12-14 10:46:19.503: I/DEBUG(359): Revision: '33696'
12-14 10:46:19.503: I/DEBUG(359): ABI: 'arm'
12-14 10:46:19.504: I/DEBUG(359): pid: 5925, tid: 5925, name: pboxsdk.testapp >>> com.mapbox.mapboxsdk.testapp <<<
12-14 10:46:19.504: I/DEBUG(359): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
12-14 10:46:19.529: I/DEBUG(359): Abort message: '/usr/local/google/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed'
12-14 10:46:19.530: I/DEBUG(359): r0 00000000 r1 00001725 r2 00000006 r3 00000000
12-14 10:46:19.530: I/DEBUG(359): r4 b6f85e38 r5 00000006 r6 0000000c r7 0000010c
12-14 10:46:19.530: I/DEBUG(359): r8 00000000 r9 9186d4a4 sl 95de60c8 fp 8c5c2ec0
12-14 10:46:19.530: I/DEBUG(359): ip 00001725 sp bec1e8e0 lr b6e023c5 pc b6e260ec cpsr 600f0010
12-14 10:46:19.530: I/DEBUG(359): backtrace:
12-14 10:46:19.530: I/DEBUG(359): #00 pc 0003b0ec /system/lib/libc.so (tgkill+12)
12-14 10:46:19.530: I/DEBUG(359): #01 pc 000173c1 /system/lib/libc.so (pthread_kill+52)
12-14 10:46:19.530: I/DEBUG(359): #02 pc 00017fd3 /system/lib/libc.so (raise+10)
12-14 10:46:19.530: I/DEBUG(359): #03 pc 00014795 /system/lib/libc.so (__libc_android_abort+36)
12-14 10:46:19.530: I/DEBUG(359): #04 pc 00012f44 /system/lib/libc.so (abort+4)
12-14 10:46:19.530: I/DEBUG(359): #05 pc 00015ab1 /system/lib/libc.so (__libc_fatal+16)
12-14 10:46:19.530: I/DEBUG(359): #06 pc 00014819 /system/lib/libc.so (__assert2+20)
12-14 10:46:19.530: I/DEBUG(359): #07 pc 00360297 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.530: I/DEBUG(359): #08 pc 0036035f /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.530: I/DEBUG(359): #09 pc 0035e6d5 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.530: I/DEBUG(359): #10 pc 0035dfdf /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so (__cxa_throw+122)
12-14 10:46:19.530: I/DEBUG(359): #11 pc 00357be1 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so (operator new(unsigned int)+60)
12-14 10:46:19.530: I/DEBUG(359): #12 pc 0005c65d /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.530: I/DEBUG(359): #13 pc 0010bd77 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #14 pc 000ffb59 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #15 pc 000ffa41 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #16 pc 000f06cf /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #17 pc 000f0a2b /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #18 pc 0005d145 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #19 pc 000a081d /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #20 pc 000a0d4f /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #21 pc 000a0527 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
12-14 10:46:19.531: I/DEBUG(359): #22 pc 000119ff /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+10)
12-14 10:46:19.531: I/DEBUG(359): #23 pc 00012661 /system/lib/libutils.so (android::Looper::pollInner(int)+484)
12-14 10:46:19.531: I/DEBUG(359): #24 pc 00012709 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
12-14 10:46:19.531: I/DEBUG(359): #25 pc 00081711 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+The crash isn't reproducible on demand but always occurs as part of the MapboxMapTest tests.
The trace isn't completely the same every time but it always ends with android::Looper::pollOnce and android::NativeMessageQueue::pollOnce(_JNIEnv*, int).
Activity
tobrun commentedon Dec 15, 2016
While #7451 solves it, I think the underlying issue comes from calling methods on the mapobject from another thread. When you are doing instrumentation testing you are actually running 2 applications, the test application that contains our tests versus the to be tested application. I think the issue comes from running on the main thread of the test application vs the main thread of the to be tested application). @tmpsantos any insights in this crash or on the Android Looper implementation?
tmpsantos commentedon Dec 16, 2016
@tobrun the crash might not be on the Looper itself. On every thread (including the main thread) all the backtraces will originate from the main loop which is where the thread sleeps. What we need to check here is the topmost frame of the stack.
What you described makes sense a cause of a crash.