Android native crash: Could not write wake signal to fd - android

A native crash happened in my Android application. This happens when I am running monkey test. From the error message and crash stack, it seems like a system problem. But I don't know about this error. My question is what does this crash mean? How can I solve it?
// CRASH: com.my.app (pid 4552)
// Short Msg: Native crash
// Long Msg: Native crash: Aborted
// Build Label: Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys
// Build Changelist: 11.5.250_200614
// Build Time: 1592147934000
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// Build fingerprint: 'Lenovo/heart/heart:10/QKQ1.191014.001/11.5.250_200614:userdebug/test-keys'
// Revision: '0'
// ABI: 'arm'
// Timestamp: 2020-10-16 14:19:20+0800
// pid: 4552, tid: 5214, name: plumber-android >>> com.my.app <<<
// uid: 10292
// signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
// Abort message: 'Could not write wake signal to fd 99 (returned -1): Bad file descriptor'
// r0 00000000 r1 0000145e r2 00000006 r3 c5d66e18
// r4 c5d66e2c r5 c5d66e10 r6 000011c8 r7 0000016b
// r8 c5d66e28 r9 c5d66e18 r10 c5d66e48 r11 c5d66e38
// ip 0000145e sp c5d66de8 lr f1f0f4cb pc f1f0f4de
//
// backtrace:
// #00 pc 000604de /apex/com.android.runtime/lib/bionic/libc.so (abort+166) (BuildId: b8ea1bc56f976308b1ee7e2335b3127e)
// #01 pc 00005a95 /system/lib/liblog.so (__android_log_assert+176) (BuildId: 87a4fc52c4da52007b41b9baaa778d64)
// #02 pc 0001066f /system/lib/libutils.so (android::Looper::wake()+110) (BuildId: 303a9d221465f0db9b5d760e0a0c6abe)
// #03 pc 00289b47 /system/framework/arm/boot-framework.oat (art_jni_trampoline+102) (BuildId: 39c685939f0d8867d4162c7a38d63ad3600807fd)
// #04 pc 0204f797 /memfd:/jit-cache (deleted) (android.os.MessageQueue.enqueueMessage+470)
// #04 pc 0204f797 /memfd:/jit-cache (deleted) (android.os.MessageQueue.enqueueMessage+470)
// #05 pc 02034cad /memfd:/jit-cache (deleted) (android.os.Handler.enqueueMessage+108)
// #06 pc 02053cb5 /memfd:/jit-cache (deleted) (android.os.Handler.sendMessageAtTime+244)
// #07 pc 0205d139 /memfd:/jit-cache (deleted) (android.os.Handler.sendMessageDelayed+120)
// #08 pc 020a22cd /memfd:/jit-cache (deleted) (android.os.Handler.post+76)
...

Related

Android application crashes after migrating unity 2019 -> 2021

We're trying to update unity from version 2019 to 2021.
After update android application randomly crashes. Session time from 3 minutes till 40.
Also, there no steps to repo.
Tried to disable all SDKs, update to 2020 and 2022, change stripping code, change compilation from il2cpp to mono and lof of other variants but without any results.
It would be great to hear any ideas. Thx!
2022-11-22 17:46:35.813 6299-6411/com.***.*** E/AndroidRuntime: FATAL EXCEPTION: UnityMain
Process: com.***.***, PID: 6299
java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2021.3.13f1 (9e7d58001ecf)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
Build fingerprint: 'samsung/m32xx/m32:12/SP1A.210812.016/M325FVXXS4BVJ1:user/release-keys'
Revision: '3'
ABI: 'arm'
Timestamp: 2022-11-22 17:46:34+0200
pid: 6299, tid: 6411, name: UnityMain >>> com.***.*** <<<
uid: 10762
signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x97
r0 0000008b r1 00000097 r2 a6045de0 r3 00000002
r4 0000008b r5 00000000 r6 c4447440 r7 c23cf264
r8 00000002 r9 a6045de0 r10 c23cf2a8 r11 00000000
ip bfc4f380 sp c60d7870 lr c6b6c093 pc c6b70ba8
backtrace:
#00 pc 0032fba8 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (EventManager::InvokeEventCommon(EventManager*, EventEntry*, void*, int)+26) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#01 pc 0032b08f /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (delete_object_internal_step1(Object*)+26) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#02 pc 0032ac1d /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (delete_object_internal(Object*)+8) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#03 pc 005fba11 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (DestroyObjectHighLevel(Object*, bool)+28) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#04 pc 0058b211 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (BackgroundJobQueue::ExecuteMainThreadJobs()+24) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#05 pc 005ff843 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (InitPlayerLoopCallbacks()::EarlyUpdateExecuteMainThreadJobsRegistrator::Forward()+30) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#06 pc 00600c41 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)+66) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#07 pc 00600c81 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)+130) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#08 pc 00600e41 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (PlayerLoop()+224) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#09 pc 009a53f9 /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (UnityPlayerLoop()+576) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#10 pc 009cdd9d /data/app/~~-yOypRKW_zJrZZDfaDURbQ==/com.***.***-zHyjP_HS-QJKpSjVK2hWuQ==/lib/arm/libunity.so (nativeRender(_JNIEnv*, _jobject*)+40) (BuildId: 60691ac925aaa903ed9fa2d3edd0b108518d4dbd)
#11 pc 003af19d /apex/com.android.art/lib/libart.so (art_quick_alloc_string_from_bytes_region_tlab_instrumented+44) (BuildId: 8a3405190074d955145af6042a9f3658)
at libunity.EventManager::InvokeEventCommon(EventManager*, EventEntry*, void*, int)(InvokeEventCommon:26)
at libunity.delete_object_internal_step1(Object*)(delete_object_internal_step1:26)
at libunity.delete_object_internal(Object*)(delete_object_internal:8)
at libunity.DestroyObjectHighLevel(Object*, bool)(DestroyObjectHighLevel:28)
at libunity.BackgroundJobQueue::ExecuteMainThreadJobs()(ExecuteMainThreadJobs:24)
2022-11-22 17:46:35.814 6299-6411/com.***.*** E/AndroidRuntime: at libunity.InitPlayerLoopCallbacks()::EarlyUpdateExecuteMainThreadJobsRegistrator::Forward()(InitPlayerLoopCallbacks:30)
at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:66)
at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:130)
at libunity.PlayerLoop()(PlayerLoop:224)
at libunity.UnityPlayerLoop()(UnityPlayerLoop:576)
at libunity.nativeRender(_JNIEnv*, _jobject*)(nativeRender:40)
at libart.art_quick_alloc_string_from_bytes_region_tlab_instrumented(art_quick_alloc_string_from_bytes_region_tlab_instrumented:44)
We face this issue also but on lower update: from 2021.3.9 to 2021.3.12. It was affecting 20% of our users on production.
According to logs, it is related to scene loading.
So looks like this issue started to appear somewhere after 2021.3.9.
Rolling back to this .9 version solved it for us.

File operation in RxJava causes leak of file descriptor in Android

I develop android app and I want to download many files(about 1000 files).
it's with Okhttp and RxJava, and it in service.
but app must crashes by leak of file descriptor in loop about 200th:
AtomicInteger count = new AtomicInteger();
Observable.fromArray(list.toArray(new String[list.size()]))//url list
.subscribeOn(Schedulers.io())
.doOnNext(url -> {
Response response = request(url, null);
String lastSegment = url.substring(url.lastIndexOf("/")+1);
File file = new File(context.getFilesDir(), lastSegment);
file.createNewFile();
FileOutputStream fos = new FileOutputStream(file);
fos.write(response.body().bytes());
fos.close();
response.close();
})
.observeOn(AndroidSchedulers.mainThread())
.subscribe(url -> onProgress(stateCode, count.incrementAndGet(), list.size()),
this::handleError, this::onCompleteDl);
and error log:
06-15 06:26:52.204 22654-24804/{MY_PACKAEGENAME} A/libc: FORTIFY: FD_SET: file descriptor >= FD_SETSIZE
06-15 06:26:52.634 25745-25745/? A/google-breakpad: Microdump skipped (uninteresting)
06-15 06:26:52.794 22654-24804/{MY_PACKAEGENAME} A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 24804 (RxCachedThreadS)
06-15 06:26:52.854 18430-18430/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/SC-04F/SC-04F:6.0.1/MMB29M/SC04FOMU1XQH1:user/release-keys'
Revision: '13'
ABI: 'arm'
pid: 22654, tid: 24804, name: RxCachedThreadS >>> com.cks.hiroyuki2.radiko <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
06-15 06:26:53.024 18430-18430/? A/DEBUG: Abort message: 'FORTIFY: FD_SET: file descriptor >= FD_SETSIZE'
r0 00000000 r1 000060e4 r2 00000006 r3 87b03978
r4 87b03980 r5 87b03930 r6 0000000b r7 0000010c
r8 87afa6e4 r9 87afa778 sl 0000000a fp 00000002
ip 00000006 sp 87afa630 lr b6c8fc31 pc b6c92020 cpsr 40010010
06-15 06:26:53.044 18430-18430/? A/DEBUG: backtrace:
#00 pc 00042020 /system/lib/libc.so (tgkill+12)
#01 pc 0003fc2d /system/lib/libc.so (pthread_kill+32)
#02 pc 0001c3b3 /system/lib/libc.so (raise+10)
#03 pc 00019631 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 00017584 /system/lib/libc.so (abort+4)
#05 pc 0001afc7 /system/lib/libc.so (__libc_fatal+16)
#06 pc 0001afdf /system/lib/libc.so (__fortify_chk_fail+18)
#07 pc 00045d85 /system/lib/libc.so (__FD_SET_chk+24)
#08 pc 0000a4cf /system/lib/libjavacrypto.so
#09 pc 0000b0ab /system/lib/libjavacrypto.so
#10 pc 033ec46f /system/framework/arm/boot.oat (offset 0x2f3a000)
06-15 06:27:00.724 18430-18430/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_02
I'm new to RxJava, so I think It's wrong to use RxJava.
How can I solve it? What's the wrong point?
Thanks in advance.

How to find cause of (SIGABRT) heap corruption detected by dlmalloc_real?

Sometimes, my application stops saying ->
A/libc: heap corruption detected by dlmalloc_real
Fatal signal 6 (SIGABRT), code -6 in tid 8614 (drotorres.uareu)
I'm tryng to track it, and resolve the cuase. My logcat out about the erros is that:
04-23 16:36:25.749 8614-8614/com.br.ufc.pedrotorres.uareu A/libc: heap corruption detected by dlmalloc_real
Fatal signal 6 (SIGABRT), code -6 in tid 8614 (drotorres.uareu)
04-23 16:36:25.859 395-395/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/j5xnlteub/j5xnlte:6.0.1/MMB29M/J510MNVJU2AQI1:user/release-keys'
Revision: '4'
ABI: 'arm'
pid: 8614, tid: 8614, name: drotorres.uareu >>> com.br.ufc.pedrotorres.uareu <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
04-23 16:36:25.879 395-395/? A/DEBUG: Abort message: 'heap corruption detected by dlmalloc_real'
r0 00000000 r1 000021a6 r2 00000006 r3 b6f11b94
r4 b6f11b9c r5 b6f11b4c r6 0000000b r7 0000010c
r8 be99b8fc r9 be99b894 sl 12cd2400 fp ffffffff
ip 00000006 sp be99b7a8 lr b6c90f15 pc b6c93310 cpsr 400f0010
04-23 16:36:25.889 395-395/? A/DEBUG: backtrace:
#00 pc 00044310 /system/lib/libc.so (tgkill+12)
#01 pc 00041f11 /system/lib/libc.so (pthread_kill+32)
#02 pc 0001ba13 /system/lib/libc.so (raise+10)
#03 pc 00018c81 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 00016840 /system/lib/libc.so (abort+4)
#05 pc 0001a627 /system/lib/libc.so (__libc_fatal+16)
#06 pc 0002e221 /system/lib/libc.so (__bionic_heap_corruption_error+8)
#07 pc 0002f2bd /system/lib/libc.so (dlmalloc_real+628)
#08 pc 000485a9 /system/lib/libc++.so (_Znwj+16)
#09 pc 0010d319 /system/lib/libskia.so (_ZN16SkMallocPixelRef9NewDirectERK11SkImageInfoPvjP12SkColorTable+20)
#10 pc 000e95eb /system/lib/libskia.so (_ZN8SkBitmap9setPixelsEPvP12SkColorTable+30)
#11 pc 0007f9f1 /system/lib/libandroid_runtime.so
#12 pc 042dfd63 /system/framework/arm/boot.oat (offset 0x2fcf000)
04-23 16:36:26.309 395-395/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_09
04-23 16:36:26.309 395-395/? E/DEBUG: AM write failed: Broken pipe

Moto X play giving strange error

my app at PlayStore is giving a strange ANR, it's specific to the model and the error doesn't give me clues where is the problem
this is the report at Play Console:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'motorola/lux_retla_ds/lux_uds:6.0/MPD24.65-33.1/1:user/release-keys'
Revision: 'p2c0'
ABI: 'arm'
pid: 9584, tid: 9156, name: Chrome_InProcGp >>> com.leifacil.vademecum <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x301b
r0 b919d5a0 r1 00002fdb r2 0000301b r3 000000c0
r4 ba2a6d88 r5 b428c73c r6 ba2a6db8 r7 0000001b
r8 b91b0128 r9 0000305b sl 0c000000 fp 00000000
ip 00000000 sp 9d434fc8 lr 00000013 pc aa948730 cpsr 000f0030
backtrace:
#00 pc 0014a730 /system/vendor/lib/egl/libESXGLESv2_adreno.so (EsxMemPoolGeneral::ReturnMemory(EsxMemType, EsxTimestamp const*, unsigned int, gsl_memdesc*)+463)
#01 pc 00145325 /system/vendor/lib/egl/libESXGLESv2_adreno.so (EsxGfxMem::Destroy(EsxContext*)+644)
#02 pc 001019e5 /system/vendor/lib/egl/libESXGLESv2_adreno.so (EsxResource::SetGfxMem(EsxContext*, unsigned int, EsxGfxMem*, int)+132)
#03 pc 00101a3f /system/vendor/lib/egl/libESXGLESv2_adreno.so (EsxResource::FreeSubResource(EsxContext*, EsxSubResource*)+30)
#04 pc 00101b05 /system/vendor/lib/egl/libESXGLESv2_adreno.so (EsxResource::SetSubResource(EsxContext*, unsigned int, EsxSubResource*)+36)
#05 pc 00101d03 /system/vendor/lib/egl/libESXGLESv2_adreno.so (EsxResource::Destroy(EsxContext*)+290)
#06 pc 001210f5 /system/vendor/lib/egl/libESXGLESv2_adreno.so (EglImage::Destroy()+20)
#07 pc 0011d88b /system/vendor/lib/egl/libESXGLESv2_adreno.so (EglSurfaceAccess::~EglSurfaceAccess()+10)
#08 pc 0011a161 /system/vendor/lib/egl/libESXGLESv2_adreno.so (EglApi::DestroyImage(void*, void*)+64)
#09 pc 0001440d /system/lib/libEGL.so (eglDestroyImageKHR+44)
#10 pc 0036c93f /data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so

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

Categories

Resources