Bug 229250

Summary: [ iOS Debug ] 12 TestWebKitAPI.WebKitLegacy. tests are crashing
Product: WebKit Reporter: ayumi_kojima
Component: New BugsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, rniwa, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
Disable the thread assertion in iOS none

Description ayumi_kojima 2021-08-18 14:31:27 PDT
TestWebKitAPI.WebKitLegacy.WebGLNoCrashOnOtherThreadAccess
TestWebKitAPI.WebKitLegacy.WebGLPrepareDisplayOnWebThread
TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
TestWebKitAPI.WebKitLegacy.TimeInputAccessoryViewTest
TestWebKitAPI.WebKitLegacy.SetTimeoutFunction
TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia
TestWebKitAPI.WebKitLegacy.ScrollToRevealSelection
TestWebKitAPI.WebKitLegacy.RenderInContextSnapshot
TestWebKitAPI.WebKitLegacy.PreemptVideoFullscreen
TestWebKitAPI.WebKitLegacy.MonthInputAccessoryViewTest
TestWebKitAPI.WebKitLegacy.DateTimeLocalInputAccessoryViewTest
TestWebKitAPI.WebKitLegacy.DateInputAccessoryViewTest

Are crashing on iOS 14 Simulator Debug.

History: https://results.webkit.org/?suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&suite=api-tests&test=TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS&test=TestWebKitAPI.WebKitLegacy.WebGLPrepareDisplayOnWebThread&test=TestWebKitAPI.WebKitLegacy.WebGLNoCrashOnOtherThreadAccess&test=TestWebKitAPI.WebKitLegacy.TimeInputAccessoryViewTest&test=TestWebKitAPI.WebKitLegacy.SetTimeoutFunction&test=TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia&test=TestWebKitAPI.WebKitLegacy.ScrollToRevealSelection&test=TestWebKitAPI.WebKitLegacy.RenderInContextSnapshot&test=TestWebKitAPI.WebKitLegacy.PreemptVideoFullscreen&test=TestWebKitAPI.WebKitLegacy.MonthInputAccessoryViewTest&test=TestWebKitAPI.WebKitLegacy.DateTimeLocalInputAccessoryViewTest&test=TestWebKitAPI.WebKitLegacy.DateInputAccessoryViewTest

 ASSERTION FAILED: m_thread.ptr() == &Thread::current()
        /Volumes/Data/worker/ios-simulator-14-debug/build/WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/CheckedRef.h(251) : void WTF::SingleThreadIntegralWrapper<unsigned short>::assertThread() const [IntegralType = unsigned short]
        1   0x1071e6f39 WTFCrash
        2   0x1213f19cb WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x12632e232 WTF::SingleThreadIntegralWrapper<unsigned short>::assertThread() const
        4   0x12632e16c WTF::SingleThreadIntegralWrapper<unsigned short>::operator!() const
        5   0x12630a9dd WTF::CanMakeCheckedPtrBase<WTF::SingleThreadIntegralWrapper<unsigned short>, unsigned short>::~CanMakeCheckedPtrBase()
        6   0x12630a92c WebCore::Style::Scope::~Scope()
        7   0x12630aa65 WebCore::Style::Scope::~Scope()
        8   0x12444b1db std::__1::default_delete<WebCore::Style::Scope>::operator()(WebCore::Style::Scope*) const
        9   0x12444b15f std::__1::unique_ptr<WebCore::Style::Scope, std::__1::default_delete<WebCore::Style::Scope> >::reset(WebCore::Style::Scope*)
        10  0x12444b0f9 std::__1::unique_ptr<WebCore::Style::Scope, std::__1::default_delete<WebCore::Style::Scope> >::~unique_ptr()
        11  0x1243d2465 std::__1::unique_ptr<WebCore::Style::Scope, std::__1::default_delete<WebCore::Style::Scope> >::~unique_ptr()
        12  0x1243d0ea7 WebCore::Document::~Document()
        13  0x12493a7c8 WebCore::HTMLDocument::~HTMLDocument()
        14  0x12493a7e5 WebCore::HTMLDocument::~HTMLDocument()
        15  0x12493a8ac WebCore::HTMLDocument::~HTMLDocument()
        16  0x1243d2fa9 WebCore::Document::decrementReferencingNodeCount()
        17  0x1243d2a54 WebCore::Document::removedLastRef()
        18  0x1245aa464 WebCore::Node::removedLastRef()
        19  0x1216a359f WebCore::Node::deref() const
        20  0x1223e0071 WTF::DefaultRefDerefTraits<WebCore::Document>::derefIfNotNull(WebCore::Document*)
        21  0x1223e0039 WTF::RefPtr<WebCore::Document, WTF::RawPtrTraits<WebCore::Document>, WTF::DefaultRefDerefTraits<WebCore::Document> >::~RefPtr()
        22  0x1223e0005 WTF::RefPtr<WebCore::Document, WTF::RawPtrTraits<WebCore::Document>, WTF::DefaultRefDerefTraits<WebCore::Document> >::~RefPtr()
        23  0x1250cca20 WebCore::DocumentWriter::begin(WTF::URL const&, bool, WebCore::Document*)
        24  0x1250c458e WebCore::DocumentLoader::commitData(unsigned char const*, unsigned long)
        25  0x1404d35ce -[WebFrame(WebInternal) _commitData:]
        26  0x1405ae0b1 -[WebHTMLRepresentation receivedData:withDataSource:]
        27  0x1404bb41a -[WebDataSource(WebInternal) _receivedData:]
        28  0x1404b1c91 WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, unsigned char const*, int)
        29  0x1250cbfc1 WebCore::DocumentLoader::commitLoad(unsigned char const*, int)
        30  0x1250cd710 WebCore::DocumentLoader::dataReceived(unsigned char const*, int)
        31  0x125114253 auto WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction)::$_5::operator()<WTF::Span<unsigned char const, 18446744073709551615ul> const>(WTF::Span<unsigned char const, 18446744073709551615ul> const&) const
        Child process terminated with signal 11: Segmentation fault

stdio: https://build.webkit.org/#/builders/69/builds/1578/steps/17/logs/stdio
Comment 1 Radar WebKit Bug Importer 2021-08-18 14:41:56 PDT
<rdar://problem/82094968>
Comment 2 ayumi_kojima 2021-08-18 15:25:33 PDT
It looks like it started in https://trac.webkit.org/changeset/281105/webkit
Comment 3 Ryosuke Niwa 2021-08-18 15:36:12 PDT
Created attachment 435808 [details]
Disable the thread assertion in iOS
Comment 4 Ryosuke Niwa 2021-08-18 17:20:56 PDT
Comment on attachment 435808 [details]
Disable the thread assertion in iOS

Clearing flags on attachment: 435808

Committed r281217 (240654@main): <https://commits.webkit.org/240654@main>
Comment 5 Ryosuke Niwa 2021-08-18 17:20:59 PDT
All reviewed patches have been landed.  Closing bug.