Speculation-rules navigation intermittently doesn't use a completed prefetch
Categories
(Core :: Networking, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: smayya, Assigned: acreskey)
References
(Blocks 1 open bug)
Details
(Keywords: intermittent-failure, Whiteboard: [necko-triaged][fxpe])
Attachments
(1 external file)
While testing bug 2070841, several speculation-rules prefetch WPTs failed intermittently in a local macOS debug build (--headless, 11 runs each). Each time, the navigation went to the network instead of using the prefetched response, so the navigated page never saw the Sec-Purpose: prefetch header:
assert_in_array: Navigation didn't use the prefetched response! value undefined not in array ["prefetch", "prefetch;anonymous-client-ip"]
Failure rates:
no-vary-search/prefetch-single.https.html?21-21: 8/11no-vary-search/prefetch-single.https.html?5-5: 2/11no-vary-search/prefetch-single.https.html?8-8: 2/11no-vary-search/prefetch-single.https.html?9-9: 1/11no-vary-search/prefetch-single.https.html?12-12: 1/11mutate-rules.https.html("Removing a rule from the <script type=speculationrules> must not cancel the prefetch"): 1/11tentative/service-worker/basic.sub.https.html?origin=same-site&sw=no-controllerand...&clientId: 1/11
In mutate-rules.https.html the server confirms the prefetch request arrived before the navigation, so the prefetch did start. The tests wait a fixed 2 seconds (forceSinglePrefetch) before navigating. When a test fails, the prefetch record is either not complete yet or not matched at navigation time.
These tests are marked expected: [PASS, FAIL] ([FAIL, PASS] for ?21-21) in the patches for bug 2070841.
https://tests.firefox.dev/test.html?test=/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html
https://tests.firefox.dev/test.html?test=/speculation-rules/prefetch/mutate-rules.https.html
| Reporter | ||
Updated•2 months ago
|
| Reporter | ||
Comment 1•1 month ago
|
||
more tests show the same intermittent failure on try (https://treeherder.mozilla.org/jobs?repo=try&revision=1093c0984df537c0f8c48163e615f9ddb19e236b),
all ending in assert_prefetched … value undefined (the navigation was served from the network):
- initiators-a-element.sub.https.html?same-site <a>
- prefetch-status.https.html (200, 250, 299)
- same-origin-cookies.https.html (?1-1, ?2-last)
- referrer-policy.https.html?1-1, referrer-policy-from-rules.https.html?1-1, referrer-policy-not-accepted.https.html?1-1
- user-pass.https.html?cross-origin=false
- navigation-timing-delivery-type.https.html?prefetch=true&bypass_cache=false
- navigation-timing-requestStart-responseStart.https.html?include=afterResponse
- tentative/service-worker/basic.sub.https.html?origin=same-site&sw=no-fetch-handler (and &clientId)
| Reporter | ||
Comment 2•1 month ago
|
||
One more from try (https://treeherder.mozilla.org/jobs?repo=try&revision=464c1e3e9d6c3f5dc7a1f1d04d979595e366df47): prefetch-single.https.html?from_protocol=https&to_protocol=https ("test single https url prefetch from a https url") failed on Android debug and Linux ASan with the same value undefined symptom. Marked [PASS, FAIL] with this bug.
| Reporter | ||
Comment 3•1 month ago
|
||
One more from try (https://treeherder.mozilla.org/jobs?repo=try&revision=464c1e3e9d6c3f5dc7a1f1d04d979595e366df47): prefetch-single.https.html?from_protocol=https&to_protocol=https ("test single https url prefetch from a https url") failed on Android debug and Linux ASan with the same value undefined symptom. Marked [PASS, FAIL] with this bug.
| Assignee | ||
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 4•1 month ago
|
||
Otherwise a no-store prefetched response can be purged before the navigation uses it.
| Assignee | ||
Comment 5•1 month ago
|
||
No-store prefetches expire immediately and get purged once the memory cache fills; --setpref browser.cache.memory.capacity=256 reproduces it 10/10.
Updated•1 month ago
|
Updated•1 month ago
|
Comment 7•1 month ago
|
||
| bugherder | ||
Description
•