Closed Bug 1906912 Opened 7 months ago Closed 7 months ago

Perma TEST-UNEXPECTED-TIMEOUT | browser/components/backup/tests/xpcshell/test_BackupService_archive.js | Test timed out when Gecko 130 merges to beta on 2024-08-05

Categories

(Firefox :: Profile Backup, defect, P1)

defect

Tracking

()

VERIFIED FIXED
130 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox128 --- unaffected
firefox129 --- unaffected
firefox130 + verified

People

(Reporter: tszentpeteri, Assigned: sthompson)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Central-as-beta simulation

How to run these simulations

Failure log:

[task 2024-07-09T14:27:03.802Z] 14:27:03     INFO -  TEST-START | browser/components/backup/tests/xpcshell/test_BackupService_archive.js
[task 2024-07-09T14:32:03.818Z] 14:32:03  WARNING -  TEST-UNEXPECTED-TIMEOUT | browser/components/backup/tests/xpcshell/test_BackupService_archive.js | Test timed out
[task 2024-07-09T14:32:03.818Z] 14:32:03     INFO -  TEST-INFO took 300015ms
[task 2024-07-09T14:32:03.818Z] 14:32:03     INFO -  >>>>>>>
[task 2024-07-09T14:32:03.818Z] 14:32:03     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2024-07-09T14:32:03.818Z] 14:32:03     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2024-07-09T14:32:03.819Z] 14:32:03     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2024-07-09T14:32:03.819Z] 14:32:03     INFO -  running event loop
[task 2024-07-09T14:32:03.819Z] 14:32:03     INFO -  browser/components/backup/tests/xpcshell/test_BackupService_archive.js | Starting setup
[task 2024-07-09T14:32:03.819Z] 14:32:03     INFO -  (xpcshell/head.js) | test pending (2)
[task 2024-07-09T14:32:03.820Z] 14:32:03     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2024-07-09T14:32:03.820Z] 14:32:03     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2024-07-09T14:32:03.820Z] 14:32:03     INFO -  (xpcshell/head.js) | test finished (2)
[task 2024-07-09T14:32:03.820Z] 14:32:03     INFO -  browser/components/backup/tests/xpcshell/test_BackupService_archive.js | Starting test_createArchive_unencrypted
[task 2024-07-09T14:32:03.820Z] 14:32:03     INFO -  (xpcshell/head.js) | test test_createArchive_unencrypted pending (2)
[task 2024-07-09T14:32:03.821Z] 14:32:03     INFO -  PID 5775 | console.debug: BackupService: "Instantiated"
[task 2024-07-09T14:32:03.821Z] 14:32:03     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2024-07-09T14:32:03.821Z] 14:32:03     INFO -  PID 5775 | JavaScript error: resource:///modules/backup/BackupService.sys.mjs, line 1845: NS_BINDING_ABORTED: Got JSON block. Aborting further reads.
[task 2024-07-09T14:32:03.821Z] 14:32:03     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "NS_BINDING_ABORTED: Got JSON block. Aborting further reads." {file: "resource:///modules/backup/BackupService.sys.mjs" line: 1845}]
[task 2024-07-09T14:32:03.821Z] 14:32:03     INFO -  onStopRequest@resource:///modules/backup/BackupService.sys.mjs:1845:30
[task 2024-07-09T14:32:03.822Z] 14:32:03     INFO -  _do_main@/opt/worker/tasks/task_172053462316051/build/tests/xpcshell/head.js:245:6
[task 2024-07-09T14:32:03.822Z] 14:32:03     INFO -  _execute_test@/opt/worker/tasks/task_172053462316051/build/tests/xpcshell/head.js:596:5
[task 2024-07-09T14:32:03.822Z] 14:32:03     INFO -  @-e:1:1
[task 2024-07-09T14:32:03.822Z] 14:32:03     INFO -  "
[task 2024-07-09T14:32:03.823Z] 14:32:03     INFO -  PID 5775 | console.debug: BackupService: "Read out archive JSON: " ({version:1, encConfig:null, meta:{date:"2024-06-07T00:00:00+00:00", appName:"firefox", appVersion:"128.0", buildID:"20240604133346", profileName:"profile-default", machineName:"A super cool machine", osName:"Windows_NT", osVersion:"10.0", legacyClientID:"decafbad-0cd1-0cd2-0cd3-decafbad1000", accountID:"", accountEmail:""}})
[task 2024-07-09T14:32:03.823Z] 14:32:03     INFO -  TEST-PASS | browser/components/backup/tests/xpcshell/test_BackupService_archive.js | test_createArchive_unencrypted - [test_createArchive_unencrypted : 103] Should not be considered encrypted. - true == true
Flags: needinfo?(mconley)
See Also: → 1906714

Hi tszentpeteri,

Maybe you can help me - I've been trying to reproduce this with try pushes, and I'm having no luck. Here's my latest try push:

https://treeherder.mozilla.org/jobs?repo=try&revision=328b8d822bbfb8e33018465c736832aa60659faf

There are no local changes, and I followed the instructions at https://wiki.mozilla.org/Sheriffing/How_To/Beta_simulations#TRUNK_AS_EARLY_BETA.

The job that fails in comment 0 appears to be passing now... what did I miss?

Flags: needinfo?(mconley) → needinfo?(tszentpeteri)

The only difference between today's beta sim which is affected and your Try push is this:

diff --git a/try_task_config.json b/try_task_config.json
new file mode 100644
--- /dev/null
+++ b/try_task_config.json
@@ -0,0 +1,8 @@
+{
+    "parameters": {
+        "optimize_target_tasks": true,
+        "release_type": "beta",
+        "target_tasks_method": "release_simulation"
+    },
+    "version": 2
+}

Can you try with such a try_task_config.json? Else RelEng might need to guide.

Flags: needinfo?(tszentpeteri)
Duplicate of this bug: 1907609
Assignee: nobody → mconley
Severity: -- → N/A
Type: task → defect
Priority: -- → P1

I'm making headway here. I think this is a problem in how we're calculating the start byte offset. I have no idea why it's just this one beta configuration that's having us hit this issue...

So the root of the issue is that we're not calculating the startByteOffset in Archive.worker.mjs correctly in certain circumstances. I suspect this has much to do with Unicode characters.

Okay, I'm now fairly certain that this routine in Archive.worker.mjs is broken if the start of the combined buffer contains only part of a Unicode character. Unicode characters can take up to 4 bytes, so we can get into situations where the max buffer size (512 bytes) ends up having only a partial Unicode character at its front, which breaks the substring scanning.

I suspect relying on indexOf to find the starting byte index is just too fragile. We're going to need something more robust.

Attachment #9413329 - Attachment description: WIP: Bug 1906912 - Make parseArchiveHeader resilient to partial Unicode characters in the buffer. r?#backup-reviewers! → Bug 1906912 - Make parseArchiveHeader resilient to partial Unicode characters in the buffer. r?#backup-reviewers!
Assignee: mconley → sthompson
Pushed by sthompson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0360e07fe2ac Make parseArchiveHeader resilient to partial Unicode characters in the buffer. r=mconley,backup-reviewers
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch

Fix verified in today's central as early beta simulation.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: