Bug 243563

Summary: fast/dom/HTMLLinkElement/link-stylesheet-load-once.html very frequently fail
Product: WebKit Reporter: Hercules Hjalmarsson <hhjalmarsson>
Component: New BugsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, rniwa, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=243626

Description Hercules Hjalmarsson 2022-08-04 15:28:44 PDT
fast/dom/HTMLLinkElement/link-stylesheet-load-once.html

Is a constant text failure on macOS/iOS15 wk2 queues.

HISTORY:
https://results.webkit.org/?suite=layout-tests&test=fast%2Fdom%2FHTMLLinkElement%2Flink-stylesheet-load-once.html

DIFF:
--- /Volumes/Data/worker/Apple-iPadOS-15-Simulator-Debug-WK2-Tests/build/layout-test-results/fast/dom/HTMLLinkElement/link-stylesheet-load-once-expected.txt
+++ /Volumes/Data/worker/Apple-iPadOS-15-Simulator-Debug-WK2-Tests/build/layout-test-results/fast/dom/HTMLLinkElement/link-stylesheet-load-once-actual.txt
@@ -1,7 +1,7 @@
-data:text/css,div { background: green; width: 100px; height: 100px } - willSendRequest <NSURLRequest URL data:text/css,div { background: green; width: 100px; height: 100px }, main document URL link-stylesheet-load-once.html, http method GET> redirectResponse (null)
-link-stylesheet-load-once.html - didFinishLoading
+data:text/css,div { background: green; width: 100px; height: 100px } - willSendRequest <NSURLRequest URL data:text/css,div { background: green; width: 100px; height: 100px }, main document URL (null), http method GET> redirectResponse (null)
 data:text/css,div { background: green; width: 100px; height: 100px } - didReceiveResponse <NSURLResponse data:text/css,div { background: green; width: 100px; height: 100px }, http status code 200>
 data:text/css,div { background: green; width: 100px; height: 100px } - didFinishLoading
+link-stylesheet-load-once.html - didFinishLoading
 This tests overriding rel content attribute with the same value.
 You should see 1 in a green box below:
 
DIFF URL:
https://build.webkit.org/results/Apple-iPadOS-15-Simulator-Debug-WK2-Tests/252947@main%20(1934)/fast/dom/HTMLLinkElement/link-stylesheet-load-once-diff.txt
Comment 1 Radar WebKit Bug Importer 2022-08-04 15:29:20 PDT
<rdar://problem/98151769>
Comment 2 Hercules Hjalmarsson 2022-08-04 15:42:26 PDT
I was able to bisect this issue on macOS release to 252943@main when this test was first introduced by running command:

run-webkit-tests --iterations=10 fast/dom/HTMLLinkElement/link-stylesheet-load-once.html
Comment 3 Ryosuke Niwa 2022-08-04 15:51:38 PDT
We probably need to skip this test on iOS for now.
Comment 4 Hercules Hjalmarsson 2022-08-04 15:53:26 PDT
(In reply to Ryosuke Niwa from comment #3)
> We probably need to skip this test on iOS for now.

I will set iOS expectation to skip.
Comment 5 EWS 2022-08-04 16:04:06 PDT
Test gardening commit 253136@main (474ef37d3d46): <https://commits.webkit.org/253136@main>

Reviewed commits have been landed. Closing PR #3030 and removing active labels.
Comment 6 Ryosuke Niwa 2022-08-04 16:14:52 PDT
Thanks!
Comment 7 Ryosuke Niwa 2022-08-04 22:43:08 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3035
Comment 8 EWS 2022-08-05 08:52:10 PDT
Committed 253147@main (7b24f7be0a0b): <https://commits.webkit.org/253147@main>

Reviewed commits have been landed. Closing PR #3035 and removing active labels.
Comment 9 Ryosuke Niwa 2022-08-06 00:25:36 PDT
Hm... this test is still flaky on iOS :(
Comment 10 Ryosuke Niwa 2022-08-06 01:34:20 PDT
New diff looks like this:
--- /Volumes/Data/worker/Apple-iPadOS-15-Simulator-Release-WK2-Tests/build/layout-test-results/fast/dom/HTMLLinkElement/link-stylesheet-load-once-expected.txt
+++ /Volumes/Data/worker/Apple-iPadOS-15-Simulator-Release-WK2-Tests/build/layout-test-results/fast/dom/HTMLLinkElement/link-stylesheet-load-once-actual.txt
@@ -1,5 +1,5 @@
+link-stylesheet-load-once.html - didFinishLoading
 resources/link-stylesheet-load-once.css - willSendRequest <NSURLRequest URL resources/link-stylesheet-load-once.css, main document URL link-stylesheet-load-once.html, http method GET> redirectResponse (null)
-link-stylesheet-load-once.html - didFinishLoading
 resources/link-stylesheet-load-once.css - didReceiveResponse <NSURLResponse resources/link-stylesheet-load-once.css, http status code 0>
 resources/link-stylesheet-load-once.css - didFinishLoading
 This tests overriding rel content attribute with the same value.

e.g.
https://build.webkit.org/results/Apple-iPadOS-15-Simulator-Release-WK2-Tests/253154@main%20(2262)/results.html
https://build.webkit.org/results/Apple-iPadOS-15-Simulator-Debug-WK2-Tests/253170@main%20(1968)/results.html
Comment 11 Ryosuke Niwa 2022-08-06 01:35:54 PDT
Unfortunately, I can't reproduce the failure locally so need to make another speculative fix.
Comment 12 Ryosuke Niwa 2022-08-06 01:37:17 PDT
Actually, let's use another bug.
Comment 13 Ryosuke Niwa 2022-08-06 01:38:06 PDT
Tracking the flakiness in https://bugs.webkit.org/show_bug.cgi?id=243626