Closed Bug 1686894 Opened 4 years ago Closed 4 years ago

Intermittent toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Uncaught exception - undefined - timed out after 50 tries.

Categories

(Core :: Privacy: Anti-Tracking, defect, P5)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox84 --- unaffected
firefox85 --- unaffected
firefox86 --- fixed
firefox87 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: emz)

References

(Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [retriggered][stockwell needswork:owner])

Attachments

(1 file)

Filed by: apavel [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=326779017&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/B9jgxTuARSOeylW7H9Qd2A/runs/0/artifacts/public/logs/live_backing.log


[task 2021-01-15T06:02:04.714Z] 06:02:04     INFO - TEST-START | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js
[task 2021-01-15T06:02:13.462Z] 06:02:13     INFO - TEST-INFO | started process screencapture
[task 2021-01-15T06:02:13.554Z] 06:02:13     INFO - TEST-INFO | screencapture: exit 0
[task 2021-01-15T06:02:13.555Z] 06:02:13     INFO - Buffered messages logged at 06:02:04
[task 2021-01-15T06:02:13.555Z] 06:02:13     INFO - Entering test bound setup
[task 2021-01-15T06:02:13.555Z] 06:02:13     INFO - Leaving test bound setup
[task 2021-01-15T06:02:13.556Z] 06:02:13     INFO - Entering test bound testTelemetryForStorageAccessAPI
[task 2021-01-15T06:02:13.556Z] 06:02:13     INFO - Starting testing if storage access API send telemetry probe ...
[task 2021-01-15T06:02:13.556Z] 06:02:13     INFO - Creating a new tab
[task 2021-01-15T06:02:13.556Z] 06:02:13     INFO - Loading the tracking iframe and call the RequestStorageAccess.
[task 2021-01-15T06:02:13.556Z] 06:02:13     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://example.net/browser/toolkit/components/antitracking/test/browser/page.html" line: 0}]
[task 2021-01-15T06:02:13.556Z] 06:02:13     INFO - Sending code to the 3rd party content
[task 2021-01-15T06:02:13.565Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyUI.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.565Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyUI.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.565Z] 06:02:13     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | requestStorageAccess should not throw - true == true - 
[task 2021-01-15T06:02:13.565Z] 06:02:13     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Should not have worked without user interaction - true == true - 
[task 2021-01-15T06:02:13.566Z] 06:02:13     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Doesn't yet have storage access - true == true - 
[task 2021-01-15T06:02:13.566Z] 06:02:13     INFO - Let's interact with the tracker
[task 2021-01-15T06:02:13.566Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyUI.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.566Z] 06:02:13     INFO - Buffered messages logged at 06:02:05
[task 2021-01-15T06:02:13.566Z] 06:02:13     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyOpenUI.html?messageme" line: 0}]
[task 2021-01-15T06:02:13.567Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyUI.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.567Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyUI.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.567Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Storage access granted for origin “https://tracking.example.org” on “http://example.net”."]
[task 2021-01-15T06:02:13.567Z] 06:02:13     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Should have storage access now - true == true - 
[task 2021-01-15T06:02:13.567Z] 06:02:13     INFO - Removing the tab
[task 2021-01-15T06:02:13.567Z] 06:02:13     INFO - Trigger the 'idle-daily' to trigger the telemetry probe.
[task 2021-01-15T06:02:13.567Z] 06:02:13     INFO - Buffered messages finished
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Uncaught exception - undefined - timed out after 50 tries.
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - Leaving test bound testTelemetryForStorageAccessAPI
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - Entering test bound testTelemetryForWindowOpenHeuristic
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - Starting testing if window open heuristic send telemetry probe ...
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - Creating a new tab
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - Loading the tracking iframe and trigger the heuristic
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://example.net/browser/toolkit/components/antitracking/test/browser/page.html" line: 0}]
[task 2021-01-15T06:02:13.568Z] 06:02:13     INFO - Checking if storage access is denied
[task 2021-01-15T06:02:13.639Z] 06:02:13     INFO - Sending code to the 3rd party content
[task 2021-01-15T06:02:13.639Z] 06:02:13     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Doesn't yet have storage access - true == true - 
[task 2021-01-15T06:02:13.639Z] 06:02:13     INFO - Let's do a window.open()
[task 2021-01-15T06:02:13.640Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyWO.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.681Z] 06:02:13     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyOpen.html" line: 0}]
[task 2021-01-15T06:02:13.681Z] 06:02:13     INFO - The popup has been dismissed!
[task 2021-01-15T06:02:13.681Z] 06:02:13     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Doesn't yet have storage access - true == true - 
[task 2021-01-15T06:02:13.681Z] 06:02:13     INFO - Let's interact with the tracker
[task 2021-01-15T06:02:13.682Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyWO.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.756Z] 06:02:13     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyOpenUI.html?messageme" line: 0}]
[task 2021-01-15T06:02:13.756Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Request to access cookie or storage on “https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyWO.html” was blocked because it came from a tracker and content blocking is enabled."]
[task 2021-01-15T06:02:13.762Z] 06:02:13     INFO - Let's do another window.open()
[task 2021-01-15T06:02:13.762Z] 06:02:13     INFO - Console message: [JavaScript Warning: "Storage access automatically granted for origin “https://tracking.example.org” on “http://example.net”."]
[task 2021-01-15T06:02:13.787Z] 06:02:13     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/3rdPartyOpen.html" line: 0}]
[task 2021-01-15T06:02:13.787Z] 06:02:13     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Has storage access - true == true - 
[task 2021-01-15T06:02:13.787Z] 06:02:13     INFO - Removing the tab
[task 2021-01-15T06:02:13.788Z] 06:02:13     INFO - Trigger the 'idle-daily' to trigger the telemetry probe.
[task 2021-01-15T06:02:20.890Z] 06:02:20     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-01-15T06:02:20.890Z] 06:02:20     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js | Uncaught exception - undefined - timed out after 50 tries.```
Flags: needinfo?(pbz)
Keywords: regression
Regressed by: 1679512
See Also: → 1686836
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1679512

I don't see how this is directly related to Bug 1679512. Perhaps the timing changed a bit?

Tim, since you implemented the test, do you have an idea what could make it intermittent? The failure rate seems relatively low, so I'm not sure if this is worth prioritizing.

Flags: needinfo?(pbz) → needinfo?(tihuang)
Whiteboard: [retriggered][stockwell needswork:owner]

From the test code, it doesn't look to me that this is caused by Bug1679512. However, the test browser_contentBlockingTelemetry.js runs after the test browser_contentBlockingAllowListPrincipal.js. So, it could be the case that there are some uncleared states of test 'browser_contentBlockingAllowListPrincipal.js' that cause this intermittent.

Flags: needinfo?(tihuang)

(In reply to Tim Huang[:timhuang] from comment #4)

From the test code, it doesn't look to me that this is caused by Bug1679512. However, the test browser_contentBlockingTelemetry.js runs after the test browser_contentBlockingAllowListPrincipal.js. So, it could be the case that there are some uncleared states of test 'browser_contentBlockingAllowListPrincipal.js' that cause this intermittent.

Good observation! I can reproduce the failure if I run the two tests in that order.
It seems like we get a higher telemetry value than expected for the storageAccessAPI probe. Which is weird because the test clears telemetry as part of the setup.
browser_contentBlockingAllowListPrincipal.js doesn't interact with that API. However, if I skip test_windowOpen the telemetry test passes.
This seems to be timing related, I can only reproduce it if my CPU isn't busy and I'm running an opt build.

Assignee: nobody → pbz
Status: NEW → ASSIGNED
Attachment #9199255 - Attachment description: Bug 1686894 - Wait before contentBlockingTelemetry test to fix telemetry race condition. r=timhuang! → Bug 1686894 - Disable storage access heuristics to prevent telemetry race condition with the next test. r=timhuang!
Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93ee8d68aea4 Disable storage access heuristics to prevent telemetry race condition with the next test. r=timhuang
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Whiteboard: [retriggered][stockwell needswork:owner] → [retriggered][stockwell needswork:owner][checkin-needed-beta]
Whiteboard: [retriggered][stockwell needswork:owner][checkin-needed-beta] → [retriggered][stockwell needswork:owner]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: