[펌] Reducing Android Crash rate due to Graphics Jobs and Multithreaded Rendering
Unity3D/Tips / 2024. 1. 26. 11:56
For a while I was struggling with high crash rates on Android due to a "signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)" error in /lib/arm64/libunity.so
Unity 2021.3.26f1 (but also in all earlier Unity 2021, 2020 and 2019 versions I tried). URP 12.1.11.
SOLUTION:
The solution was to disable both Multithreaded Rendering and Graphics Jobs (I had both enabled).
Detailed Error log (with symbols):
2023.06.16 16:11:05.189 8877 8946 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2023.06.16 16:11:05.189 8877 8946 Error CRASH Version '2021.3.26f1 (a16dc32e0ff2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
2023.06.16 16:11:05.189 8877 8946 Error CRASH Build fingerprint: 'Nokia/Onyx_00WW/B2N_sprout:10/QKQ1.190828.002/00WW_4_15N:user/release-keys'
2023.06.16 16:11:05.189 8877 8946 Error CRASH Revision: '0'
2023.06.16 16:11:05.189 8877 8946 Error CRASH ABI: 'arm64'
2023.06.16 16:11:05.189 8877 8946 Error CRASH Timestamp: 2023-06-16 16:11:05+0200
2023.06.16 16:11:05.189 8877 8946 Error CRASH pid: 8877, tid: 8946, name: Thread-5 >>> com.kamgam.sbr2 <<<
2023.06.16 16:11:05.189 8877 8946 Error CRASH uid: 10398
2023.06.16 16:11:05.189 8877 8946 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x17
2023.06.16 16:11:05.189 8877 8946 Error CRASH Cause: null pointer dereference
2023.06.16 16:11:05.189 8877 8946 Error CRASH x0 00000072101ca8c0 x1 0000000000000000 x2 0000000000000858 x3 000000000000e56e
2023.06.16 16:11:05.189 8877 8946 Error CRASH x4 000000000000005b x5 00000072530c4ddc x6 0000000000000000 x7 00000000840088d2
2023.06.16 16:11:05.189 8877 8946 Error CRASH x8 00000072535d7530 x9 00000000fffffff1 x10 0000000000000000 x11 0000000000000000
2023.06.16 16:11:05.189 8877 8946 Error CRASH x12 0000000000000000 x13 0000000000000000 x14 0000000000029873 x15 0000000000000001
2023.06.16 16:11:05.189 8877 8946 Error CRASH x16 000000725351b618 x17 000000733e8c7070 x18 0000007167606000 x19 0000000000000858
2023.06.16 16:11:05.189 8877 8946 Error CRASH x20 0000000000000000 x21 ffffffffffffffff x22 00000071d0132308 x23 00000072101e1c70
2023.06.16 16:11:05.189 8877 8946 Error CRASH x24 00000072101e1cf0 x25 0000000000000000 x26 00000072104b3780 x27 000000715000018c
2023.06.16 16:11:05.189 8877 8946 Error CRASH x28 000000000000273d x29 000000716841fc20
2023.06.16 16:11:05.189 8877 8946 Error CRASH sp 000000716841f8c0 lr 0000007252840538 pc 0000007252840548
2023.06.16 16:11:05.189 8877 8946 Error CRASH
2023.06.16 16:11:05.189 8877 8946 Error CRASH backtrace:
2023.06.16 16:11:05.189 8877 8946 Error CRASH #00 pc 0000000000b7c548 /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #01 pc 0000000000b8cd8c /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #02 pc 0000000000b8ccfc /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #03 pc 0000000000b44abc /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #04 pc 0000000000b449a0 /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #05 pc 0000000000d39570 /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #06 pc 0000000000d3b9a8 /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #07 pc 0000000000d32ff0 /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #08 pc 0000000000513ff0 /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #09 pc 00000000000e6890 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #10 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.328 8877 8946 Error CRASH Forwarding signal 11
0001.01.01 00:00:00.000 -1 -1 Info --------- beginning of crash
2023.06.16 16:11:05.328 8877 8946 Fatal libc Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x17 in tid 8946 (Thread-5), pid 8877 (com.kamgam.sbr2)
SYMBOLICATED STACK
2023.06.16 16:11:05.189 8877 8946 Error CRASH #00 pc 0000000000b7c548 (DataBufferGLES::FlushMappedRange(unsigned long, unsigned long) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #01 pc 0000000000b8cd8c (BufferGLES::EndWrite(unsigned long) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #02 pc 0000000000b8ccfc (GfxDeviceGLES::EndBufferWrite(GfxBuffer*, unsigned long) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #03 pc 0000000000b44abc (GeometryJobTasks::PutGeometryJobTask(GfxDevice&, GeometryJobTasks::GeometryJobTask*) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #04 pc 0000000000b449a0 (GeometryJobTasks::EndFrame(GfxDevice&) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #05 pc 0000000000d39570 (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #06 pc 0000000000d3b9a8 (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #07 pc 0000000000d32ff0 (GfxDeviceWorker::RunGfxDeviceWorker(void*) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #08 pc 0000000000513ff0 (Thread::RunThreadWrapper(void*) at ??:?) /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #09 pc 00000000000e6890 (libc.so not found) /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.189 8877 8946 Error CRASH #10 pc 0000000000084b6c (libc.so not found) /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.328 8877 8946 Error CRASH Forwarding signal 11
This give a bit of context: This is not for a few users. The effect was tested on about 200k installs and I am pretty confident by now that it worked.
Not sure if this is a known problem. May this info help others with similar problems.
[참조] https://ssscool.tistory.com/387
[참조] https://devgod.tistory.com/58
반응형
'Unity3D > Tips' 카테고리의 다른 글
[Unity] JDK 11 support (0) | 2024.06.04 |
---|---|
[링크] 유니티 - 모바일 성능 최적화 (0) | 2024.01.26 |
[펌] 최적화 노하우 공유 (0) | 2024.01.25 |
[링크] 유니티 오브젝트의 null 비교 시 유의사항 (0) | 2024.01.12 |
[사용금지] Unity 2022.3 (0) | 2023.11.17 |