godotengine / godotengine/godot

Android / Vulkan Mobile crash on MediaTek MT6765 and MT6855 (PowerVR GE8320 and BXM 8-256) when creating pipeline for scene shader (analytics report)

Open
#115,170 6 comments 1 reaction 1 assignee Claimed by @blueskythlikesclouds View on GitHub
bug confirmed crash platform:android topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.5.stable
- Reproducible in 4.6.stable
- Reproducible in https://github.com/akien-mga/godot/releases/tag/4.5.1.stable%2Bvulkan_mobile_fixes which is 4.5.1.stable + cherry-picks of Vulkan Mobile fixes made by @blueskythlikesclouds recently (https://github.com/akien-mga/godot/compare/4.5.1-stable...4.5.1.stable+vulkan_mobile_fixes).

### System information

Various Android devices (versions 10 to 15) with Mediatek MT6765 (ImgTech PowerVR GE8320) or Mediatek MT6855 (4x ImgTech BXM 8-256)

Checking logs from the previous Spooky Express build on 4.5.stable, here's the full list of affected SoC on a bigger sample of devices:
- Mediatek MT6765 (PowerVR GE8320)
- Mediatek MT6765V/XBA (PowerVR GE8320)
- Mediatek MT6762 (PowerVR GE8320)
- Mediatek MT6762V/CA (PowerVR GE8320)
- Mediatek MT6762V/CB (PowerVR GE8320)
- Mediatek MT6855 (4x BXM 8-256)
- Mediatek MT6779p90 (2x PowerVR GM9446)
- Mediatek MT6779p95 (2x PowerVR GM9446)
- Mediatek MT8768N (PowerVR GE8320)
- Spreadtrum SC9863A (PowerVR GE8322)
- Spreadtrum T603 (PowerVR GE8322)

160 affected users in 8 days.

### Issue description

This is a crash seen in the wild on a number of devices with @Draknek's [Spooky Express](https://play.google.com/store/apps/details?id=express.spooky) (10k+ install base).

We're seeing the following crash stacktrace affecting devices with either Mediatek MT6765 SoC (Imagination Technologies PowerVR GE8320) or MT6855 (BXM 8-256), on multiple recent Android versions.

```
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 32217 >>> express.spooky <<<

backtrace:
#00 pc 0x0000000000095204 /apex/com.android.runtime/lib64/bionic/libc.so (abort+180)
#01 pc 0x000000000096773c /vendor/lib64/libufwriter.so
#02 pc 0x00000000009ab260 /vendor/lib64/libufwriter.so
#03 pc 0x00000000009ac598 /vendor/lib64/libufwriter.so
#04 pc 0x00000000009b0714 /vendor/lib64/libufwriter.so
#05 pc 0x00000000009c09a0 /vendor/lib64/libufwriter.so
#06 pc 0x00000000009c6b18 /vendor/lib64/libufwriter.so (BILParseStream+204)
#07 pc 0x0000000000058cc0 /vendor/lib64/hw/vulkan.mt6765.so
#08 pc 0x0000000001edd640 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (RenderingDeviceDriverVulkan::render_pipeline_create(RenderingDeviceDriver::ShaderID, RenderingDeviceDriver::VertexFormatID, RenderingDeviceCommons::RenderPrimitive, RenderingDeviceCommons::PipelineRasterizationState, RenderingDeviceCommons::PipelineMultisampleState, RenderingDeviceCommons::PipelineDepthStencilState, RenderingDeviceCommons::PipelineColorBlendState, VectorView, BitField, RenderingDeviceDriver::RenderPassID, unsigned int, VectorView)+5227) (BuildId: a9b34d498052473c)
#09 pc 0x00000000033709a4 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (RenderingDevice::render_pipeline_create(RID, long, long, RenderingDeviceCommons::RenderPrimitive, RenderingDeviceCommons::PipelineRasterizationState const&, RenderingDeviceCommons::PipelineMultisampleState const&, RenderingDeviceCommons::PipelineDepthStencilState const&, RenderingDeviceCommons::PipelineColorBlendState const&, BitField, unsigned int, Vector const&)+4093) (BuildId: a9b34d498052473c)
#10 pc 0x000000000365d004 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (RendererSceneRenderImplementation::SceneShaderForwardMobile::ShaderData::_create_pipeline(RendererSceneRenderImplementation::SceneShaderForwardMobile::ShaderData::PipelineKey)+436) (BuildId: a9b34d498052473c)
#11 pc 0x000000000365ad80 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (WorkerThreadPool::TaskUserData::callback()+205) (BuildId: a9b34d498052473c)
#12 pc 0x0000000003f16f54 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (WorkerThreadPool::_process_task(WorkerThreadPool::Task*)+142) (BuildId: a9b34d498052473c)
#13 pc 0x0000000003f17a28 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (WorkerThreadPool::_thread_function(void*)+218) (BuildId: a9b34d498052473c)
#14 pc 0x0000000003945474 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*)+64) (BuildId: a9b34d498052473c)
#15 pc 0x000000000394582c /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (void* std::__ndk1::__thread_proxy[abi:nn190000]>, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*>>(void*)+150) (BuildId: a9b34d498052473c)
#16 pc 0x0000000000102dc0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
#17 pc 0x0000000000096b50 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
```

Fully symbolicated stack trace with `ndk-stack`

```
********** Crash dump: **********
#00 0x0000000000095204 /apex/com.android.runtime/lib64/bionic/libc.so (abort+180)
#01 0x000000000096773c /vendor/lib64/libufwriter.so
#02 0x00000000009ab260 /vendor/lib64/libufwriter.so
#03 0x00000000009ac598 /vendor/lib64/libufwriter.so
#04 0x00000000009b0714 /vendor/lib64/libufwriter.so
#05 0x00000000009c09a0 /vendor/lib64/libufwriter.so
#06 0x00000000009c6b18 /vendor/lib64/libufwriter.so (BILParseStream+204)
#07 0x0000000000058cc0 /vendor/lib64/hw/vulkan.mt6765.so
#08 0x0000000001edd640 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (RenderingDeviceDriverVulkan::render_pipeline_create(RenderingDeviceDriver::ShaderID, RenderingDeviceDriver::VertexFormatID, RenderingDeviceCommons::RenderPrimitive, RenderingDeviceCommons::PipelineRasterizationState, RenderingDeviceCommons::PipelineMultisampleState, RenderingDeviceCommons::PipelineDepthStencilState, RenderingDeviceCommons::PipelineColorBlendState, VectorView, BitField, RenderingDeviceDriver::RenderPassID, unsigned int, VectorView)+5227) (BuildId: a9b34d498052473c)
RenderingDeviceDriverVulkan::render_pipeline_create(RenderingDeviceDriver::ShaderID, RenderingDeviceDriver::VertexFormatID, RenderingDeviceCommons::RenderPrimitive, RenderingDeviceCommons::PipelineRasterizationState, RenderingDeviceCommons::PipelineMultisampleState, RenderingDeviceCommons::PipelineDepthStencilState, RenderingDeviceCommons::PipelineColorBlendState, VectorView, BitField, RenderingDeviceDriver::RenderPassID, unsigned int, VectorView)
/root/godot/drivers/vulkan/rendering_device_driver_vulkan.cpp:5227:17
#09 0x00000000033709a4 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (RenderingDevice::render_pipeline_create(RID, long, long, RenderingDeviceCommons::RenderPrimitive, RenderingDeviceCommons::PipelineRasterizationState const&, RenderingDeviceCommons::PipelineMultisampleState const&, RenderingDeviceCommons::PipelineDepthStencilState const&, RenderingDeviceCommons::PipelineColorBlendState const&, BitField, unsigned int, Vector const&)+4093) (BuildId: a9b34d498052473c)
RenderingDevice::render_pipeline_create(RID, long, long, RenderingDeviceCommons::RenderPrimitive, RenderingDeviceCommons::PipelineRasterizationState const&, RenderingDeviceCommons::PipelineMultisampleState const&, RenderingDeviceCommons::PipelineDepthStencilState const&, RenderingDeviceCommons::PipelineColorBlendState const&, BitField, unsigned int, Vector const&)
/root/godot/servers/rendering/rendering_device.cpp:4093:31
#10 0x000000000365d004 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (RendererSceneRenderImplementation::SceneShaderForwardMobile::ShaderData::_create_pipeline(RendererSceneRenderImplementation::SceneShaderForwardMobile::ShaderData::PipelineKey)+436) (BuildId: a9b34d498052473c)
RendererSceneRenderImplementation::SceneShaderForwardMobile::ShaderData::_create_pipeline(RendererSceneRenderImplementation::SceneShaderForwardMobile::ShaderData::PipelineKey)
/root/godot/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp:436:38
#11 0x000000000365ad80 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (WorkerThreadPool::TaskUserData::callback()+205) (BuildId: a9b34d498052473c)
WorkerThreadPool::TaskUserData::callback()
/root/godot/./core/object/worker_thread_pool.h:205:4
#12 0x0000000003f16f54 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (WorkerThreadPool::_process_task(WorkerThreadPool::Task*)+142) (BuildId: a9b34d498052473c)
WorkerThreadPool::_process_task(WorkerThreadPool::Task*)
/root/godot/core/object/worker_thread_pool.cpp:142:31
#13 0x0000000003f17a28 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (WorkerThreadPool::_thread_function(void*)+218) (BuildId: a9b34d498052473c)
WorkerThreadPool::_thread_function(void*)
/root/godot/core/object/worker_thread_pool.cpp:218:22
#14 0x0000000003945474 /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*)+64) (BuildId: a9b34d498052473c)
Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*)
/root/godot/core/os/thread.cpp:64:3
#15 0x000000000394582c /data/app/~~skTZdozpaScPyTvKlzTv0A==/express.spooky-uq9T6JAGeb5TEdH7Xh19jw==/split_config.arm64_v8a.apk!libgodot_android.so (void* std::__ndk1::__thread_proxy[abi:nn190000]>, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*>>(void*)+150) (BuildId: a9b34d498052473c)
decltype(std::declval()(std::declval(), std::declval(), std::declval(), std::declval())) std::__ndk1::__invoke[abi:nn190000](void (*&&)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long&&, Thread::Settings&&, void (*&&)(void*), void*&&)
/root/sdk/ndk/28.1.13356709/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__type_traits/invoke.h:150:25
void std::__ndk1::__thread_execute[abi:nn190000]>, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*, 2ul, 3ul, 4ul, 5ul>(std::__ndk1::tuple>, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*>&, std::__ndk1::__tuple_indices<2ul, 3ul, 4ul, 5ul>)
/root/sdk/ndk/28.1.13356709/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__thread/thread.h:193:3
void* std::__ndk1::__thread_proxy[abi:nn190000]>, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*>>(void*)
/root/sdk/ndk/28.1.13356709/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__thread/thread.h:202:3
#16 0x0000000000102dc0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
#17 0x0000000000096b50 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
```

The stacktrace looks similar to the one seen in https://github.com/godotengine/godot/issues/114743#issuecomment-3724777936 for an Intel Mesa half-float support issue, but I assume this stacktrace is just a generic "shader failed miserably" error and we'll need to dig deeper to understand what happens.

CC @blueskythlikesclouds @clayjohn @DarioSamo

### Steps to reproduce

Unknown, but possibly run Spooky Express on a device with one of the aforementioned SoCs.

### Minimal reproduction project (MRP)

n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.