Bug 238280

Summary: REGRESSION? (248052@main): ASSERTION FAILED: didContain in WebCore::removeActiveContext(WebCore::WebGLRenderingContextBase &)
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: WebGLAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, kbr, kkinnunen, kondapallykalyan, mmaxfield, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 222411    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Ryan Haddad 2022-03-23 12:29:57 PDT
The following API test is consistently asserting on iOS debug bots, it looks to have started with https://commits.webkit.org/248052@main which added the assertion.

TestWebKitAPI.WebKitLegacy.WebGLNoCrashOnOtherThreadAccess
        2022-03-23 11:30:50.720 TestWebKitAPI[59178:71510078] Writing analzed variants.
        Shader compiler output: Metal
        ASSERTION FAILED: didContain
        ./html/canvas/WebGLRenderingContextBase.cpp(826) : void WebCore::removeActiveContext(WebCore::WebGLRenderingContextBase &)
        1   0x112f460e9 WTFCrash
        2   0x164a44f7b WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x16872698a WebCore::removeActiveContext(WebCore::WebGLRenderingContextBase&)
        4   0x1687262ec WebCore::WebGLRenderingContextBase::destroyGraphicsContextGL()
        5   0x168724a8c WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase()
        6   0x16875e455 WebCore::WebGLRenderingContext::~WebGLRenderingContext()
        7   0x1687410a5 WebCore::WebGLRenderingContext::~WebGLRenderingContext()
        8   0x1687410c9 WebCore::WebGLRenderingContext::~WebGLRenderingContext()
        9   0x1684caf5c std::__1::default_delete<WebCore::CanvasRenderingContext>::operator()(WebCore::CanvasRenderingContext*) const
        10  0x1684caedc std::__1::unique_ptr<WebCore::CanvasRenderingContext, std::__1::default_delete<WebCore::CanvasRenderingContext> >::reset(WebCore::CanvasRenderingContext*)
        11  0x1684b75b4 std::__1::unique_ptr<WebCore::CanvasRenderingContext, std::__1::default_delete<WebCore::CanvasRenderingContext> >::operator=(std::nullptr_t)
        12  0x1684b74f8 WebCore::HTMLCanvasElement::~HTMLCanvasElement()
        13  0x1684b75f5 WebCore::HTMLCanvasElement::~HTMLCanvasElement()
        14  0x1684b7659 WebCore::HTMLCanvasElement::~HTMLCanvasElement()
        15  0x16818868c WebCore::Node::removedLastRef()
        16  0x164abd16c WebCore::Node::deref() const
        17  0x16817f8c5 WebCore::Node::derefEventTarget()
        18  0x165011a89 WebCore::EventTarget::deref()
        19  0x165011a39 WTF::Ref<WebCore::EventTarget, WTF::RawPtrTraits<WebCore::EventTarget> >::~Ref()
        20  0x165011995 WTF::Ref<WebCore::EventTarget, WTF::RawPtrTraits<WebCore::EventTarget> >::~Ref()
        21  0x165699d49 WebCore::JSDOMWrapper<WebCore::EventTarget, WTF::RawPtrTraits<WebCore::EventTarget> >::~JSDOMWrapper()
        22  0x165699d25 WebCore::JSEventTarget::~JSEventTarget()
        23  0x16562e4c5 WebCore::JSEventTarget::~JSEventTarget()
        24  0x1655eb24d WebCore::JSEventTarget::destroy(JSC::JSCell*)
        25  0x114bc0207 JSC::JSDestructibleObjectDestroyFunc::operator()(JSC::VM&, JSC::JSCell*) const
        26  0x114bc01d5 JSC::JSDestructibleObjectHeapCellType::destroy(JSC::VM&, JSC::JSCell*) const
        27  0x11447fdca JSC::Subspace::destroy(JSC::VM&, JSC::JSCell*)
        28  0x114473311 JSC::PreciseAllocation::sweep()
        29  0x114459723 JSC::MarkedSpace::sweepPreciseAllocations()
        30  0x1143af2c0 JSC::Heap::sweepInFinalize()
        31  0x1143af00a JSC::Heap::finalize()


https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.AppPrivacyReport.AppInitiatedRequestWithNavigation
Comment 1 Radar WebKit Bug Importer 2022-03-23 12:30:09 PDT
<rdar://problem/90716816>
Comment 2 Kimmo Kinnunen 2022-03-30 01:56:01 PDT
Created attachment 456101 [details]
Patch
Comment 3 EWS 2022-03-31 04:50:01 PDT
Committed r292154 (249061@main): <https://commits.webkit.org/249061@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 456101 [details].