Skip to content

[Impeller] Vulkan unit tests crash in vkDestroyDescriptorSetLayout #127058

@gaaclarke

Description

@gaaclarke

seen in

47fd496c6f8d3b275d74e06ff9f19d63a1945e1d

steps to reproduce

  1. flutter/tools/gn --runtime-mode=debug --goma --no-lto --unoptimized --enable-impeller-vulkan
  2. autoninja -C out/host_debug_unopt
  3. VK_ICD_FILENAMES=out/host_debug_unopt/vk_swiftshader_icd.json ./out/host_debug_unopt/impeller_unittests --gtest_filter="Play/SceneTest.CuboidUnlit/Vulkan"

stacktrace

(lldb) bt
* thread #29, name = 'io.worker.2', stop reason = breakpoint 1.32
  * frame #0: 0x00007ff806e09aca libsystem_c.dylib`abort
    frame #1: 0x000000011b929d20 libvulkan.1.3.243.dylib`vkDestroyDescriptorSetLayout.cold.1 + 32
    frame #2: 0x000000011b917c7f libvulkan.1.3.243.dylib`vkDestroyDescriptorSetLayout + 47
    frame #3: 0x000000010289e6ec impeller_unittests`void impeller::vk::ObjectDestroy<impeller::vk::Device, impeller::vk::DispatchLoaderDynamic>::destroy<impeller::vk::DescriptorSetLayout>(impeller::vk::DescriptorSetLayout) [inlined] void impeller::vk::Device::destroy<impeller::vk::DispatchLoaderDynamic>(this=0x000000010de46500, descriptorSetLayout=(m_descriptorSetLayout = 0x000060000026f028), allocator=Optional<const impeller::vk::AllocationCallbacks> @ 0x00000003120d5108, d=0x0000000103fed368) const at vulkan_funcs.hpp:3419:5
    frame #4: 0x000000010289e605 impeller_unittests`void impeller::vk::ObjectDestroy<impeller::vk::Device, impeller::vk::DispatchLoaderDynamic>::destroy<impeller::vk::DescriptorSetLayout>(this=0x000000010de46500, t=(m_descriptorSetLayout = 0x000060000026f028)) at vulkan.hpp:6003:15
    frame #5: 0x000000010289e45d impeller_unittests`impeller::vk::UniqueHandle<impeller::vk::DescriptorSetLayout, impeller::vk::DispatchLoaderDynamic>::~UniqueHandle(this=0x000000010de46500) at vulkan.hpp:1202:15
    frame #6: 0x000000010289e3e3 impeller_unittests`impeller::vk::UniqueHandle<impeller::vk::DescriptorSetLayout, impeller::vk::DispatchLoaderDynamic>::~UniqueHandle(this=0x000000010de46500) at vulkan.hpp:1199:5
    frame #7: 0x00000001028b341e impeller_unittests`impeller::PipelineVK::~PipelineVK(this=0x000000010de463c0) at pipeline_vk.cc:23:25
    frame #8: 0x00000001028b34a3 impeller_unittests`impeller::PipelineVK::~PipelineVK(this=0x000000010de463c0) at pipeline_vk.cc:23:25
    frame #9: 0x00000001028ad1a9 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::default_delete<impeller::PipelineVK>::operator(this=0x0000600000246ed8, __ptr=0x000000010de463c0)[abi:v15000](impeller::PipelineVK*) const at unique_ptr.h:48:5
    frame #10: 0x00000001028ace68 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__shared_ptr_pointer<impeller::PipelineVK*, std::_LIBCPP_ABI_NAMESPACE::default_delete<impeller::PipelineVK>, std::_LIBCPP_ABI_NAMESPACE::allocator<impeller::PipelineVK> >::__on_zero_shared(this=0x0000600000246ec0) at shared_ptr.h:263:5
    frame #11: 0x0000000100024a3f impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__shared_count::__release_shared[abi:v15000](this=0x0000600000246ec0) at shared_ptr.h:174:9
    frame #12: 0x00000001000249c7 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__shared_weak_count::__release_shared[abi:v15000](this=0x0000600000246ec0) at shared_ptr.h:215:27
    frame #13: 0x000000010011395a impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor> >::~shared_ptr[abi:v15000](this=0x000060000332f650) at shared_ptr.h:702:23
    frame #14: 0x00000001000f6633 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor> >::~shared_ptr[abi:v15000](this=0x000060000332f650) at shared_ptr.h:700:5
    frame #15: 0x00000001025ef504 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__assoc_state<std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor> > >::__on_zero_shared(this=0x000060000332f5c0) at future:652:45
    frame #16: 0x0000000100024a3f impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__shared_count::__release_shared[abi:v15000](this=0x000060000332f5c0) at shared_ptr.h:174:9
    frame #17: 0x0000000100106a58 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::shared_future<std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor> > >::~shared_future(this=0x000000010df76cc8) at future:2270:19
    frame #18: 0x00000001001069a3 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::shared_future<std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor> > >::~shared_future(this=0x000000010df76cc8) at future:2268:1
    frame #19: 0x000000010010694e impeller_unittests`impeller::PipelineFuture<impeller::PipelineDescriptor>::~PipelineFuture(this=0x000000010df76bf8) at pipeline.h:24:8
    frame #20: 0x00000001000f64e3 impeller_unittests`impeller::PipelineFuture<impeller::PipelineDescriptor>::~PipelineFuture(this=0x000000010df76bf8) at pipeline.h:24:8
    frame #21: 0x00000001027ad91e impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::pair<impeller::PipelineDescriptor const, impeller::PipelineFuture<impeller::PipelineDescriptor> >::~pair(this=0x000000010df76b30) at pair.h:40:29
    frame #22: 0x00000001027ad8c3 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::pair<impeller::PipelineDescriptor const, impeller::PipelineFuture<impeller::PipelineDescriptor> >::~pair(this=0x000000010df76b30) at pair.h:40:29
    frame #23: 0x00000001027ad6d7 impeller_unittests`void std::_LIBCPP_ABI_NAMESPACE::allocator_traits<std::_LIBCPP_ABI_NAMESPACE::allocator<std::_LIBCPP_ABI_NAMESPACE::__hash_node<std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, void*> > >::destroy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::pair<impeller::PipelineDescriptor const, impeller::PipelineFuture<impeller::PipelineDescriptor> >, void, void>((null)=0x0000600003703c98, __p=0x000000010df76b30) at allocator_traits.h:319:15
    frame #24: 0x00000001027ad52f impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__hash_table<std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, std::_LIBCPP_ABI_NAMESPACE::__unordered_map_hasher<impeller::PipelineDescriptor, std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, impeller::ComparableHash<impeller::PipelineDescriptor, void>, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, true>, std::_LIBCPP_ABI_NAMESPACE::__unordered_map_equal<impeller::PipelineDescriptor, std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, impeller::ComparableHash<impeller::PipelineDescriptor, void>, true>, std::_LIBCPP_ABI_NAMESPACE::allocator<std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> > > >::__deallocate_node(this=0x0000600003703c88, __np=0x000000010df76b20) at __hash_table:1523:9
    frame #25: 0x00000001027ad447 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__hash_table<std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, std::_LIBCPP_ABI_NAMESPACE::__unordered_map_hasher<impeller::PipelineDescriptor, std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, impeller::ComparableHash<impeller::PipelineDescriptor, void>, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, true>, std::_LIBCPP_ABI_NAMESPACE::__unordered_map_equal<impeller::PipelineDescriptor, std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, impeller::ComparableHash<impeller::PipelineDescriptor, void>, true>, std::_LIBCPP_ABI_NAMESPACE::allocator<std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> > > >::~__hash_table(this=0x0000600003703c88) at __hash_table:1464:5
    frame #26: 0x00000001027ac433 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__hash_table<std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, std::_LIBCPP_ABI_NAMESPACE::__unordered_map_hasher<impeller::PipelineDescriptor, std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, impeller::ComparableHash<impeller::PipelineDescriptor, void>, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, true>, std::_LIBCPP_ABI_NAMESPACE::__unordered_map_equal<impeller::PipelineDescriptor, std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> >, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, impeller::ComparableHash<impeller::PipelineDescriptor, void>, true>, std::_LIBCPP_ABI_NAMESPACE::allocator<std::_LIBCPP_ABI_NAMESPACE::__hash_value_type<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor> > > >::~__hash_table(this=0x0000600003703c88) at __hash_table:1456:1
    frame #27: 0x00000001027af323 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::unordered_map<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor>, impeller::ComparableHash<impeller::PipelineDescriptor, void>, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, std::_LIBCPP_ABI_NAMESPACE::allocator<std::_LIBCPP_ABI_NAMESPACE::pair<impeller::PipelineDescriptor const, impeller::PipelineFuture<impeller::PipelineDescriptor> > > >::~unordered_map[abi:v15000](this=0x0000600003703c88) at unordered_map:1153:5
    frame #28: 0x00000001027a6093 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::unordered_map<impeller::PipelineDescriptor, impeller::PipelineFuture<impeller::PipelineDescriptor>, impeller::ComparableHash<impeller::PipelineDescriptor, void>, impeller::ComparableEqual<impeller::PipelineDescriptor, void>, std::_LIBCPP_ABI_NAMESPACE::allocator<std::_LIBCPP_ABI_NAMESPACE::pair<impeller::PipelineDescriptor const, impeller::PipelineFuture<impeller::PipelineDescriptor> > > >::~unordered_map[abi:v15000](this=0x0000600003703c88) at unordered_map:1151:22
    frame #29: 0x000000010288e67e impeller_unittests`impeller::PipelineLibraryVK::~PipelineLibraryVK(this=0x0000600003703c00) at pipeline_library_vk.cc:40:39
    frame #30: 0x000000010288e753 impeller_unittests`impeller::PipelineLibraryVK::~PipelineLibraryVK(this=0x0000600003703c00) at pipeline_library_vk.cc:40:39
    frame #31: 0x0000000102860269 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::default_delete<impeller::PipelineLibraryVK>::operator(this=0x0000600000220b98, __ptr=0x0000600003703c00)[abi:v15000](impeller::PipelineLibraryVK*) const at unique_ptr.h:48:5
    frame #32: 0x000000010285fed8 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__shared_ptr_pointer<impeller::PipelineLibraryVK*, std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::PipelineLibraryVK>::__shared_ptr_default_delete<impeller::PipelineLibraryVK, impeller::PipelineLibraryVK>, std::_LIBCPP_ABI_NAMESPACE::allocator<impeller::PipelineLibraryVK> >::__on_zero_shared(this=0x0000600000220b80) at shared_ptr.h:263:5
    frame #33: 0x0000000100024a3f impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__shared_count::__release_shared[abi:v15000](this=0x0000600000220b80) at shared_ptr.h:174:9
    frame #34: 0x00000001000249c7 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__shared_weak_count::__release_shared[abi:v15000](this=0x0000600000220b80) at shared_ptr.h:215:27
    frame #35: 0x00000001001136ea impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::PipelineLibrary>::~shared_ptr[abi:v15000](this=0x00000003120d5998) at shared_ptr.h:702:23
    frame #36: 0x00000001000f6533 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::shared_ptr<impeller::PipelineLibrary>::~shared_ptr[abi:v15000](this=0x00000003120d5998) at shared_ptr.h:700:5
    frame #37: 0x00000001028ac599 impeller_unittests`impeller::PipelineLibraryVK::GetPipeline(this=0x0000600003d083c8)::$_0::operator()() const at pipeline_library_vk.cc:385:3
    frame #38: 0x00000001028ac333 impeller_unittests`decltype(__f=0x0000600003d083c8)::$_0&>()()) std::_LIBCPP_ABI_NAMESPACE::__invoke[abi:v15000]<impeller::PipelineLibraryVK::GetPipeline(impeller::PipelineDescriptor)::$_0&>(impeller::PipelineLibraryVK::GetPipeline(impeller::PipelineDescriptor)::$_0&) at invoke.h:403:23
    frame #39: 0x00000001028ac293 impeller_unittests`void std::_LIBCPP_ABI_NAMESPACE::__invoke_void_return_wrapper<void, true>::__call<impeller::PipelineLibraryVK::GetPipeline(__args=0x0000600003d083c8)::$_0&>(impeller::PipelineLibraryVK::GetPipeline(impeller::PipelineDescriptor)::$_0&) at invoke.h:488:9
    frame #40: 0x00000001028ac24b impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__function::__alloc_func<impeller::PipelineLibraryVK::GetPipeline(impeller::PipelineDescriptor)::$_0, std::_LIBCPP_ABI_NAMESPACE::allocator<impeller::PipelineLibraryVK::GetPipeline(impeller::PipelineDescriptor)::$_0>, void ()>::operator(this=0x0000600003d083c8)[abi:v15000]() at function.h:185:16
    frame #41: 0x00000001028aa337 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__function::__func<impeller::PipelineLibraryVK::GetPipeline(impeller::PipelineDescriptor)::$_0, std::_LIBCPP_ABI_NAMESPACE::allocator<impeller::PipelineLibraryVK::GetPipeline(impeller::PipelineDescriptor)::$_0>, void ()>::operator(this=0x0000600003d083c0)() at function.h:359:12
    frame #42: 0x0000000100356c90 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::__function::__value_func<void ()>::operator(this=0x00000003120d5e60)[abi:v15000]() const at function.h:512:16
    frame #43: 0x0000000100356bc3 impeller_unittests`std::_LIBCPP_ABI_NAMESPACE::function<void ()>::operator(this=0x00000003120d5e60)() const at function.h:1187:12
    frame #44: 0x00000001005452e0 impeller_unittests`fml::ConcurrentMessageLoop::WorkerMain(this=0x000000010f3062c0) at concurrent_message_loop.cc:106:7
    frame #45: 0x000000010054d314 impeller_unittests`fml::ConcurrentMessageLoop::ConcurrentMessageLoop(this=0x0000600000254fe8)::$_0::operator()() const at concurrent_message_loop.cc:26:7
    frame #46: 0x000000010054d203 impeller_unittests`decltype(__f=0x0000600000254fe8)::$_0>()()) std::_LIBCPP_ABI_NAMESPACE::__invoke[abi:v15000]<fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0&&) at invoke.h:403:23
    frame #47: 0x000000010054d16b impeller_unittests`void std::_LIBCPP_ABI_NAMESPACE::__thread_execute[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(__t=0x0000600000254fe0, (null)=__tuple_indices<> @ 0x00000003120d5f67)::$_0>&, std::_LIBCPP_ABI_NAMESPACE::__tuple_indices<>) at thread:284:5
    frame #48: 0x000000010054c5f6 impeller_unittests`void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(__vp=0x0000600000254fe0) at thread:295:5
    frame #49: 0x00007ff806ee31d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #50: 0x00007ff806edebd3 libsystem_pthread.dylib`thread_start + 15

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions