One way to reproduce this:
- Run Gallery on Android with Impeller/Vulkan using a host_debug_unopt build
- Go to the Shrine demo
- Scroll quickly though the images
- Use the Android back gesture to suspend the app before all of the images have been decoded and displayed
On a Pixel 6a, the Mali Vulkan implementation may abort with a call to HandleUsingDestroyedMutex that triggers an assert:
Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xb4000074243e87c4)
This happens because CommandQueueVK::Submit submitted a command buffer with a fence that is then passed to FenceWaiterVK::AddFence. But AddFence fails because the FenceWaiterVK was terminated during engine shutdown.
AddFence then destroys the fence, but the Vulkan implementation still associates the fence with the command buffer. The assert then happens when the command buffer completes and attempts to signal the destroyed fence.
One way to reproduce this:
On a Pixel 6a, the Mali Vulkan implementation may abort with a call to
HandleUsingDestroyedMutexthat triggers an assert:Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xb4000074243e87c4)This happens because
CommandQueueVK::Submitsubmitted a command buffer with a fence that is then passed toFenceWaiterVK::AddFence. ButAddFencefails because theFenceWaiterVKwas terminated during engine shutdown.AddFencethen destroys the fence, but the Vulkan implementation still associates the fence with the command buffer. The assert then happens when the command buffer completes and attempts to signal the destroyed fence.