Closed Bug 1760112 Opened 3 years ago Closed 2 years ago

Intermittent toolkit/components/downloads/test/unit/test_DownloadLegacy.js | single tracking bug

Categories

(Toolkit :: Downloads API, defect, P3)

defect

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: jmaher, Assigned: mak)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [stockwell unknown])

Attachments

(2 files)

No description provided.
Severity: -- → S3

Update:

There have been 34 failures within the last 7 days:

  • 4 failures on Linux 18.04 x64 WebRender asan opt
  • 8 failures on Linux 18.04 x64 WebRender opt
  • 15 failures on Linux 18.04 x64 WebRender Shippable opt
  • 1 failure on Windows 10 x86 2004 WebRender debug
  • 5 failures on Windows 10 x64 2004 WebRender debug/opt
  • 1 failure on Windows 10 x64 2004 WebRender Shippable opt

Recent failure log: https://treeherder.mozilla.org/logviewer?job_id=402331532&repo=autoland&lineNumber=7276

[task 2023-01-13T15:14:38.552Z] 15:14:38     INFO -  TEST-START | toolkit/components/downloads/test/unit/test_DownloadLegacy.js
[task 2023-01-13T15:14:39.001Z] 15:14:39  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/components/downloads/test/unit/test_DownloadLegacy.js | xpcshell return code: 0
[task 2023-01-13T15:14:39.003Z] 15:14:39     INFO -  TEST-INFO took 448ms
[task 2023-01-13T15:14:39.004Z] 15:14:39     INFO -  >>>>>>>
[task 2023-01-13T15:14:39.005Z] 15:14:39     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2023-01-13T15:14:39.005Z] 15:14:39     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2023-01-13T15:14:39.005Z] 15:14:39     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2023-01-13T15:14:39.006Z] 15:14:39     INFO -  running event loop
[task 2023-01-13T15:14:39.006Z] 15:14:39     INFO -  toolkit/components/downloads/test/unit/test_DownloadLegacy.js | Starting setup test_common_initialize
[task 2023-01-13T15:14:39.008Z] 15:14:39     INFO -  (xpcshell/head.js) | test test_common_initialize pending (2)
[task 2023-01-13T15:14:39.009Z] 15:14:39     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2023-01-13T15:14:39.009Z] 15:14:39     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2023-01-13T15:14:39.009Z] 15:14:39     INFO -  (xpcshell/head.js) | test test_common_initialize finished (2)
[task 2023-01-13T15:14:39.009Z] 15:14:39     INFO -  "CONSOLE_MESSAGE: (info) No chrome package registered for chrome://branding/locale/brand.properties"
[task 2023-01-13T15:14:39.010Z] 15:14:39     INFO -  toolkit/components/downloads/test/unit/test_DownloadLegacy.js | Starting test_basic
[task 2023-01-13T15:14:39.010Z] 15:14:39     INFO -  (xpcshell/head.js) | test test_basic pending (2)
[task 2023-01-13T15:14:39.011Z] 15:14:39     INFO -  TEST-PASS | toolkit/components/downloads/test/unit/test_DownloadLegacy.js | test_basic - [test_basic : 45] Sanity check the temporary file doesn't exist. - true == true

Marco, any chance you could help assign this to someone?

Flags: needinfo?(mak)
Whiteboard: [stockwell needswork:owner]

the DownloadTarget .size property is zero, that means either it was not updated yet (though the code seems to properly await for refresh()) or something removed the file. I cannot reproduce locally, I'll push a test on Try checking the file with IOUtils and hopefully that may tell us something, otherwise I'll have to add a bunch of logging to check the calls to refresh.

There have been 35 total failures in the last 7 days, recent failure log.
Affected platforms are:

  • linux1804-64-asan-qr
  • linux1804-64-qr
  • linux1804-64-shippable-qr
  • windows10-32-2004-qr
  • windows10-64-2004-qr

Marco, any updates on this? It's on the disable recommended list with 149 total failures in last 30 days.

Flags: needinfo?(mak)
Flags: needinfo?(mak)

Unfortunately I don't have news yet.
I may try to workaround the problem until we have a better understanding of the issue. It would be a pity to disable this test that is covering most of the user download path. Let me try and see if it helps at all.

Blocks: 1814364

The test is often seeing downloadTaget.size = 0, that means refresh() was either
not invoked or not properly awaited for. For now just add an artificial refresh
to avoid disabling the test.
A proper fix should be investigated in Bug 1814364

Assignee: nobody → mak
Status: NEW → ASSIGNED

I'm setting leave-open because I noticed a much less frequent failure related to Places annotations in the logs, that's something to investigate yet, though it's not that common as the size one afaict.

Flags: needinfo?(mak)
Keywords: leave-open
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/bbba80c6a3ee Workaround frequent failure in test_DownloadLegacy.js. r=Gijs
Whiteboard: [stockwell disable-recommended] → [stockwell needswork:owner]

The downloads code is not awaiting for history storing data, thus a previous
sub-test may still be in the process of storing its annotations.

I attached a second patch to cover the history annotations failure too, so we can ideally close this once it lands, since the .size problem will be covered by Bug 1814364.

Keywords: leave-open
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/263398ef9a91 Wait for the expected annotation value in test_DownloadLegacy.js. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
See Also: → 1817566
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: