Skip to content

[Impeller] Segfault in Vulkan back end when running framework tests #144116

Closed
flutter-team-archive/engine
#50990

Description

@jason-simmons

flutter_tester is segfaulting or failing assertions at various points within vk::Framebuffer::executeLoadOp/vk::Image.

This can be reliably reproduced when running the test/widgets/shadow_test.dart framework test with --enable-impeller.

The exact place of the failure is inconsistent across runs. An example stack trace:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055fc6db6eb79 in vk::Image::rowPitchBytes (this=0x55fc6faffe98, aspect=VK_IMAGE_ASPECT_COLOR_BIT, 
    mipLevel=0) at ../../flutter/third_party/swiftshader/src/Vulkan/VkImage.cpp:833
#1  0x000055fc6e1ac8c9 in sw::Blitter::fastClear (this=<optimized out>, 
    clearValue=clearValue@entry=0x7fc996ffc440, clearFormat=clearFormat@entry=..., 
    dest=dest@entry=0x55fc6faffe98, viewFormat=..., subresourceRange=..., renderArea=0x55fc6faed3b8)
    at ../../flutter/third_party/swiftshader/src/Device/Blitter.cpp:263
#2  0x000055fc6e1ac021 in sw::Blitter::clear (this=0x55fc6f42edb0, pixel=0x7fc996ffc440, format=..., 
    dest=0x55fc6faffe98, viewFormat=..., subresourceRange=..., renderArea=0x55fc6faed3b8)
    at ../../flutter/third_party/swiftshader/src/Device/Blitter.cpp:88
#3  0x000055fc6db71751 in vk::Image::clear (this=<optimized out>, pixelData=<optimized out>, 
    pixelFormat=<optimized out>, viewFormat=..., subresourceRange=..., renderArea=<optimized out>)
    at ../../flutter/third_party/swiftshader/src/Vulkan/VkImage.cpp:1068
#4  0x000055fc6db71751 in vk::Image::clear (this=0x55fc6faffe98, clearValue=..., viewFormat=..., 
    renderArea=..., subresourceRange=...)
#5  0x000055fc6db6bd56 in vk::ImageView::clear (this=0x55fc6fafffe8, clearValue=..., aspectMask=1, 
    renderArea=...) at ../../flutter/third_party/swiftshader/src/Vulkan/VkImageView.cpp:192
#6  0x000055fc6db72b81 in vk::Framebuffer::executeLoadOp (this=0x55fc6fafd928, renderPass=0x55fc6fafd878, 
    clearValueCount=<optimized out>, pClearValues=<optimized out>, renderArea=...)
    at ../../flutter/third_party/swiftshader/src/Vulkan/VkFramebuffer.cpp:126
#7  0x000055fc6db65a7b in vk::CommandBuffer::submit (this=0x55fc6faed178, executionState=...)
    at ../../flutter/third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:2330
#8  0x000055fc6db53a2b in vk::Queue::submitQueue (this=this@entry=0x55fc6f42e8e0, task=...)
    at ../../flutter/third_party/swiftshader/src/Vulkan/VkQueue.cpp:104
#9  0x000055fc6db532cb in vk::Queue::taskLoop (this=0x55fc6f42e8e0, scheduler=<optimized out>)
    at ../../flutter/third_party/swiftshader/src/Vulkan/VkQueue.cpp:156
#10 0x000055fc6db5461b in std::_fl::__invoke[abi:v15000]<void (vk::Queue::*)(marl::Scheduler*), vk::Queue*, ma--Type <RET> for more, q to quit, c to continue without paging--c
rl::Scheduler*, void>(void (vk::Queue::*&&)(marl::Scheduler*), vk::Queue*&&, marl::Scheduler*&&) (
    __f=@0x55fc6f427058: (void (vk::Queue::*)(vk::Queue * const, marl::Scheduler *)) 0x55fc6db53230 <vk::Queue::taskLoop(marl::Scheduler*)>, __a0=@0x55fc6f427068: 0x55fc6f42e8e0, __args=@0x55fc6f427070: 0x55fc6f4270e0)
    at ../../third_party/libcxx/include/__functional/invoke.h:368
#11 std::_fl::__thread_execute[abi:v15000]<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct> >, void (vk::Queue::*)(marl::Scheduler*), vk::Queue*, marl::Scheduler*, 2ul, 3ul>(std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct> >, void (vk::Queue::*)(marl::Scheduler*), vk::Queue*, marl::Scheduler*>&, std::_fl::__tuple_indices<2ul, 3ul>) (__t=...) at ../../third_party/libcxx/include/thread:284
#12 std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct> >, void (vk::Queue::*)(marl::Scheduler*), vk::Queue*, marl::Scheduler*> >(void*) (__vp=0x55fc6f427050) at ../../third_party/libcxx/include/thread:295
#13 0x00007fc9e60c93ec in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:444
#14 0x00007fc9e6149a4c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

This seems to have started happening after flutter-team-archive/engine@81035b7 landed (which is not directly related to Impeller).

Activity

  1. added
    in triagePresently being triaged by the triage team
    a: tests"flutter test", flutter_test, or one of our tests
    engineflutter/engine related. See also e: labels.
    e: impellerImpeller rendering backend issues and features requests
    and removed
    in triagePresently being triaged by the triage team
    on Feb 26, 2024
  2. added
    P1High-priority issues at the top of the work list
    on Feb 26, 2024
  3. github-actions commented on Mar 14, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: tests"flutter test", flutter_test, or one of our testse: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.r: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions