Closed Bug 1573360 Opened 6 years ago Closed 6 years ago

Intermittent TEST-UNEXPECTED-TIMEOUT | toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Test timed out

Categories

(WebExtensions :: General, defect, P5)

defect

Tracking

(firefox-esr68 fixed, firefox71 wontfix, firefox72 fixed, firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox-esr68 --- fixed
firefox71 --- wontfix
firefox72 --- fixed
firefox73 --- fixed

People

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

References

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

Filed by: malexandru [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=261237406&repo=mozilla-central
Full log: https://queue.taskcluster.net/v1/task/HRkwHjnwRbmyqriF_Xm-gA/runs/0/artifacts/public/logs/live_backing.log


[task 2019-08-13T01:32:48.075Z] 01:32:48 INFO - TEST-START | toolkit/components/downloads/test/unit/test_DownloadCore.js
[task 2019-08-13T01:32:55.824Z] 01:32:55 INFO - TEST-PASS | toolkit/components/downloads/test/unit/test_DownloadCore.js | took 7748ms
[task 2019-08-13T01:32:55.840Z] 01:32:55 INFO - TEST-START | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js
[task 2019-08-13T01:37:55.835Z] 01:37:55 WARNING - TEST-UNEXPECTED-TIMEOUT | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Test timed out
[task 2019-08-13T01:37:55.835Z] 01:37:55 INFO - TEST-INFO took 300000ms
[task 2019-08-13T01:37:55.842Z] 01:37:55 INFO - >>>>>>>
[task 2019-08-13T01:37:55.842Z] 01:37:55 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2019-08-13T01:37:55.842Z] 01:37:55 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2019-08-13T01:37:55.842Z] 01:37:55 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2019-08-13T01:37:55.843Z] 01:37:55 INFO - running event loop
[task 2019-08-13T01:37:55.843Z] 01:37:55 INFO - xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Starting check_remote
[task 2019-08-13T01:37:55.843Z] 01:37:55 INFO - (xpcshell/head.js) | test check_remote pending (2)
[task 2019-08-13T01:37:55.843Z] 01:37:55 INFO - TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | check_remote - [check_remote : 1] useRemoteWebExtensions matches - true == true
[task 2019-08-13T01:37:55.843Z] 01:37:55 INFO - TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | check_remote - [check_remote : 1] testing from extension process - false == false
[task 2019-08-13T01:37:55.844Z] 01:37:55 INFO - (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2019-08-13T01:37:55.844Z] 01:37:55 INFO - (xpcshell/head.js) | test run_next_test 1 pending (2)

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---

:aswan - on searchfox I saw that you've worked on this file back in 2016. Could you please pass on the ni to someone who may know about this test if you're no longer actively involved.

This is a failure that I've observed on the ubuntu1804 test image in a consistent manner. I have some newer logs:

try: https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=cd3d6269f905c3a241006f5ea5b260a4553abc86&searchStr=xpcshell&selectedJob=279392935
log: https://firefoxci.taskcluster-artifacts.net/V-5ru9pAT8WTR5DmoIWVkw/0/public/logs/live_backing.log

[task 2019-12-03T19:04:41.973Z] 19:04:41     INFO -  TEST-START | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js
[task 2019-12-03T19:09:41.976Z] 19:09:41  WARNING -  TEST-UNEXPECTED-TIMEOUT | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Test timed out
[task 2019-12-03T19:09:41.977Z] 19:09:41     INFO -  TEST-INFO took 300003ms
[task 2019-12-03T19:09:41.977Z] 19:09:41     INFO -  >>>>>>>
[task 2019-12-03T19:09:41.978Z] 19:09:41     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2019-12-03T19:09:41.979Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2019-12-03T19:09:41.980Z] 19:09:41     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2019-12-03T19:09:41.980Z] 19:09:41     INFO -  running event loop
[task 2019-12-03T19:09:41.980Z] 19:09:41     INFO -  xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Starting check_remote
[task 2019-12-03T19:09:41.981Z] 19:09:41     INFO -  (xpcshell/head.js) | test check_remote pending (2)
[task 2019-12-03T19:09:41.981Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | check_remote - [check_remote : 1] useRemoteWebExtensions matches - true == true
[task 2019-12-03T19:09:41.982Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | check_remote - [check_remote : 1] testing from extension process - false == false
[task 2019-12-03T19:09:41.982Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2019-12-03T19:09:41.982Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2019-12-03T19:09:41.983Z] 19:09:41     INFO -  (xpcshell/head.js) | test check_remote finished (2)
[task 2019-12-03T19:09:41.984Z] 19:09:41     INFO -  xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Starting setup
[task 2019-12-03T19:09:41.985Z] 19:09:41     INFO -  (xpcshell/head.js) | test setup pending (2)
[task 2019-12-03T19:09:41.986Z] 19:09:41     INFO -  "downloadDir /tmp/xpc-profile-PHcxBi/temp/downloads"
[task 2019-12-03T19:09:41.987Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2019-12-03T19:09:41.988Z] 19:09:41     INFO -  "removed 0 pre-existing downloads from history"
[task 2019-12-03T19:09:41.989Z] 19:09:41     INFO -  "Extension attached"
[task 2019-12-03T19:09:41.990Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 2 pending (2)
[task 2019-12-03T19:09:41.991Z] 19:09:41     INFO -  (xpcshell/head.js) | test setup finished (2)
[task 2019-12-03T19:09:41.992Z] 19:09:41     INFO -  xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Starting test_events
[task 2019-12-03T19:09:41.997Z] 19:09:41     INFO -  (xpcshell/head.js) | test test_events pending (2)
[task 2019-12-03T19:09:41.998Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 2 finished (2)
[task 2019-12-03T19:09:41.999Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_events - [test_events : 296] download() succeeded - "success" == "success"
[task 2019-12-03T19:09:41.999Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_events - [test_events : 312] got onCreated and onChanged events - "success" == "success"
[task 2019-12-03T19:09:42.000Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 3 pending (2)
[task 2019-12-03T19:09:42.001Z] 19:09:41     INFO -  (xpcshell/head.js) | test test_events finished (2)
[task 2019-12-03T19:09:42.002Z] 19:09:41     INFO -  xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Starting test_cancel
[task 2019-12-03T19:09:42.003Z] 19:09:41     INFO -  (xpcshell/head.js) | test test_cancel pending (2)
[task 2019-12-03T19:09:42.006Z] 19:09:41     INFO -  "http://localhost:44235/interruptible.html?count=0"
[task 2019-12-03T19:09:42.007Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 3 finished (2)
[task 2019-12-03T19:09:42.008Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 319] download() succeeded - "success" == "success"
[task 2019-12-03T19:09:42.009Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 327] got created and changed events - "success" == "success"
[task 2019-12-03T19:09:42.010Z] 19:09:41     INFO -  "download reached 15 bytes"
[task 2019-12-03T19:09:42.010Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 333] cancel() succeeded - "success" == "success"
[task 2019-12-03T19:09:42.011Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 371] got onChanged events corresponding to cancel() - "success" == "success"
[task 2019-12-03T19:09:42.012Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 378] search() succeeded - "success" == "success"
[task 2019-12-03T19:09:42.013Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 379] search() found 1 download - 1 == 1
[task 2019-12-03T19:09:42.014Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 380] download.id is correct - 2 == 2
[task 2019-12-03T19:09:42.015Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 381] download.state is correct - "interrupted" == "interrupted"
[task 2019-12-03T19:09:42.016Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 382] download.paused is correct - false == false
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 383] download.estimatedEndTime is correct - "undefined" == null
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 388] download.canResume is correct - false == false
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 389] download.error is correct - "USER_CANCELED" == "USER_CANCELED"
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 390] download.totalBytes is correct - 31 == 31
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 395] download.exists is correct - false == false
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 398] cannot pause a canceled download - "error" == "error"
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_cancel - [test_cancel : 401] cannot resume a canceled download - "error" == "error"
[task 2019-12-03T19:09:42.017Z] 19:09:41     INFO -  (xpcshell/head.js) | test run_next_test 4 pending (2)
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  (xpcshell/head.js) | test test_cancel finished (2)
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Starting test_pauseresume
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  (xpcshell/head.js) | test test_pauseresume pending (2)
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  (xpcshell/head.js) | test run_next_test 4 finished (2)
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 407] download() succeeded - "success" == "success"
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 415] got created and changed events - "success" == "success"
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  "download reached 15 bytes"
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 421] pause() succeeded - "success" == "success"
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 453] got onChanged event corresponding to pause - "success" == "success"
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 456] search() succeeded - "success" == "success"
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 457] search() found 1 download - 1 == 1
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 458] download.id is correct - 3 == 3
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 459] download.state is correct - "interrupted" == "interrupted"
[task 2019-12-03T19:09:42.017Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 460] download.paused is correct - true == true
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 461] download.estimatedEndTime is correct - "undefined" == null
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 466] download.canResume is correct - true == true
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 467] download.error is correct - "USER_CANCELED" == "USER_CANCELED"
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 468] download.bytesReceived is correct - 15 == 15
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 473] download.totalBytes is correct - 31 == 31
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 478] download.exists is correct - false == false
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 481] search() succeeded - "success" == "success"
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 483] search() by error found the paused download - 1 == 1
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | test_pauseresume - [test_pauseresume : 486] cannot pause an already paused download - "error" == "error"
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  <<<<<<<
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  xpcshell return code: None
[task 2019-12-03T19:09:42.018Z] 19:09:42     INFO -  xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | Process still running after test!
Flags: needinfo?(andrew.swan)

I think Luca was looking into a similar issue in another bug.

Flags: needinfo?(andrew.swan) → needinfo?(lgreco)

I'm not sure that this is the same issue triggered by the other download API xpcshell test that is failing on ubuntu 18.04, as I haven't took a look into that one yet, but I looked into this one yesterday and it seems that the test is getting stuck on the test_pauseresume test case because of a race.

The same test doesn't seem to get stuck in debug builds, which is another detail that points into the direction of a "race".

Locally I've been able to trigger this issue consistently enough on a linux64 optimized build using --verify (it was failing while running in chaos mode, and so forcing the chaos mode from the start was also able to trigger it even more often, the following is the command I used locally to investigate the issue: MOZ_LOG="BackgroundFileSaver:5:sync" MOZ_CHAOSMODE=1 mach xpcshell-test toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js --tag remote-webextensions --verify)

The race seems to be happening because that test case is quickly pausing and then resuming an interrupted download and BackgroundFileSaver may have not yet able to write the ".part" file on disk.

When the ".part" file isn't on disk, calling browser.download.resume is getting stuck because the download isn't resumed from the partial data initially downloaded and the mock server used in the test is never going to make the download request to complete (and no error are going to be visible anywhere because a missing ".part" file is a scenario that is expected and handled by DownloadCore.jsm, handled by just re-download the file from the start).

I've prepared a patch that makes the test file to pass consistently --verify, by making sure that the ".part" file has been actually created before pausing a download item, and I'm going to attach it to this issue.

Flags: needinfo?(lgreco)
Assignee: nobody → lgreco
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/0100e29baa4d Prevent test_ext_downloads_misc.js from failing intermittently due to a missing .part file. r=mixedpuppy
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: