Search Unity

Bug Vulkan AccessWholeImage() crash

Discussion in 'Android' started by npestov, Feb 19, 2023.

  1. npestov

    npestov

    Joined:
    Feb 7, 2018
    Posts:
    10
    Crash occurs in about 1% of users. 90% of crashes are Samsung devices.

    backtrace:

    #00 pc 0x00000000007871d0 /data/app/lib/arm64/libunity.so (vk::Image::AccessWholeImage(vk::CommandBuffer*, VkImageLayout, unsigned int, unsigned int, bool, bool))

    #01 pc 0x000000000074c8a0 /data/app/lib/arm64/libunity.so (vk::RenderPassSwitcher::InternalApply(vk::CommandBuffer*))

    #02 pc 0x00000000007763b4 /data/app/lib/arm64/libunity.so (GfxDeviceVKBase::EnsureCurrentCommandBuffer(vk::CommandBuffer::Type, bool))

    #03 pc 0x0000000000771704 /data/app/lib/arm64/libunity.so (GfxDeviceVK::ClearImpl(GfxClearFlags, ColorRGBAf const*, int, unsigned int, float, unsigned int))

    #04 pc 0x0000000000835bd0 /data/app/lib/arm64/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&))

    #05 pc 0x000000000083dae8 /data/app/lib/arm64/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&))

    #06 pc 0x00000000008351b8 /data/app/lib/arm64/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*))

    #07 pc 0x00000000002aa144 /data/app/lib/arm64/libunity.so (Thread::RunThreadWrapper(void*))

    #08 pc 0x00000000000bb6e8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)

    #09 pc 0x0000000000054fdc /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68)
     
  2. TareqAlomour

    TareqAlomour

    Joined:
    Jan 10, 2021
    Posts:
    3
    We're facing the same issue
     
  3. Teksel

    Teksel

    Joined:
    Jun 13, 2017
    Posts:
    3
    Hi! Also facing similar problem for around 1% of users. But the devices are now
    Motorola Moto Z (2) Play and Motorola Moto G(7) Play with Adreno (TM) 506 GPU

    stack traces are a bit different though:

    Crashed: Thread: SIGSEGV 0x0000000000000080
    #00 pc 0x6654b8 libunity.so (GfxDeviceVK::UploadUnusedBufferResource(vk::BufferResource*, void const*, unsigned int, unsigned int)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #01 pc 0x66540a libunity.so (GfxDeviceVK::InitializeBufferInternal(GfxBuffer*, void const*, GfxUpdateBufferFlags)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #02 pc 0x557472 libunity.so (dynamic_array<SubMesh, 0u>::~dynamic_array()) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #03 pc 0x6653b6 libunity.so (GfxDeviceVKBase::ReserveDynamicVBOBuffer(DynamicVBOScratchMemory*, GfxBuffer*, unsigned int)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #04 pc 0x76bbf7 libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #05 pc 0x9189f libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #06 pc 0x961c6 libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #07 pc 0xc9e7fa libunity.so (__gnu_uldivmod_helper) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #08 pc 0xc9e636 libunity.so (__aeabi_uldivmod) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #09 pc 0x8cc5f3 libunity.so (Baselib_ErrorState_Validate_PageRange(unsigned long long, unsigned long long, unsigned long long, UnityClassic::Baselib_Memory_PageSizeInfo const&, UnityClassic::Baselib_ErrorState*)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #10 pc 0x961c6 libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #11 pc 0x5d04ff libunity.so (GfxDevice::GetProceduralQuadIndexBuffer(int)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #12 pc 0x7b349b libunity.so (block_locate_free) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #13 pc 0x7b35c3 libunity.so (tlsf_memalign) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #14 pc 0xec50be libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #15 pc 0xec50be libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #16 pc 0xec1616 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #17 pc 0x10c579 libunity.so (MemoryManager::VirtualAllocator::ReserveMemoryBlock(unsigned int, LowLevelVirtualAllocator::BlockInfo)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #18 pc 0xec571e libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #19 pc 0xec0bba libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #20 pc 0xcf07a3 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #21 pc 0xcf07a3 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #22 pc 0xebec02 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #23 pc 0x22a00f libunity.so (CurrentThreadIsMainThread()) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #24 pc 0x76c52d libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #25 pc 0x961c6 libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #26 pc 0x765ae5 libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #27 pc 0x22a09f libunity.so (Thread::RunThreadWrapper(void*)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #28 pc 0xd6e176 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #29 pc 0xef495e libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #30 pc 0x479fe libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #31 pc 0x47dc7 libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #32 pc 0x47daf libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #33 pc 0x1b0b5 libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #34 pc 0x47daf libc.so (BuildId: fb7e0b7a432ea3f2cc2d1b7c15eff28a)
    #35 pc 0x22a00f libunity.so (CurrentThreadIsMainThread()) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)

    Crashed: Thread: SIGSEGV 0x0000000000000008
    #00 pc 0x622a90 libunity.so (vk::Texture::UseImage(vk::CommandBuffer*)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #01 pc 0x64c4c2 libunity.so (vk::RenderSurface::CreateDepthSurfaceImpl(vk::RenderSurface*, vk::CommandBuffer*, vk::ImageManager&, GraphicsFormat, VkExtent3D, int)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #02 pc 0x10bb57 libunity.so (MemoryManager::Allocate(unsigned int, unsigned int, MemLabelId, AllocateOptions, char const*, int)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #03 pc 0x64c16e libunity.so (vk::RenderSurface::CreateDepthSurfacePlatform(vk::RenderSurface*, vk::CommandBuffer*, vk::ImageManager&, GraphicsFormat, bool)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #04 pc 0x6678c6 libunity.so (GfxDeviceVK::CreateDepthRenderSurfacePlatform(RenderSurfaceBase*, GraphicsFormat)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #05 pc 0x5d2be2 libunity.so (GfxDevice::AllocRenderSurface(bool)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #06 pc 0x7673e7 libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #07 pc 0xb6266 libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #08 pc 0xc9e7fa libunity.so (__gnu_uldivmod_helper) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #09 pc 0xc9e636 libunity.so (__aeabi_uldivmod) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #10 pc 0x8cc5f3 libunity.so (Baselib_ErrorState_Validate_PageRange(unsigned long long, unsigned long long, unsigned long long, UnityClassic::Baselib_Memory_PageSizeInfo const&, UnityClassic::Baselib_ErrorState*)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #11 pc 0xb6266 libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #12 pc 0x5d04ff libunity.so (GfxDevice::GetProceduralQuadIndexBuffer(int)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #13 pc 0x7b349b libunity.so (block_locate_free) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #14 pc 0x7b35c3 libunity.so (tlsf_memalign) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #15 pc 0xec50be libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #16 pc 0xec50be libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #17 pc 0xec1616 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #18 pc 0x10c579 libunity.so (MemoryManager::VirtualAllocator::ReserveMemoryBlock(unsigned int, LowLevelVirtualAllocator::BlockInfo)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #19 pc 0xec571e libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #20 pc 0xec0bba libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #21 pc 0xcf07a3 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #22 pc 0xcf07a3 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #23 pc 0xec0bba libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #24 pc 0xebec02 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #25 pc 0x76c52d libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #26 pc 0xb6266 libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #27 pc 0x765ae5 libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #28 pc 0x22a09f libunity.so (Thread::RunThreadWrapper(void*)) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #29 pc 0xd6e176 libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #30 pc 0xef495e libunity.so (__ashldi3) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
    #31 pc 0x217f9 libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #32 pc 0xa6133 libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #33 pc 0xa611d libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #34 pc 0x60743 libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #35 pc 0xa611d libc.so (BuildId: 00923b7c96f4f2fd61ba6f80a3f10346)
    #36 pc 0x22a00f libunity.so (CurrentThreadIsMainThread()) (BuildId: a20d0d545843dca6cb2d2d14f7d944b3222d87a3)
     
    Last edited: Apr 20, 2023
  4. RaventurnPatrick

    RaventurnPatrick

    Joined:
    Aug 9, 2011
    Posts:
    250
    One solution would be to disable the Vulkan Graphics API in the Player Settings (disable Auto-Graphics API and remove Vulkan - only keep OpenGL3 and OpenGl2)
     
  5. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    Same issue here: 2021.3.23 LTS, we're seeing this Vulkan crash with AccessWholeImage showing up on Cloud Diagnostics.
     
  6. kogi_rc

    kogi_rc

    Joined:
    Apr 23, 2019
    Posts:
    39
    We notice seemingly the same issue specifically with Adreno 618 GPUs:

    segfault
    Code (CSharp):
    1. Thread 0 Crashed:
    2. 0   libunity.so                     0x781419bbac        vk::Image::AccessWholeImage
    3. 1   libunity.so                     0x781415dcdc        vk::RenderPassSwitcher::InternalApply
    4. 2   libunity.so                     0x7814190268        GfxDeviceVKBase::BeforeDrawCall
    5. 3   libunity.so                     0x7814187b2c        GfxDeviceVKBase::DrawBuffersInternal
    6. 4   libunity.so                     0x7814191ab0        GfxDeviceVKBase::DrawBufferRangesPlatform
    7. 5   libunity.so                     0x781408e510        SinglePassStereoSupportExt::DrawBuffersStereo
    8. 6   libunity.so                     0x7814187a94        GfxDeviceVKBase::DrawBuffers
    9. 7   libunity.so                     0x781409023c        DynamicVBO::DrawChunk
    10. 8   libunity.so                     0x781425247c        GfxDeviceWorker::RunCommand
    11. 9   libunity.so                     0x7814253618        GfxDeviceWorker::RunExt
    12. 10  libunity.so                     0x781424ace8        GfxDeviceWorker::RunGfxDeviceWorker
    13. 11  libunity.so                     0x7813cf239c        Thread::RunThreadWrapper
    Customer can reproduce 100% in one code path but we can't access the device for more in-depth debugging.

    Unity 2021.3.22f1, IL2CPP
     
    Last edited: Jun 6, 2023
  7. unity_D7731F5DE044E7FF9D39

    unity_D7731F5DE044E7FF9D39

    Joined:
    Nov 24, 2022
    Posts:
    1
    Having similar problem with OnePlus 8 Pro (Adreno 650)
    Code (CSharp):
    1. 00 libunity.so vk::Image::AccessWholeImage
    2. 01 libunity.so GfxDeviceVK::EnsureValidBackbuffer
    3. 02 libunity.so vk::RenderPassSwitcher::InternalApply
    4. 03 libunity.so GfxDeviceVKBase::BeforeDrawCall
    5. 04 libunity.so GfxDeviceVKBase::DrawBuffersInternal
    6. 05 libunity.so GfxDeviceVKBase::DrawBufferRangesPlatform
    7. 06 libunity.so non-virtual thunk to GfxDeviceVKBase::DrawBufferRangesPlatform
    8. 07 libunity.so SinglePassStereoSupportExt::DrawBuffersStereo
    9. 08 libunity.so GfxDeviceVKBase::DrawBuffers
    10. 09 libunity.so GfxDeviceWorker::RunCommand
    11. 10 libunity.so GfxDeviceWorker::RunExt
    12. 11 libunity.so GfxDeviceWorker::Run
    13. 12 libunity.so GfxDeviceWorker::RunGfxDeviceWorker
    14. 13 libunity.so Thread::RunThreadWrapper
    Unity 2021.3.25f1, IL2CPP
    Any help would be greatly appreciated.
     
  8. kogi_rc

    kogi_rc

    Joined:
    Apr 23, 2019
    Posts:
    39
    Interesting. During our testing POCO F3 with Adreno 650 isn't affected by our problem which seemed to be the same.

    This makes workarounds harder because we began downgrading from Vulkan to OpenGL based on GPU name but it seems that the root cause may be somewhere else or our problem cases are different.

    Known problem devices for us:
    - Redmi Note 9 Pro
    - Galaxy A52
    - Mi 9T
    Android OS 11 and 13 versions have been reported in problem tracker.
     
  9. kogi_rc

    kogi_rc

    Joined:
    Apr 23, 2019
    Posts:
    39
    We managed to gather additional logs from one of the affected devices but unfortunately it doesn't tell us much:

    Code (CSharp):
    1. 2023-07-10  18:23:43.907    1204    1251    W       System      A resource failed to call close.
    2. 2023-07-10  18:23:43.907    1204    1251    W       System      A resource failed to call close.
    3. 2023-07-10  18:23:43.907    1204    1251    W       System      A resource failed to call close.
    4. 2023-07-10  18:23:43.907    1204    1251    W       System      A resource failed to call close.
    5. 2023-07-10  18:23:43.907    1204    1251    W       System      A resource failed to call close.
    6. 2023-07-10  18:23:44.965    2194    2977    E       bt_l2cap        L2CAP - rcvd ACL for unknown handle:3804 ls:0 cid:472 opcode:10 cur count:0
    7. 2023-07-10  18:23:44.966    2194    2977    E       bt_l2cap        L2CAP - rcvd ACL for unknown handle:3804 ls:0 cid:218 opcode:10 cur count:0
    8. 2023-07-10  18:23:44.966    2194    2977    E       bt_l2cap        L2CAP - rcvd ACL for unknown handle:3804 ls:0 cid:1246 opcode:10 cur count:0
    9. 2023-07-10  18:23:44.967    2194    2977    E       bt_l2cap        L2CAP - rcvd ACL for unknown handle:3804 ls:0 cid:223 opcode:10 cur count:0
    10. 2023-07-10  18:23:44.967    2194    2977    E       bt_l2cap        L2CAP - rcvd ACL for unknown handle:3804 ls:0 cid:224 opcode:10 cur count:0
    11. 2023-07-10  18:23:44.968    2194    2977    E       bt_l2cap        L2CAP - rcvd ACL for unknown handle:3804 ls:0 cid:225 opcode:10 cur count:0
    12. 2023-07-10  18:23:45.298    30187   4401    W       IPM     Closest action 2
    13. 2023-07-10  18:23:45.353    30187   4401    W       IPM     Closest action 4
    14. 2023-07-10  18:23:45.369    4339    4597    E       SwappyVk        Failed to wait for fence 2
    15. 2023-07-10  18:23:45.448    30187   4401    W       IPM     Closest action 4
    16. 2023-07-10  18:23:45.561    4339    4501    W       Adreno-GSL      <gsl_ldd_control:553>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 71 Protocol error
    17. 2023-07-10  18:23:45.561    4339    4501    W       Adreno-GSL      <log_gpu_snapshot:462>: panel.gpuSnapshotPath is not set.not generating user snapshot
    18. 2023-07-10  18:23:45.570    4339    4597    E       SwappyVk        Failed to wait for fence 2
    19. 2023-07-10  18:23:45.598    30187   4401    W       IPM     Closest action 4
    20. 2023-07-10  18:23:45.647    30187   4401    W       IPM     Closest action 4
    21. 2023-07-10  18:23:45.771    4339    4597    E       SwappyVk        Failed to wait for fence 2
    22. 2023-07-10  18:23:45.945    4339    4501    W       Adreno-GSL      <gsl_ldd_control:553>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 71 Protocol error
    23. 2023-07-10  18:23:45.946    4339    4501    W       Adreno-GSL      <log_gpu_snapshot:462>: panel.gpuSnapshotPath is not set.not generating user snapshot
    24. 2023-07-10  18:23:46.148    4339    4597    E       SwappyVk        Failed to wait for fence 2
    25. 2023-07-10  18:23:46.339    4339    4501    W       Adreno-GSL      <gsl_ldd_control:553>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 71 Protocol error
    26. 2023-07-10  18:23:46.339    4339    4501    W       Adreno-GSL      <log_gpu_snapshot:462>: panel.gpuSnapshotPath is not set.not generating user snapshot
    27. 2023-07-10  18:23:46.541    4339    4597    E       SwappyVk        Failed to wait for fence 2
    28. 2023-07-10  18:23:46.718    4339    4501    W       Adreno-GSL      <gsl_ldd_control:553>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    29. 2023-07-10  18:23:46.718    4339    4501    W       Adreno-GSL      <log_gpu_snapshot:462>: panel.gpuSnapshotPath is not set.not generating user snapshot
    30. 2023-07-10  18:23:46.719    4339    4501    W       Adreno-GSL      <gsl_ldd_control:553>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    31. 2023-07-10  18:23:46.719    4339    4501    W       Adreno-GSL      <log_gpu_snapshot:462>: panel.gpuSnapshotPath is not set.not generating user snapshot
    32. 2023-07-10  18:23:46.719    4339    4597    E       SwappyVk        Failed to wait for fence 2
    33. 2023-07-10  18:23:46.719    4339    4501    E       SwappyVk        Failed to vkQueueSubmit -4
    34. 2023-07-10  18:23:46.770    4339    4501    W       Adreno-GSL      <gsl_ldd_control:553>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    35. 2023-07-10  18:23:46.770    4339    4501    W       Adreno-GSL      <log_gpu_snapshot:462>: panel.gpuSnapshotPath is not set.not generating user snapshot
    36. 2023-07-10  18:23:46.771    4339    4501    W       Adreno-GSL      <gsl_ldd_control:553>: ioctl fd 82 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 35 Resource deadlock would occur
    37. 2023-07-10  18:23:46.771    4339    4501    W       Adreno-GSL      <log_gpu_snapshot:462>: panel.gpuSnapshotPath is not set.not generating user snapshot
    38. 2023-07-10  18:23:46.771    4339    4597    E       SwappyVk        Failed to wait for fence 2
    39. 2023-07-10  18:23:46.771    4339    4501    E       SwappyVk        Failed to vkQueueSubmit -4
    40. 2023-07-10  18:23:46.973    4339    4501    E       BufferQueueProducer     [SurfaceView - com.REDACTED/com.REDACTED.RendererSelectionActivity@250f3f0@0#1(BLAST Consumer)1](id:10f300000001,api:1,p:4339,c:4339) dequeueBuffer: attempting to exceed the max dequeued buffer count (2)
    41. 2023-07-10  18:23:46.973    4339    4501    W       vulkan      dequeueBuffer timed out: Function not implemented (-38)
    42. 2023-07-10  18:23:47.309    5137    5137    W       chromium        [0710/182347.306563:WARNING:thread_snapshot_linux.cc(112)] Unknown scheduling policy 1073741825
    43. 2023-07-10  18:23:47.365    1204    1251    W       System      A resource failed to call close.
    44. 2023-07-10  18:23:47.365    1204    1251    W       System      A resource failed to call close.
    45.  
    This is logged along the crash when one additive scene is being unloaded, which triggers the crash.
     
    Last edited: Jul 10, 2023
  10. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
  11. kogi_rc

    kogi_rc

    Joined:
    Apr 23, 2019
    Posts:
    39
    Our crash was always happening on scene unload. We found that pausing all indirect rendering and compute shaders one frame ahead of scene unload avoids the crash scenario.
    There's still some testing to be done and the fix hasn't rolled out to the public but we can't reproduce the crash anymore on any of our test devices.

    Oh, and we updated to 2021.3.28f1, too, but it didn't fix the crash on its own, so we had to come up with workaround above.
     
    ilmario and joshuacwilde like this.