filament icon indicating copy to clipboard operation
filament copied to clipboard

Crash on Android 31

Open August1996 opened this issue 3 years ago • 9 comments

Describe the bug as the picture, the crash happens on Android 31.

image

and i found that, most of machines are use Mali-G57 gpu.

image

stack

#00 pc 0000000000033b9c /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#01 pc 00000000000359fc /apex/com.android.runtime/lib64/bionic/libc.so [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#02 pc 00000000000981cc /apex/com.android.runtime/lib64/bionic/libc.so (_ZL8snprintfPcU17pass_object_size1mPKcz+92) [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#03 pc 000000000009800c /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+172) [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#04 pc 000000000019c654 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#05 pc 0000000000114a14 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#06 pc 0000000000114f64 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#07 pc 00000000000aba20 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#08 pc 00000000000ab1a8 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#09 pc 00000000000a8fd0 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#10 pc 00000000000a8ef0 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#11 pc 0000000000049c04 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#12 pc 00000000000a50e0 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#13 pc 00000000000426b4 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#14 pc 000000000012bf24 /xxx/libfilament-jni.so [arm64-v8a::667b99daac804df245f21dede78652f3]

I use addr2line command to translate 000000000012bf24 into _ZN8filament7backend18ConcreteDispatcherINS0_12OpenGLDriverEE4drawERNS0_6DriverEPNS0_11CommandBaseEPl

are ther any suggestions?

August1996 avatar Jun 23 '22 12:06 August1996

