Bug 197530

Summary: [iOS Sim Debug] ASSERTION FAILED The atomic string comes from an other thread! Layout Test imported/w3c/web-platform-tests/workers/WorkerNavigator_appName.htm is a flaky crash
Product: WebKit Reporter: Shawn Roberts <sroberts>
Component: Tools / TestsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, commit-queue, ggaren, jlewis3, lforschler, rniwa, ryanhaddad, tsavell, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Shawn Roberts 2019-05-02 13:49:36 PDT
The following layout test is flaky on iOS Simulator Debug

imported/w3c/web-platform-tests/workers/WorkerNavigator_appName.htm

Probable cause:

Test has been a flaky crash on its available history on the dashboard. Running the test by itself with 10000 iterations could not cause a crash.

When I use the test runners from the crashing runs I was able to narrow it down to two tests to reproduce this assertion:

run-webkit-tests imported/w3c/web-platform-tests/html/browsers/browsing-the-web/read-media/pageload-video.html imported/w3c/web-platform-tests/workers/WorkerNavigator_appName.htm --child-process 1 --ios-simulator --debug

When run in that order it will crash. Will crash with the oldest revision I can checkout which is r230021

Will attach full crash log to radar

Test was imported in https://trac.webkit.org/changeset/225593/webkit

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=imported%2Fw3c%2Fweb-platform-tests%2Fworkers%2FWorkerNavigator_appName.htm

Link to Assertion on bots:

https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r244820%20(3520)/imported/w3c/web-platform-tests/workers/WorkerNavigator_appName-crash-log.txt

Local Crash Log clip:

Thread 32 Crashed:: WebCore: Worker
0   JavaScriptCore                	0x0000000114ed38d4 WTFCrash + 36
1   com.apple.WebCore             	0x00000007a833de49 WTF::AtomicStringImpl::add(WTF::AtomicStringTable&, WTF::StringImpl&) + 137
2   com.apple.WebCore             	0x00000007a833dd75 WTF::RefPtr<WTF::AtomicStringImpl, WTF::DumbPtrTraits<WTF::AtomicStringImpl> > WTF::AtomicStringImpl::addWithStringTableProvider<JSC::VM>(JSC::VM&, WTF::StringImpl*) + 85
3   com.apple.WebCore             	0x00000007a833dcbf JSC::Identifier::add(JSC::VM*, WTF::StringImpl*) + 63
4   com.apple.WebCore             	0x00000007a833dbb9 JSC::Identifier::Identifier(JSC::VM*, WTF::StringImpl*) + 73
5   com.apple.WebCore             	0x00000007a833db65 JSC::Identifier::Identifier(JSC::VM*, WTF::StringImpl*) + 37
6   com.apple.WebCore             	0x00000007a833d3c4 JSC::Identifier::fromString(JSC::ExecState*, WTF::String const&) + 68
Comment 1 Radar WebKit Bug Importer 2019-05-03 10:29:12 PDT
<rdar://problem/50448285>
Comment 2 Radar WebKit Bug Importer 2019-05-03 10:29:13 PDT
<rdar://problem/50448281>
Comment 3 Chris Dumez 2019-05-03 12:57:52 PDT
Created attachment 368968 [details]
Patch
Comment 4 Chris Dumez 2019-05-03 13:06:17 PDT
Created attachment 368969 [details]
Patch
Comment 5 Geoffrey Garen 2019-05-03 14:39:32 PDT
Comment on attachment 368969 [details]
Patch

r=me
Comment 6 Chris Dumez 2019-05-03 15:03:28 PDT
Comment on attachment 368969 [details]
Patch

Clearing flags on attachment: 368969

Committed r244927: <https://trac.webkit.org/changeset/244927>
Comment 7 Chris Dumez 2019-05-03 15:03:30 PDT
All reviewed patches have been landed.  Closing bug.