Bug 196781

Summary: [iOS Sim Debug] ASSERTION FAILED: m_downloads.isEmpty() Layout Test http/tests/websocket/tests/hybi/network-process-crash-error.html 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, darin, ggaren, lforschler, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=167341
Attachments:
Description Flags
Patch none

Description Shawn Roberts 2019-04-10 14:04:14 PDT
The following layout test is flaky on iOS Simulator Debug

http/tests/websocket/tests/hybi/network-process-crash-error.html

Probable cause:

Test has been crashing on its available history on dashboard. Layout results show an Assertion failure. Looking at bot logs there are no crash logs during the times it is crashing. 

Found through local testing that if http/tests/download/anchor-load-after-download.html is run before http/tests/websocket/tests/hybi/network-process-crash-error.html it will crash 100% of the time on current revisions all the way down to r240541. It will pass on r240469. In that range https://trac.webkit.org/changeset/240530/webkit unskipped the test, and turned on support for a feature in iOS. I am unsure if this was a change from this revision, or uncovering an old bug. There are some radars for this crash log which I will like in the radar I create. I will also attach the full crash log from the local crash there as well.

reproduced locally with:

run-webkit-tests http/tests/download/anchor-load-after-download.html http/tests/websocket/tests/hybi/network-process-crash-error.html --ios-simulator --debug --child-process 1

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fwebsocket%2Ftests%2Fhybi%2Fnetwork-process-crash-error.html

Assertion:

https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r244108%20(3228)/http/tests/websocket/tests/hybi/network-process-crash-error-crash-log.txt

ASSERTION FAILED: m_downloads.isEmpty()
/Volumes/Data/slave/ios-simulator-12-debug/build/Source/WebKit/UIProcess/Downloads/DownloadProxyMap.cpp(53) : WebKit::DownloadProxyMap::~DownloadProxyMap()
1   0x10899bb59 WTFCrash
2   0x10d95b18b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x10e5cc1c5 WebKit::DownloadProxyMap::~DownloadProxyMap()
4   0x10e5cc375 WebKit::DownloadProxyMap::~DownloadProxyMap()
5   0x10e5d1818 WebKit::NetworkProcessProxy::~NetworkProcessProx
Comment 1 Radar WebKit Bug Importer 2019-04-10 14:04:54 PDT
<rdar://problem/49789381>
Comment 2 Chris Dumez 2019-04-11 15:27:42 PDT
Created attachment 367250 [details]
Patch
Comment 3 Chris Dumez 2019-04-12 09:11:51 PDT
Comment on attachment 367250 [details]
Patch

Clearing flags on attachment: 367250

Committed r244217: <https://trac.webkit.org/changeset/244217>
Comment 4 Chris Dumez 2019-04-12 09:11:52 PDT
All reviewed patches have been landed.  Closing bug.