Bug 238580

Summary: REGRESSION(r292072): [ Mac iOS ] http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html is a constant text failure
Product: WebKit Reporter: Dawn Morningstar <Morningstar>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: jenner, mmaxfield, ntim, 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=238641
Attachments:
Description Flags
Patch
none
Patch none

Dawn Morningstar
Reported 2022-03-30 16:23:31 PDT
http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html Is a flaky text failure on Mac and iOS Suspected regression point is r292072. run-webkit-tests http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html --iterations 100 Reveals that this text failure only happens on the first iteration. Issue does not reproduce at r292069. HISTORY: https://results.webkit.org/?suite=layout-tests&test=http%2Ftests%2FwebAPIStatistics%2Fcanvas-read-and-write-data-collection.html DIFF: --- /Volumes/Data/worker/ios-simulator-15-release-gpuprocess-tests-wk2/build/layout-test-results/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt +++ /Volumes/Data/worker/ios-simulator-15-release-gpuprocess-tests-wk2/build/layout-test-results/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-actual.txt @@ -9,3 +9,11 @@ isPrevalentResource: No isVeryPrevalentResource: No dataRecordsRemoved: 0 +Registrable domain: nullOrigin + hadUserInteraction: No + mostRecentUserInteraction: -1 + grandfathered: No + IsScheduledForAllButCookieDataRemoval: No + isPrevalentResource: No + isVeryPrevalentResource: No + dataRecordsRemoved: 0 DIFF-URL: https://build.webkit.org/results/Apple-iOS-15-Simulator-Release-GPUProcess-WK2-Tests/r292075%20(697)/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-diff.txt
Attachments
Patch (5.45 KB, patch)
2022-04-01 20:46 PDT, Myles C. Maxfield
no flags
Patch (3.57 KB, patch)
2022-04-01 21:24 PDT, Myles C. Maxfield
no flags
Radar WebKit Bug Importer
Comment 1 2022-03-30 16:24:00 PDT
Robert Jenner
Comment 2 2022-03-31 14:28:51 PDT
Marked expectations for test here: https://commits.webkit.org/249082@main
Ryan Haddad
Comment 3 2022-04-01 10:23:03 PDT
Fixed test expectations for macOS in https://commits.webkit.org/249127@main
Myles C. Maxfield
Comment 4 2022-04-01 16:53:55 PDT
Reverting r292072 makes this test pass again.
Ryan Haddad
Comment 5 2022-04-01 17:28:29 PDT
It looks like disabling this test for EWS (since flaky/failing tests are skipped) has caused the failure to move to a different webAPIStatistics test: https://ews-build.s3-us-west-2.amazonaws.com/Commit-Queue/456407-21304/results.html
Ryan Haddad
Comment 6 2022-04-01 17:44:58 PDT
Myles C. Maxfield
Comment 7 2022-04-01 20:01:24 PDT
I understand what's happening now: 1. InjectedBundle::initialize() runs, which calls activateFonts() (which installs WebKit's testing fonts for the local (web) process. This queues up a notification (which is asynchronously delivered). 2. WebProcess::createWebPage() runs, which loads a dummy empty page, which uses -webkit-standard, and so we end up calling realizeNextFallback() and therefore WebResourceLoadObserver::logFontLoad(). This populates some dummy statistics in the WebResourceLoadObserver under the domain "nullOrigin". 3. InjectedBundle::beginTesting() runs, which calls WebResourceLoadObserver::clearState(). The previously-recorded statistics are now gone. 4. The pending notification gets delivered. The page is still the dummy page. The style recalc ends up calling realizeNextFallback() and therefore WebResourceLoadObserver::logFontLoad(). This populates some more dummy statistics in the WebResourceLoadObserver under the domain "nullOrigin". Before r292072 this didn't use to happen. 5. The test runs, loads some stuff, and dumps the contents of the WebResourceLoadObserver. The contents contain both statistics that the test intentionally created, as well as the dummy statistics that was placed there by the layout the notification caused.
Myles C. Maxfield
Comment 8 2022-04-01 20:02:10 PDT
Reopening because there is work to do to make the test work properly.
Myles C. Maxfield
Comment 9 2022-04-01 20:03:26 PDT
One thing to realize from the above story is that this problem only occurs during testing. Real users wouldn't actually encounter this problem.
Myles C. Maxfield
Comment 10 2022-04-01 20:46:08 PDT
Myles C. Maxfield
Comment 11 2022-04-01 21:24:38 PDT
Myles C. Maxfield
Comment 12 2022-04-01 21:34:26 PDT
Putting back in config changed, so I can continue this in https://bugs.webkit.org/show_bug.cgi?id=238483
Note You need to log in before you can comment on or make changes to this bug.