Bug 260556 - fast/dom/selectorAPI/caseID.html is a constant text failure (when repro steps are followed).
Summary: fast/dom/selectorAPI/caseID.html is a constant text failure (when repro steps...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-22 16:22 PDT by Ben Schwartz
Modified: 2023-08-24 11:45 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Schwartz 2023-08-22 16:22:45 PDT
fast/dom/selectorAPI/caseID.html

This test is a flaky failure on macOS and iOS.

HISTORY (link throwing 403 error):

https://results.webkit.org/?suite=layout-tests&test=fast%2Fdom%2FSelectorAPI%2FcaseID.html

TEXT DIFF:

 PASS document.querySelector('#lower1').textContent is 'lower 1'
-PASS document.querySelector('#LOWER2').textContent is 'lower 2'
+FAIL document.querySelector('#LOWER2').textContent should be lower 2. Threw exception TypeError: null is not an object (evaluating 'document.querySelector('#LOWER2').textContent')
 PASS document.querySelector('#UPPER1').textContent is 'UPPER 1'
 PASS document.querySelector('#upper2').textContent is 'UPPER 2'
 PASS document.getElementById('lower1').matches('#lower1') is true
-PASS document.getElementById('lower2').matches('#LOWER2') is true
+FAIL document.getElementById('lower2').matches('#LOWER2') should be true. Was false.
 PASS document.getElementById('UPPER1').matches('#UPPER1') is true
 PASS document.getElementById('UPPER2').matches('#upper2') is true
 PASS document.getElementById('lower1').webkitMatchesSelector('#lower1') is true
-PASS document.getElementById('lower2').webkitMatchesSelector('#LOWER2') is true
+FAIL document.getElementById('lower2').webkitMatchesSelector('#LOWER2') should be true. Was false.
 PASS document.getElementById('UPPER1').webkitMatchesSelector('#UPPER1') is true
 PASS document.getElementById('UPPER2').webkitMatchesSelector('#upper2') is true
 PASS successfullyParsed is true

DIFF URL:

https://build.webkit.org/results/Apple-Ventura-Release-AppleSilicon-WK2-Tests/267146%40main%20(4573)/fast/dom/SelectorAPI/caseID-pretty-diff.html

REPRODUCTION:

I was unable to reproduce this bug on macOS Ventura 13.5 (22G74/arm64). I will do more research.
Comment 1 Radar WebKit Bug Importer 2023-08-22 16:23:05 PDT
<rdar://problem/114287946>
Comment 2 Ben Schwartz 2023-08-22 17:29:54 PDT
REPRODUCTION:

It appears that the failure of this test depends on these three tests being run before:

fast/dom/HTMLMeterElement/meter-clone.html
fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
fast/dom/SelectorAPI/caseID-strict.html

When running these tests in sequence prior to the reported test, I was able to reproduce this bug on macOS Ventura 13.5 (22G74/arm64) with at a constant rate using the following command:

run-webkit-tests --verbose --clobber-old-results --debug --child-processes 1 fast/dom/HTMLMeterElement/meter-clone.html fast/dom/SelectorAPI/attrname-case-sensitive.xhtml fast/dom/SelectorAPI/caseID-strict.html fast/dom/SelectorAPI/caseID.html
Comment 3 EWS 2023-08-22 17:48:26 PDT
Test gardening commit 267166@main (f11bf4050d7b): <https://commits.webkit.org/267166@main>

Reviewed commits have been landed. Closing PR #16957 and removing active labels.
Comment 4 Anne van Kesteren 2023-08-23 00:45:08 PDT
Antti, you might want to take a look at this.
Comment 5 Chris Dumez 2023-08-23 16:05:51 PDT
This is caused by the SelectorQueryCache. Disabling that cache makes the issue go away. Likely a regression from when Antti made the SelectorQueryCache be shared across documents.
Comment 6 Chris Dumez 2023-08-23 16:07:13 PDT
(In reply to Chris Dumez from comment #5)
> This is caused by the SelectorQueryCache. Disabling that cache makes the
> issue go away. Likely a regression from when Antti made the
> SelectorQueryCache be shared across documents.

I was referring to Bug 254732.
Comment 7 Chris Dumez 2023-08-24 08:56:26 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17016
Comment 8 EWS 2023-08-24 11:45:17 PDT
Committed 267237@main (727dbe30fe5f): <https://commits.webkit.org/267237@main>

Reviewed commits have been landed. Closing PR #17016 and removing active labels.