Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COOP] access reporting: Use infinite timeout for receive. #25787

Merged
merged 1 commit into from Sep 28, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 25, 2020

Some browsers do not implement COOP reporting. As a result, no reports
are received after a 2.5s timeout.

Waiting 2.5s many time can reach the global timeout. Sometime, this
flakes in between FAIL and TIMEOUT.

This patch makes the timeout to be infinite by default to get consistent
failure.

Bug: 1090273
Change-Id: I081b9c8e944fc50b391753ce0948392b88d3fd0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2428976
Reviewed-by: Pâris Meuleman <pmeuleman@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810604}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

Some browsers do not implement COOP reporting. As a result, no reports
are received after a 2.5s timeout.

Waiting 2.5s many time can reach the global timeout. Sometime, this
flakes in between FAIL and TIMEOUT.

This patch makes the timeout to be infinite by default to get consistent
failure.

Bug: 1090273
Change-Id: I081b9c8e944fc50b391753ce0948392b88d3fd0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2428976
Reviewed-by: Pâris Meuleman <pmeuleman@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810604}
@KyleJu
Copy link
Contributor

KyleJu commented Sep 28, 2020

The following tests are flaky on Chrome dev:

Test Subtest Results Messages
/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https.html CRASH: 2/10, OK: 8/10
/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https.html Same origin popup redirects to same-origin with same-origin-allow-popups PASS: 8/10, MISSING: 2/10
/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https.html Cross origin popup redirects to same-origin with same-origin-allow-popups PASS: 8/10, MISSING: 2/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https.html CRASH: 1/10, OK: 9/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https.html access-from-coop-page-to-opener, same-origin PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https.html access-from-coop-page-to-opener, same-origin + redirect PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro.https.html CRASH: 1/10, OK: 9/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro.https.html access-from-coop-page-to-other (COOP-RO) PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https.html CRASH: 1/10, OK: 9/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https.html access-to-coop-page-from-openee, same-origin PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https.html access-to-coop-page-from-openee, same-origin + redirect PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https.html CRASH: 1/10, OK: 9/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https.html access-to-coop-page-from-opener, cross-origin PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https.html access-to-coop-page-from-opener, cross-origin + redirect PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html CRASH: 1/10, OK: 9/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html same-site > w => w["iframeName"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html cross-origin > w => w["iframeName"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html same-site > w => w["divID"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html cross-origin > w => w["divID"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html same-site > w => w["existingGlobal"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html cross-origin > w => w["existingGlobal"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html same-site > w => w["missingGlobal"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html cross-origin > w => w["missingGlobal"] PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html CRASH: 1/10, OK: 9/10
/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html Opener COOP PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html Openee COOP PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html Access from same-origin iframe PASS: 9/10, MISSING: 1/10
/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html Access from cross-site iframe FAIL: 9/10, MISSING: 1/10 assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%22c19a1cb9-20c4-4173-99cc-c58e521bf7f5%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=c19a1cb9-20c4-4173-99cc-c58e521bf7f5%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%22c19a1cb9-20c4-4173-99cc-c58e521bf7f5%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=c3dcc64f-5ca0-40f6-b6f5-0ff12f6e96b4\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%22a7cd4eaa-8ee3-4c81-ba1e-39c1dbf8415f%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=a7cd4eaa-8ee3-4c81-ba1e-39c1dbf8415f%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%22a7cd4eaa-8ee3-4c81-ba1e-39c1dbf8415f%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=ddce9311-fd24-4c78-9163-60fededf4faf\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%2232dc8a01-77bc-4961-86b4-27747cd95c67%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=32dc8a01-77bc-4961-86b4-27747cd95c67%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%2232dc8a01-77bc-4961-86b4-27747cd95c67%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=e57067ba-5947-40e8-a965-fbcafa87725a\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%22a9e62f81-a400-4d28-b4ad-b9196fe45b6a%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=a9e62f81-a400-4d28-b4ad-b9196fe45b6a%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%22a9e62f81-a400-4d28-b4ad-b9196fe45b6a%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=d2f65037-715c-4a72-bd8b-250b4a5c5a7d\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%2205a85460-dd87-49dc-8320-9ee32f382697%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=05a85460-dd87-49dc-8320-9ee32f382697%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%2205a85460-dd87-49dc-8320-9ee32f382697%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=02d208fc-cc73-4e42-870c-975d3ebe2a38\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%222d0fa9de-fdc5-4828-997c-165d5a97e48c%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=2d0fa9de-fdc5-4828-997c-165d5a97e48c%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%222d0fa9de-fdc5-4828-997c-165d5a97e48c%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=d1cc7d22-bcf9-48b5-81fb-1d840e999010\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%221827201e-263e-4984-b8c8-effd5e2306ba%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=1827201e-263e-4984-b8c8-effd5e2306ba%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%221827201e-263e-4984-b8c8-effd5e2306ba%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=ffc9d7dd-8e82-492c-ada8-06c39171bbfa\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%22f63fd5ba-0bad-479f-9615-c6b8d3b40d68%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=f63fd5ba-0bad-479f-9615-c6b8d3b40d68%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%22f63fd5ba-0bad-479f-9615-c6b8d3b40d68%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=8eb84750-5017-4a78-beaf-05f8df184d41\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]";assert_equals: Unexpected report received. expected "timeout" but got "[{\"type\":\"coop-access-violation\",\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=|header(report-to,{%22group%22:%22a0081c48-9ce0-42eb-a882-d9f8575b8f13%22\\\\,%22max_age%22:3600\\\\,%22endpoints%22:[{%22url%22:%22/html/cross-origin-opener-policy/reporting/resources/dispatcher.py?uuid=a0081c48-9ce0-42eb-a882-d9f8575b8f13%22}]})|header(Cross-Origin-Opener-Policy-Report-Only,same-origin%3Breport-to=%22a0081c48-9ce0-42eb-a882-d9f8575b8f13%22)|header(Cross-Origin-Embedder-Policy,require-corp)&uuid=37f7ed8b-f458-4bf1-86fa-60006dcc6a66\",\"body\":{\"sourceFile\":\"https://web-platform.test:8443/resources/testharness.js\",\"lineNumber\":142,\"columnNumber\":27,\"property\":\"postMessage\"}}]"
/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html verify remaining reports FAIL: 2/10, PASS: 8/10 promise_test: Unhandled rejection with value: "coop-report-endpoint not empty"

@KyleJu
Copy link
Contributor

KyleJu commented Sep 28, 2020

Due to the changes in this PR, the timeout behaviour seems expected in Firefox nightly (Tests timed out in Firefox). However, many tests become newly flaky in Chrome, with 1/10 run missing/crashing. @Hexcles should I ask the author to take a look?

@stephenmcgruer
Copy link
Contributor

The crash-flake is at least partially known and is the subject of a complex investigation; see crbug.com/1098413

I'm not clear if this change made it worse or if it already affected this many files - @ArthurSonzogni do you know?

The unfortunate thing is that this PR was hoping to fix Firefox instability, but the Firefox stability check was too slow and timed out :(. (Which we don't block on, of course).

@KyleJu
Copy link
Contributor

KyleJu commented Sep 28, 2020

Note: this PR is blocking the Exporter

@Hexcles Hexcles merged commit dbb8a3f into master Sep 28, 2020
@Hexcles Hexcles deleted the chromium-export-cl-2428976 branch September 28, 2020 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants