Bug 239303

Summary: REGRESSION(r292365): [ iOS ] TestWebKitAPI.GPUProcess.CanvasBasicCrashHandling is a constant failure on iOS
Product: WebKit Reporter: Dawn Morningstar <Morningstar>
Component: New BugsAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: ntim, simon.fraser, thorton, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=239310

Description Dawn Morningstar 2022-04-13 14:38:08 PDT
TestWebKitAPI.GPUProcess.CanvasBasicCrashHandling 
is a constant failure on iOS queues


FAILURE:
TestWebKitAPI.GPUProcess.CanvasBasicCrashHandling
        
        /Volumes/Data/worker/ios-simulator-15-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:506
        Value of: !error
          Actual: false
        Expected: true

STDIO-URL:
https://build.webkit.org/#/builders/270/builds/1535/steps/17/logs/stdio
Comment 1 Radar WebKit Bug Importer 2022-04-13 14:38:33 PDT
<rdar://problem/91715705>
Comment 3 Dawn Morningstar 2022-04-13 18:53:07 PDT
Disabled test to help speed up EWS r292850
Comment 4 Dawn Morningstar 2022-04-20 16:43:54 PDT
Locally bisected regression point to r292365
Using: run-api-tests --root /pathtobuild/ --ios-simulator TestWebKitAPI.GPUProcess.CanvasBasicCrashHandling
Comment 5 Dawn Morningstar 2022-04-20 17:38:41 PDT
https://bugs.webkit.org/show_bug.cgi?id=239310 may be related however, unable to reproduce that timeout.
Comment 6 Simon Fraser (smfr) 2022-04-22 10:16:23 PDT
When I run this test locally I hit this assertion:

    TestWebKitAPI.GPUProcess.CanvasBasicCrashHandling
        SHOULD NEVER BE REACHED
        /Volumes/Data/Development/system/webkit/OpenSource/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.cpp(123) : virtual void WebKit::ImageBufferRemoteIOSurfaceBackend::draw(WebCore::GraphicsContext &, const WebCore::FloatRect &, const WebCore::FloatRect &, const WebCore::ImagePaintingOptions &)
        1   0x573cad039 WTFCrash
        2   0x5564d8d0b WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x558617fbf WebKit::ImageBufferRemoteIOSurfaceBackend::draw(WebCore::GraphicsContext&, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&)
        4   0x5585b00b8 WebCore::ConcreteImageBuffer<WebKit::ImageBufferRemoteIOSurfaceBackend>::draw(WebCore::GraphicsContext&, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&)
        5   0x59d3c0e3a WebCore::GraphicsContext::drawImageBuffer(WebCore::ImageBuffer&, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&)
        6   0x59d3c0dcc WebCore::GraphicsContext::drawImageBuffer(WebCore::ImageBuffer&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&)
        7   0x59c687a7b WebCore::HTMLCanvasElement::paint(WebCore::GraphicsContext&, WebCore::LayoutRect const&)
        8   0x59d9df36d WebCore::RenderHTMLCanvas::paintReplaced(WebCore::PaintInfo&, WebCore::LayoutPoint const&)
        9   0x59dacdf89 WebCore::RenderReplaced::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&)
        10  0x59da1771a WebCore::RenderLayer::paintForegroundForFragmentsWithPhase(WebCore::PaintPhase, WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::PaintBehavior>, WebCore::RenderObject*)
        11  0x59da154c5 WebCore::RenderLayer::paintForegroundForFragments(WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WebCore::GraphicsContext&, WebCore::GraphicsContext&, WebCore::LayoutRect const&, bool, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::PaintBehavior>, WebCore::RenderObject*)
        12  0x59da117c3 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        13  0x59da10c61 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        14  0x59da0fb7f WebCore::RenderLayer::paintLayerWithEffects(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        15  0x59da0eea7 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        16  0x59da14e76 WebCore::RenderLayer::paintList(WebCore::RenderLayer::LayerList, WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        17  0x59da118a2 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        18  0x59da10c61 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        19  0x59da0fb7f WebCore::RenderLayer::paintLayerWithEffects(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        20  0x59da0eea7 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        21  0x59da14e76 WebCore::RenderLayer::paintList(WebCore::RenderLayer::LayerList, WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        22  0x59da118e9 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        23  0x59da10c61 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        24  0x59da0fb7f WebCore::RenderLayer::paintLayerWithEffects(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        25  0x59da0eea7 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>)
        26  0x59da0ebcf WebCore::RenderLayer::paint(WebCore::GraphicsContext&, WebCore::LayoutRect const&, WebCore::LayoutSize const&, WTF::OptionSet<WebCore::PaintBehavior>, WebCore::RenderObject*, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>, WebCore::RenderLayer::SecurityOriginPaintPolicy, WebCore::EventRegionContext*)
        27  0x59cf93794 WebCore::FrameView::paintContents(WebCore::GraphicsContext&, WebCore::IntRect const&, WebCore::Widget::SecurityOriginPaintPolicy, WebCore::EventRegionContext*)
        28  0x59cf7a821 WebCore::FrameView::paintContentsForSnapshot(WebCore::GraphicsContext&, WebCore::IntRect const&, WebCore::FrameView::SelectionInSnapshot, WebCore::FrameView::CoordinateSpaceForSnapshot)
        29  0x558bced7d WebKit::WebPage::paintSnapshotAtSize(WebCore::IntRect const&, WebCore::IntSize const&, unsigned int, WebCore::Frame&, WebCore::FrameView&, WebCore::GraphicsContext&)
        30  0x558bce80d WebKit::WebPage::snapshotAtSize(WebCore::IntRect const&, WebCore::IntSize const&, unsigned int)
        31  0x558bce5cf WebKit::WebPage::takeSnapshot(WebCore::IntRect, WebCore::IntSize, unsigned int, WTF::CompletionHandler<void (WebKit::ShareableBitmap::Handle const&)>&&)
        LEAK: 1 WebProcessPool
Comment 7 Tim Nguyen (:ntim) 2022-05-09 08:31:35 PDT
The regression point is surprising, it's supposed to be a no-op change.
Comment 8 Tim Horton 2022-05-09 09:41:02 PDT
(In reply to Tim Nguyen (:ntim) from comment #7)
> The regression point is surprising, it's supposed to be a no-op change.

Because of the way feature flag plists work, it's *possible* that this was not a no-op change in the specific case of the iOS 15 Simulator (which will never ship trunk, and originally shipped with DOMGPUP off).

But really that just means we have a GPUP bug that we weren't noticing before!
Comment 9 Said Abou-Hallawa 2022-06-09 00:57:17 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1409
Comment 10 EWS 2022-06-09 13:43:34 PDT
Committed r295433 (251439@main): <https://commits.webkit.org/251439@main>

Reviewed commits have been landed. Closing PR #1409 and removing active labels.