Interesting, thanks for the bug report. Which version of Filament are you using? We merged a workaround for a Mali-related issue on May 13 (#5557).

prideout avatar Jun 23 '22 16:06 prideout

Interesting, thanks for the bug report. Which version of Filament are you using? We merged a workaround for a Mali-related issue on May 13 (#5557).

@prideout my filament version is 1.21.2, is the same issues on Mali?

August1996 avatar Jun 24 '22 01:06 August1996

Interesting, thanks for the bug report. Which version of Filament are you using? We merged a workaround for a Mali-related issue on May 13 (#5557).

@prideout

with this info _ZN8filament7backend18ConcreteDispatcherINS0_12OpenGLDriverEE4drawERNS0_6DriverEPNS0_11CommandBaseEPl , can i know which line cause the crash?

August1996 avatar Jun 24 '22 06:06 August1996

Describe the bug as the picture, the crash happens on Android 31.

image

and i found that, most of machines are use Mali-G57 gpu.

image

stack

#00 pc 0000000000033b9c /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#01 pc 00000000000359fc /apex/com.android.runtime/lib64/bionic/libc.so [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#02 pc 00000000000981cc /apex/com.android.runtime/lib64/bionic/libc.so (_ZL8snprintfPcU17pass_object_size1mPKcz+92) [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#03 pc 000000000009800c /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+172) [arm64-v8a::f24f65acf653c409ca4332aced817a71]
#04 pc 000000000019c654 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#05 pc 0000000000114a14 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#06 pc 0000000000114f64 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#07 pc 00000000000aba20 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#08 pc 00000000000ab1a8 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#09 pc 00000000000a8fd0 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#10 pc 00000000000a8ef0 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#11 pc 0000000000049c04 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#12 pc 00000000000a50e0 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#13 pc 00000000000426b4 /vendor/lib64/egl/libGLES_mali.so [arm64-v8a::2ec4b9d18b1e23170000000000000000]
#14 pc 000000000012bf24 /xxx/libfilament-jni.so [arm64-v8a::667b99daac804df245f21dede78652f3]

I use addr2line command to translate 000000000012bf24 into _ZN8filament7backend18ConcreteDispatcherINS0_12OpenGLDriverEE4drawERNS0_6DriverEPNS0_11CommandBaseEPl

are ther any suggestions?

@prideout And i found that all Android Level is 31!

August1996 avatar Jun 24 '22 08:06 August1996

Interesting, thanks for the bug report. Which version of Filament are you using? We merged a workaround for a Mali-related issue on May 13 (#5557).

my filament version is 1.21.2, #5557 only reverts b2cdf9f, and this commit b2cdf9f is not on my branch.

August1996 avatar Jun 24 '22 08:06 August1996

In v1.21.2 we were still using timer queries, which we discovered are problematic on older Mali drivers (look for dont_use_timer_query in the code)

It's interesting that your issue is triggered with API level 31 (Android 12) but the actual bug is definitely within the Mali driver.

I recommend upgrading your version of Filament to v1.23.3 or higher.

prideout avatar Jun 24 '22 15:06 prideout

In v1.21.2 we were still using timer queries, which we discovered are problematic on older Mali drivers (look for dont_use_timer_query in the code)

It's interesting that your issue is triggered with API level 31 (Android 12) but the actual bug is definitely within the Mali driver.

I recommend upgrading your version of Filament to v1.23.3 or higher.

I found that the crash devices are running filament and webview(running game by other web 2d/3d engine). I don't know whether there is some bugs in Mali drivers when rendering multi scenes.

Mybe there are some ways to avoid it?

August1996 avatar Jun 28 '22 07:06 August1996

06-28 17:16:55.931 10586  6951 12903 I BufferQueueProducer: [SurfaceTexture-0-6951-2](id:1b2700000017,api:1,p:6951,c:6951) disconnect: api 1
06-28 17:16:55.931 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-12](id:1b27000000d4,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.931 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7cd08fe010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.931 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.931 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.931 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-13](id:1b27000000d9,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.931 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7ae32c0010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.931 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.931 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.931 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-14](id:1b27000000e4,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.931 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c0e44d010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.931 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.931 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-15](id:1b27000000e5,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c71729010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-16](id:1b27000000e7,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c9fbdd010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-17](id:1b27000000e8,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c43a71010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-18](id:1b27000000ea,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7ae327f010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-19](id:1b27000000eb,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c0e4ef010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-20](id:1b27000000ec,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c0ebcb010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-21](id:1b27000000ed,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7cd2816010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-22](id:1b27000000ee,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c9f848010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-23](id:1b27000000ef,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7ca2eca010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-24](id:1b27000000f0,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c5ad51010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-25](id:1b27000000f1,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c9fd14010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-26](id:1b27000000f3,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7cd131e010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-27](id:1b27000000f4,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7cd13bd010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.932 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.932 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-28](id:1b27000000f5,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.932 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c7308d010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.933 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.933 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.933 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-29](id:1b27000000f6,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.933 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7cd112f010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.933 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.933 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.933 10586  6951 12903 E BufferQueueProducer: [SurfaceTexture-0-6951-30](id:1b27000000f7,api:0,p:-1,c:6951) connect: BufferQueue has been abandoned
06-28 17:16:55.933 10586  6951 12903 E libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7c8409d010) failed (0xffffffed) (already connected to another API?)
06-28 17:16:55.933 10586  6951 12903 E libEGL  : eglCreateWindowSurfaceTmpl:700 error 3003 (EGL_BAD_ALLOC)
06-28 17:16:55.933 10586  6951 12903 E Filament: eglCreateWindowSurface failed with EGL_BAD_ALLOC
06-28 17:16:55.933 10586  6951 12903 I BufferQueueProducer: [SurfaceTexture-0-6951-32](id:1b27000000fc,api:1,p:6951,c:6951) connect: api=1 producerControlledByApp=true

...


902835: 06-28 19:53:20.574 10586  6951 12903 F libc    : FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x7cfa0770c0)
903209: 06-28 19:53:23.479 10586  6951 12903 F libc    : Fatal signal 6 (SIGABRT), code 0 (SI_USER) in tid 12903 (JNISurfaceTextu), pid 6951 (tencent.karaoke)
903221: 06-28 19:53:23.672 10586 11291 11291 E DEBUG   : failed to readlink /proc/12903/fd/564: No such file or directory
903235: 06-28 19:53:23.888  1058   657   657 I tombstoned: received crash request for pid 12903
903236: 06-28 19:53:23.893 10586 11291 11291 I crash_dump64: performing dump of process 6951 (target tid = 12903)
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : Build fingerprint: 'OPPO/PDCM00/OP4ADD:12/SP1A.210812.016/Q.202205101546:user/release-keys'
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : Revision: '0'
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : ABI: 'arm64'
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : Timestamp: 2022-06-28 19:53:23.905429942+0800
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : Process uptime: 0s
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : Cmdline: com.tencent.karaoke
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : pid: 6951, tid: 12903, name: JNISurfaceTextu  >>> com.tencent.karaoke <<<
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : uid: 10586
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : signal 6 (SIGABRT), code 0 (SI_USER), fault addr --------
06-28 19:53:24.725 10586 11291 11291 F DEBUG   : Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x7cfa0770c0)'
06-28 19:53:24.725 10586 11291 11291 F DEBUG   :     x0  0000000000000000  x1  0000000000003267  x2  0000000000000006  x3  0000007d07d391e0
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     x4  0000000000008080  x5  0000000000008080  x6  0000000000008080  x7  8080000000000000
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     x8  00000000000000f0  x9  0000007e6c2282c0  x10 ffffff00fffffbdf  x11 0000000000000001
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     x12 0101010101010101  x13 0000000062baebb0  x14 0021ea4ff3a943a0  x15 0000000000000078
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     x16 0000007e6c2ecbb0  x17 0000007e6c2c8450  x18 0000007c6ecfa000  x19 00000000000000ac
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     x20 0000000000001b27  x21 00000000000000b2  x22 0000000000003267  x23 00000000ffffffff
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     x24 0000000000000001  x25 0000000000000000  x26 0000007cb8d43400  x27 0000007d07d3a000
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     x28 0000000000000000  x29 0000007d07d39260
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :     lr  0000007e6c279b6c  sp  0000007d07d391c0  pc  0000007e6c279b9c  pst 0000000000001000
06-28 19:53:24.726 10586 11291 11291 F DEBUG   : backtrace:
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :   NOTE: Function names and BuildId information is missing for some frames due
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :   NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :   NOTE: found under the lib/ directory are readable.
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :   NOTE: On this device, run setenforce 0 to make the libraries readable.
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #00 pc 0000000000078b9c  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: f24f65acf653c409ca4332aced817a71)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #01 pc 000000000007a9fc  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+124) (BuildId: f24f65acf653c409ca4332aced817a71)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #02 pc 00000000000dd1cc  /apex/com.android.runtime/lib64/bionic/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+60) (BuildId: f24f65acf653c409ca4332aced817a71)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #03 pc 00000000000dd00c  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+172) (BuildId: f24f65acf653c409ca4332aced817a71)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #04 pc 000000000084ca2c  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #05 pc 00000000007c4d7c  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #06 pc 00000000007c52cc  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #07 pc 000000000075bb60  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #08 pc 000000000075b288  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #09 pc 00000000007591c4  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #10 pc 00000000007590e4  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #11 pc 00000000006f9d14  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #12 pc 00000000007552d4  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #13 pc 00000000006f27c4  /vendor/lib64/egl/libGLES_mali.so (BuildId: 229fd449f9127430)
06-28 19:53:24.726 10586 11291 11291 F DEBUG   :       #14 pc 000000000012bf24  /data/user/0/com.tencent.karaoke/files/dynamic/arm64-v8a/libfilament-jni.so

@prideout

We reproduced the crash by accident, but we still can not find a certain way to reproduce.

From the log, we can see Filament calls eglCreateWindowSurface(in tid 12903) and the api returns EGL_BAD_ALLOC frequently in a short time. Finally, tid 12903 crashs.

I have two questions need your help.

Question1: Is eglCreateWindowSurface returns EGL_BAD_ALLOC as expected? Question2:I search the android source code and found that, [SurfaceTexture-0-6951-5] means the fifth SurfaceTexture created by the process. From the log, we can see that SurfaceTexture was created about 30 times in a very short time. Is this as expected?

August1996 avatar Jun 29 '22 03:06 August1996

The crash is due to:

Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x7cfa0770c0)'

And it's happening somewhere in our draw() gl backend method, but we can't tell which gl function is causing it for sure.

The Mali driver is doing a use-after-free of some resource :-(

pixelflinger avatar Jul 07 '22 22:07 pixelflinger

@pixelflinger @prideout @bejado The crash is more and more serious on our app. All devices are using Mali gpu with Android 31.

All crash gpus are as follow. image

I found that the gpu list are similar to this. may be there are some inspiration for you.

image

August1996 avatar Oct 10 '22 08:10 August1996

To avoid the crash, i do something useful for these machines(Android 31 with above gpus), but it is temporary.

  • disable antiAliasing
  • disable bloomOptions
  • disable TimerQuery

August1996 avatar Dec 28 '22 15:12 August1996

To avoid the crash, i do something useful for these machines(Android 31 with above gpus), but it is temporary.

  • disable antiAliasing
  • disable bloomOptions
  • disable TimerQuery

After i remove TimerQuery in beginFrame and endFrame, it works fine. But i wonder why this crash is relevant to opengl TimerQuery @pixelflinger

dandingol03 avatar Apr 28 '23 06:04 dandingol03

I believe this has a high change of having being either fixed or worked around -- we workedaround many timer query issues on Mali.

pixelflinger avatar Jan 26 '24 19:01 pixelflinger