Closed Bug 1833735 Opened 1 year ago Closed 4 months ago

Don't timeout background tasks when JS debugger is connected

Categories

(Toolkit :: Background Tasks, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: nalexander, Assigned: erchen)

References

Details

(Whiteboard: [fidedi-ope])

Attachments

(1 file)

Right now, the background tasks will happily timeout when the JS debugger is connected. That's not usually what is desired; usually, one is not debugging timeouts themselves and would prefer to keep the session indefinitely. See Bug 1794051 for a discussion of determining if the JS debugger is connected.

Priority: -- → P3

Hi Nick,
Can you confirm if this is where the background task timeout value is set?
Thanks!

(In reply to Eric Chen from comment #1)

Hi Nick,
Can you confirm if this is where the background task timeout value is set?

No -- that controls how long a backgroundupdate task is allowed to run when scheduled by the Windows Task Scheduler.

We want to avoid timing out in the background update harness itself when the debugger is attached. So, around https://searchfox.org/mozilla-central/rev/729361e481cf63c8d2b5617a6ff589f53e302520/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs#233-258, we want to not have minimum or maximum runtimes (when the debugger is attached). Check for debugger attached just like https://searchfox.org/mozilla-central/rev/729361e481cf63c8d2b5617a6ff589f53e302520/toolkit/mozapps/update/BackgroundTask_backgroundupdate.sys.mjs#241.

You can simply make a Promise that resolves immediately (with Promise.resolve()) for minimum runtime and a Promise that never resolves (with something like new Promise(() => {})) for maximum runtime (rather than actual setTimeout implementations).

Assignee: nobody → erchen
Attachment #9400963 - Attachment description: WIP: Bug 1833735 - Set background task timeout to indefinite when JS debugger is connected r=nalexander → WIP: Bug 1833735 - Set background task timeout to indefinite when JS debugger is connected r=nalexander!
Attachment #9400963 - Attachment description: WIP: Bug 1833735 - Set background task timeout to indefinite when JS debugger is connected r=nalexander! → Bug 1833735 - Set background task timeout to indefinite when JS debugger is connected r=nalexander
Pushed by nshukla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ddf02897ed0 Set background task timeout to indefinite when JS debugger is connected r=nalexander

Backed out for causing mochitest failures on browser_xpcom_graph_wait.js

[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - TEST-PASS | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | 0 == 0 - 
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - backgroundtaskPhases[AfterRunBackgroundTaskNamed][allowlist].services = ["{03d68f92-9513-4e25-9be9-7cb239874172}","{057b04d0-0ccf-11d2-beba-00805f8a66dc}","{0885d4f8-f7b8-4cda-902e-94ba38bc256e}","{08c6cc8b-cfb0-421d-b1f7-683ff2989681}","{0e3afd3d-eb60-4c2b-963b-56d7c439f124}","{16d222a6-1dd2-11b2-b693-f38b02c021b2}","{18c2e238-3a0a-4153-89fc-166b3b1465a1}","{275d800e-3f60-4896-adb7-d7f390ce0e42}","{2d96b3df-c051-11d1-a827-0040959a28c9}","{35c496de-a115-475d-93b5-ffa3f3ae6fe3}","{47049e42-1d87-482a-984d-56ae185e367a}","{49e8d8ef-a713-492a-a3d2-5c9dad4ce2e5}","{4d48c536-e16f-4699-8f9c-add4f28f92f0}","{62b778a6-bce3-456b-8c31-2865fbb68c91}","{75a500a2-0030-40f7-86f8-63f225b940ae}","{78804a84-8173-42b6-bb94-789f0816a810}","{7dd4d320-c84b-4624-8d45-7bb9b2356977}","{91ca2441-050f-4f7c-9df8-75b40ea40156}","{95d89e3e-a169-41a3-8e56-719978e15b12}","{9ac9e770-18bc-11d3-9337-00104ba0fd40}","{a21bfa01-f349-4394-a84c-8de5cf0737d0}","{a7f800e0-4306-11d4-98d0-001083010e9b}","{ad56b25f-e6bb-4db3-9f7b-5b7db33fd2b1}","{aea477f2-b3a2-469c-aa29-0a82d132b829}","{bbbb1d61-438f-4436-92ed-8308e5830fb0}","{bdbe0555-fc3d-4f7b-9205-c309ceb2d641}","{c375fa80-150f-11d6-a618-0010a401eb10}","{c7e410d4-85f2-11d3-9f63-006008a6efe9}","{cb6cdb94-e417-4601-b4a5-f991bf41453d}","{cb9abbae-66b6-4609-8594-5c4ff300888e}","{cdc33a1f-e8ae-4a4f-85d0-6ec633fe872c}","{d07f5195-e3d1-11d2-8acd-00105a1b8860}","{d85a17c1-aa7c-11d2-9b8c-00805f8a16d9}","{e64f152a-9f07-11d3-8cda-0060b0fc14a3}","{f00152d0-b40b-11d3-8c9c-000064657374}","{fb97e4f5-32dd-497a-baa2-7d1e55079910}","{fbc81170-1f69-11d3-9344-00104ba0fd40}","{ff41913b-546a-4bff-9201-dc9b2c032eba}"]
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - backgroundtaskPhases[AfterFindRunBackgroundTask][allowlist].services = ["{96cf7855-dfa9-4c6d-8276-f9705b4890f2}"]
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - backgroundtaskPhases[AfterAwaitRunBackgroundTask][allowlist].services = []
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - Buffered messages finished
[task 2024-05-16T20:26:40.811Z] 20:26:40     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: should have no unexpected modules loaded - ["resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs"] deepEqual [] - {"filename":"chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js","name":"test_xpcom_graph_wait","sourceId":639,"lineNumber":359,"columnNumber":16,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"handleTask","sourceId":570,"lineNumber":1139,"columnNumber":26,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"_runTaskBasedTest","sourceId":570,"lineNumber":1211,"columnNumber":18,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"Tester_execTest","sourceId":570,"lineNumber":1353,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"nextTest/<","sourceId":570,"lineNumber":1128,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js","name":"SimpleTest.waitForFocus/<","sourceId":596,"lineNumber":1058,"columnNumber":13,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":null,"formattedStack":"SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"nextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"Tester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*handleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"test_xpcom_graph_wait@chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:359:16\nasync*handleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}}
[task 2024-05-16T20:26:40.811Z] 20:26:40     INFO - Stack trace:
[task 2024-05-16T20:26:40.811Z] 20:26:40     INFO - chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:test_xpcom_graph_wait:359
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:handleTask:1139
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1211
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1353
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1128
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-05-16T20:26:40.814Z] 20:26:40     INFO - Not taking screenshot here: see the one that was previously logged
[task 2024-05-16T20:26:40.815Z] 20:26:40     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: unexpected modules: resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs - 
[task 2024-05-16T20:26:40.816Z] 20:26:40     INFO - Stack trace:
[task 2024-05-16T20:26:40.816Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:test_ok:1592
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:test_xpcom_graph_wait:370
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:handleTask:1139
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1211
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1353
[task 2024-05-16T20:26:40.818Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1128
[task 2024-05-16T20:26:40.818Z] 20:26:40     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-05-16T20:26:40.818Z] 20:26:40     INFO - TEST-PASS | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: all modules allowlist entries should have been used - 0 deepEqual 0 - 
Flags: needinfo?(erchen)

(In reply to tszentpeteri from comment #5)

Backed out for causing mochitest failures on browser_xpcom_graph_wait.js

[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - TEST-PASS | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | 0 == 0 - 
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - backgroundtaskPhases[AfterRunBackgroundTaskNamed][allowlist].services = ["{03d68f92-9513-4e25-9be9-7cb239874172}","{057b04d0-0ccf-11d2-beba-00805f8a66dc}","{0885d4f8-f7b8-4cda-902e-94ba38bc256e}","{08c6cc8b-cfb0-421d-b1f7-683ff2989681}","{0e3afd3d-eb60-4c2b-963b-56d7c439f124}","{16d222a6-1dd2-11b2-b693-f38b02c021b2}","{18c2e238-3a0a-4153-89fc-166b3b1465a1}","{275d800e-3f60-4896-adb7-d7f390ce0e42}","{2d96b3df-c051-11d1-a827-0040959a28c9}","{35c496de-a115-475d-93b5-ffa3f3ae6fe3}","{47049e42-1d87-482a-984d-56ae185e367a}","{49e8d8ef-a713-492a-a3d2-5c9dad4ce2e5}","{4d48c536-e16f-4699-8f9c-add4f28f92f0}","{62b778a6-bce3-456b-8c31-2865fbb68c91}","{75a500a2-0030-40f7-86f8-63f225b940ae}","{78804a84-8173-42b6-bb94-789f0816a810}","{7dd4d320-c84b-4624-8d45-7bb9b2356977}","{91ca2441-050f-4f7c-9df8-75b40ea40156}","{95d89e3e-a169-41a3-8e56-719978e15b12}","{9ac9e770-18bc-11d3-9337-00104ba0fd40}","{a21bfa01-f349-4394-a84c-8de5cf0737d0}","{a7f800e0-4306-11d4-98d0-001083010e9b}","{ad56b25f-e6bb-4db3-9f7b-5b7db33fd2b1}","{aea477f2-b3a2-469c-aa29-0a82d132b829}","{bbbb1d61-438f-4436-92ed-8308e5830fb0}","{bdbe0555-fc3d-4f7b-9205-c309ceb2d641}","{c375fa80-150f-11d6-a618-0010a401eb10}","{c7e410d4-85f2-11d3-9f63-006008a6efe9}","{cb6cdb94-e417-4601-b4a5-f991bf41453d}","{cb9abbae-66b6-4609-8594-5c4ff300888e}","{cdc33a1f-e8ae-4a4f-85d0-6ec633fe872c}","{d07f5195-e3d1-11d2-8acd-00105a1b8860}","{d85a17c1-aa7c-11d2-9b8c-00805f8a16d9}","{e64f152a-9f07-11d3-8cda-0060b0fc14a3}","{f00152d0-b40b-11d3-8c9c-000064657374}","{fb97e4f5-32dd-497a-baa2-7d1e55079910}","{fbc81170-1f69-11d3-9344-00104ba0fd40}","{ff41913b-546a-4bff-9201-dc9b2c032eba}"]
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - backgroundtaskPhases[AfterFindRunBackgroundTask][allowlist].services = ["{96cf7855-dfa9-4c6d-8276-f9705b4890f2}"]
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - backgroundtaskPhases[AfterAwaitRunBackgroundTask][allowlist].services = []
[task 2024-05-16T20:26:40.804Z] 20:26:40     INFO - Buffered messages finished
[task 2024-05-16T20:26:40.811Z] 20:26:40     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: should have no unexpected modules loaded - ["resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs"] deepEqual [] - {"filename":"chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js","name":"test_xpcom_graph_wait","sourceId":639,"lineNumber":359,"columnNumber":16,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"handleTask","sourceId":570,"lineNumber":1139,"columnNumber":26,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"_runTaskBasedTest","sourceId":570,"lineNumber":1211,"columnNumber":18,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"Tester_execTest","sourceId":570,"lineNumber":1353,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"nextTest/<","sourceId":570,"lineNumber":1128,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js","name":"SimpleTest.waitForFocus/<","sourceId":596,"lineNumber":1058,"columnNumber":13,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":null,"formattedStack":"SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"nextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"Tester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*handleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"test_xpcom_graph_wait@chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:359:16\nasync*handleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}}
[task 2024-05-16T20:26:40.811Z] 20:26:40     INFO - Stack trace:
[task 2024-05-16T20:26:40.811Z] 20:26:40     INFO - chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:test_xpcom_graph_wait:359
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:handleTask:1139
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1211
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1353
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1128
[task 2024-05-16T20:26:40.812Z] 20:26:40     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-05-16T20:26:40.814Z] 20:26:40     INFO - Not taking screenshot here: see the one that was previously logged
[task 2024-05-16T20:26:40.815Z] 20:26:40     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: unexpected modules: resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs - 
[task 2024-05-16T20:26:40.816Z] 20:26:40     INFO - Stack trace:
[task 2024-05-16T20:26:40.816Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:test_ok:1592
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:test_xpcom_graph_wait:370
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:handleTask:1139
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1211
[task 2024-05-16T20:26:40.817Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1353
[task 2024-05-16T20:26:40.818Z] 20:26:40     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1128
[task 2024-05-16T20:26:40.818Z] 20:26:40     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-05-16T20:26:40.818Z] 20:26:40     INFO - TEST-PASS | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: all modules allowlist entries should have been used - 0 deepEqual 0 - 

Oh, rats -- Eric, this will just need updating in https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js, 'cuz this is expected -- we're loading a new module, after all.

Pushed by nshukla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1db41dc8d778 Set background task timeout to indefinite when JS debugger is connected r=nalexander

Backed out for causing xpchsell failures on ensureExperimentToRolloutTransitionPerformed.js.

[task 2024-05-17T22:24:13.965Z] 22:24:13     INFO -  TEST-START | toolkit/mozapps/update/tests/unit_aus_update/ensureExperimentToRolloutTransitionPerformed.js
[task 2024-05-17T22:29:13.977Z] 22:29:13  WARNING -  TEST-UNEXPECTED-TIMEOUT | toolkit/mozapps/update/tests/unit_aus_update/ensureExperimentToRolloutTransitionPerformed.js | Test timed out
[task 2024-05-17T22:29:13.977Z] 22:29:13     INFO -  TEST-INFO took 300012ms
[task 2024-05-17T22:29:13.977Z] 22:29:13     INFO -  >>>>>>>
[task 2024-05-17T22:29:13.978Z] 22:29:13     INFO -  PID 2060 | DLL blocklist was unable to intercept AppInit DLLs.
[task 2024-05-17T22:29:13.978Z] 22:29:13     INFO -  PID 2060 | Couldn't convert chrome URL: chrome://branding/locale/brand.properties
[task 2024-05-17T22:29:13.979Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp:148
[task 2024-05-17T22:29:13.979Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp:148
[task 2024-05-17T22:29:13.979Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2892
[task 2024-05-17T22:29:13.980Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: Couldn't get the user appdata directory, crash dumps will go in an unusual location: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2951
[task 2024-05-17T22:29:13.980Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2892
[task 2024-05-17T22:29:13.980Z] 22:29:13     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2024-05-17T22:29:13.981Z] 22:29:13     INFO -  "22:24:14:231 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 883] start - general test setup"
[task 2024-05-17T22:29:13.982Z] 22:29:13     INFO -  TEST-PASS | toolkit/mozapps/update/tests/unit_aus_update/ensureExperimentToRolloutTransitionPerformed.js | setupTestCommon - [setupTestCommon : 885] gTestID should be 'undefined' (setupTestCommon should only be called once) - "undefined" === "undefined"
[task 2024-05-17T22:29:13.982Z] 22:29:13     INFO -  (xpcshell/head.js) | test pending (2)
[task 2024-05-17T22:29:13.982Z] 22:29:13     INFO -  "22:24:14:237 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 930] attempting to remove directory. Path: D:\\task_171598127193048\\build\\tests\\xpcshell\\tests\\toolkit\\mozapps\\update\\tests\\unit_aus_update\\ensureExperimentToRolloutTransitionPerformed"
[task 2024-05-17T22:29:13.983Z] 22:29:13     INFO -  PID 2060 | DLL blocklist was unable to intercept AppInit DLLs.
[task 2024-05-17T22:29:13.983Z] 22:29:13     INFO -  "22:24:14:238 | TEST-INFO | shared.js | [removeDirRecursive : 603] attempting to remove directory. Path: D:\\task_171598127193048\\build\\tests\\xpcshell\\tests\\toolkit\\mozapps\\update\\tests\\unit_aus_update\\ensureExperimentToRolloutTransitionPerformed"
[task 2024-05-17T22:29:13.984Z] 22:29:13     INFO -  "22:24:14:241 | TEST-INFO | xpcshellUtilsAUS.js | [runTestHelperSync : 2216] Running D:\\task_171598127193048\\build\\tests\\xpcshell\\tests\\toolkit\\mozapps\\update\\tests\\data\\TestAUSHelper.exe create-update-dir D:\\task_171598127193048\\build\\tests\\xpcshell\\tests\\toolkit\\mozapps\\update\\tests\\unit_aus_update\\ensureExperimentToRolloutTransitionPerformed\\dir.app"
[task 2024-05-17T22:29:13.984Z] 22:29:13     INFO -  TEST-PASS | toolkit/mozapps/update/tests/unit_aus_update/ensureExperimentToRolloutTransitionPerformed.js | createWorldWritableAppUpdateDir - [createWorldWritableAppUpdateDir : 1827] The helper process exit value should be 0 - 0 == 0
[task 2024-05-17T22:29:13.984Z] 22:29:13     INFO -  "22:24:14:322 | TEST-INFO | xpcshellUtilsAUS.js | [getSpecialFolderDir : 1679] SHGetSpecialFolderPath returned path: C:\\ProgramData"
[task 2024-05-17T22:29:13.985Z] 22:29:13     INFO -  "22:24:14:323 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 979] Updates Directory (UpdRootD) Path: C:\\ProgramData\\Mozilla-1de4eec8-1241-4177-a864-e594e8d1fb38\\updates\\ensureExperimentToRolloutTransitionPerformed"
[task 2024-05-17T22:29:13.985Z] 22:29:13     INFO -  "22:24:14:325 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 996] resetting update lock"
[task 2024-05-17T22:29:13.986Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: Failed to resolve install directory.: file /builds/worker/checkouts/gecko/toolkit/xre/MultiInstanceLock.cpp:279
[task 2024-05-17T22:29:13.986Z] 22:29:13     INFO -  "22:24:14:325 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 1009] attempting to remove directory. Path: C:\\ProgramData\\Mozilla-1de4eec8-1241-4177-a864-e594e8d1fb38\\updates\\ensureExperimentToRolloutTransitionPerformed"
[task 2024-05-17T22:29:13.987Z] 22:29:13     INFO -  "22:24:14:326 | TEST-INFO | shared.js | [removeDirRecursive : 603] attempting to remove directory. Path: C:\\ProgramData\\Mozilla-1de4eec8-1241-4177-a864-e594e8d1fb38\\updates\\ensureExperimentToRolloutTransitionPerformed"
[task 2024-05-17T22:29:13.987Z] 22:29:13     INFO -  "22:24:14:328 | TEST-INFO | xpcshellUtilsAUS.js | [setupTestCommon : 1026] finish - general test setup"
[task 2024-05-17T22:29:13.987Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: '!mColorFilterWatcher', file /builds/worker/checkouts/gecko/widget/windows/nsLookAndFeel.cpp:69
[task 2024-05-17T22:29:13.988Z] 22:29:13     INFO -  PID 2060 | *** AUS:STB UpdateServiceStub - Begin (force_update_init=false)
[task 2024-05-17T22:29:13.988Z] 22:29:13     INFO -  PID 2060 | *** AUS:STB UpdateServiceStub:migrateUpdateDirectory Performing migration
[task 2024-05-17T22:29:13.988Z] 22:29:13     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2024-05-17T22:29:13.988Z] 22:29:13     INFO -  running event loop
[task 2024-05-17T22:29:13.989Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: Could not get the program name for a cubeb stream.: 'NS_SUCCEEDED(rv)', file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:467
[task 2024-05-17T22:29:13.989Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111 (NS_ERROR_NOT_AVAILABLE): file /builds/worker/checkouts/gecko/startupcache/StartupCacheUtils.cpp:154
[task 2024-05-17T22:29:13.989Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111 (NS_ERROR_NOT_AVAILABLE): file /builds/worker/checkouts/gecko/js/xpconnect/loader/mozJSModuleLoader.cpp:909
[task 2024-05-17T22:29:13.990Z] 22:29:13     INFO -  PID 2060 | [Parent 2060, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111 (NS_ERROR_NOT_AVAILABLE): file /builds/worker/checkouts/gecko/js/loader/ModuleLoaderBase.cpp:475
[task 2024-05-17T22:29:13.991Z] 22:29:13     INFO -  PID 2060 | JavaScript error: D:/task_171598127193048/build/tests/xpcshell/tests/toolkit/mozapps/update/tests/unit_aus_update/ensureExperimentToRolloutTransitionPerformed.js, line 26: Error: Failed to load resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs
[task 2024-05-17T22:29:13.991Z] 22:29:13     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "Error: Failed to load resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs" {file: "D:/task_171598127193048/build/tests/xpcshell/tests/toolkit/mozapps/update/tests/unit_aus_update/ensureExperimentToRolloutTransitionPerformed.js" line: 26}]"
[task 2024-05-17T22:29:13.991Z] 22:29:13     INFO -  <<<<<<<
[task 2024-05-17T22:29:14.071Z] 22:29:14     INFO -  xpcshell return code: 1
[task 2024-05-17T22:29:14.085Z] 22:29:14     INFO -  TEST-START | devtools/client/shared/remote-debugging/adb/xpcshell/test_adb.js
Flags: needinfo?(erchen)
Flags: needinfo?(erchen)
Flags: needinfo?(erchen) → needinfo?(nalexander)

Nipun helped me to debug this error, turns out I should be importing "resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs" from ChromeUtils.defineESModuleGetters instead of directly calling import :)

Flags: needinfo?(nalexander)
Pushed by nshukla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/abe393975adb Set background task timeout to indefinite when JS debugger is connected r=nalexander

(In reply to Eric Chen from comment #9)

Nipun helped me to debug this error, turns out I should be importing "resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs" from ChromeUtils.defineESModuleGetters instead of directly calling import :)

Amazing, since I definitely didn't know what was going on here!

Backout by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/112c7d69a916 Backed out changeset abe393975adb for causing bc failures on browser_xpcom_graph_wait.

investigating, I thought this issue should've been fixed already

(In reply to Eric Chen from comment #14)

investigating, I thought this issue should've been fixed already

I think you put the module in the wrong stage of checking. You had it checking at the marker backgroundtaskPhases.AfterRunBackgroundTaskNamed, but that is before your changes are executed. I think you want the checking at the marker AfterAwaitRunBackgroundTask. And the test failure error messages say as much.

This appears to have shown up with all of the TV (test-verify) jobs, and I think it would have reproduced locally (with some effort, since this needs a packaged build) and on try.

(In reply to Nick Alexander :nalexander [he/him] from comment #15)

(In reply to Eric Chen from comment #14)

investigating, I thought this issue should've been fixed already

I think you put the module in the wrong stage of checking. You had it checking at the marker backgroundtaskPhases.AfterRunBackgroundTaskNamed, but that is before your changes are executed. I think you want the checking at the marker AfterAwaitRunBackgroundTask. And the test failure error messages say as much.

This appears to have shown up with all of the TV (test-verify) jobs, and I think it would have reproduced locally (with some effort, since this needs a packaged build) and on try.

Thanks for the info, I'm running on try to make sure the issue is completely solved, just waiting for the results

Looks okay now, going to land it again later today.

Just going to note this, the first time the autoland failed (comment 5), the error was:
AfterRunBackgroundTaskNamed: should have no unexpected modules loaded
AfterRunBackgroundTaskNamed: unexpected modules: resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs

So that's why I put the module into the AfterRunBackgroundTaskNamed marker. I suspect the import process is different now because I use ChromeUtils.defineESModuleGetters instead of directly importing after comment 8's error. Maybe that changed which marker the module should be in. Either way I really hope it will work now.

Flags: needinfo?(erchen)
Pushed by nrishel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7745e643a40b Set background task timeout to indefinite when JS debugger is connected r=nalexander
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Component: Application Update → Background Tasks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: