Closed Bug 1510262 Opened 6 years ago Closed 4 months ago

nsIncrementalDownload causes a lot of jank with main thread I/O while downloading updates in the background

Categories

(Core :: Networking: HTTP, defect, P2)

defect

Tracking

()

RESOLVED FIXED
128 Branch
Performance Impact medium
Tracking Status
firefox128 --- fixed

People

(Reporter: florian, Assigned: acreskey, NeedInfo)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: perf, perf:responsiveness, Whiteboard: [necko-triaged][bhr:nsIncrementalDownload][necko-priority-queue])

Attachments

(1 file)

See this profile captured on the 2018 reference hardware: https://perfht.ml/2RiiwTM This is happening when downloading an update in the background, which can happen while the user is attempting to load pages. Especially as this background update download tends to happen soon after startup.
Whiteboard: [qf] → [qf:p2:responsiveness]
The jank occurs on closing the fd, and we did the fd open and close every ODA. We might only close the fd on OnStopRequest, but it's risky to modify super old code [1] [1] https://searchfox.org/mozilla-central/rev/0859e6b10fb901875c80de8f8fc33cbb77b2505e/netwerk/base/nsIncrementalDownload.cpp#60
Component: Networking → Networking: HTTP
Priority: -- → P2
Whiteboard: [qf:p2:responsiveness] → [qf:p2:responsiveness][necko-triaged]
(In reply to Junior Hsu from comment #1) > We might only close the fd on OnStopRequest Ideally the whole thing should move off main thread. We only need to send something back to the main thread if we have JavaScript code on the receiving end. http://queze.net/bhr/#filter=nsIncrementalDownload%3A%3AFlush shows we have hangs for the PR_Close that you pointed, but we also have some for PR_Write and for OpenNSPRFileDesc.
Agree, this has to move to a different thread. Is this is a recent regression?
(In reply to Honza Bambas (:mayhemer) from comment #3) > Is this is a recent regression? I don't think so, I already noticed this behavior when profiling for Quantum Flow / Firefox 57. It's more likely to be the last occurence that remains of something that was kinda OK a decade ago.
Honza is this something you can tackle?
Assignee: nobody → honzab.moz
Flags: needinfo?(honzab.moz)
Following calls hit PR_Close(): OnStartRequest: https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/netwerk/base/nsIncrementalDownload.cpp#616 OnDataAvailable: https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/netwerk/base/nsIncrementalDownload.cpp#690 OnStopRequest: https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/netwerk/base/nsIncrementalDownload.cpp#653 Solution: - retarget the channel to stream transport service - have a task queue, as at [1] - all writes to the file will happen there - all notifications (start/progress) must go the main thread and after file operations (truncate in onstart, final write on onstop) are done; this is a precaution, not something I checked on we really must do [1] https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/netwerk/base/nsNetUtil.cpp#1433-1447
Status: NEW → ASSIGNED
Flags: needinfo?(honzab.moz)
https://perfht.ml/2GFHcEG has us janking for a combined total of about 15 seconds (7k samples on Windows for nsIncrementalDownload::FlushChunk, plus some more elsewhere) because it's downloading a complete mar file, on the reference hardware with its disk + cpu contention... fixing this bug would really help quite a lot for those cases.

I find the jank in this startup profile even more impressive: https://perfht.ml/2Ezid1L Probably because I was using the fast internet connexion on a machine with slow I/O, so the main thread I/O blocked the whole time.

This could be nicely fixed with bug 1528285. Looking more into the code, observer is only an nsIRequestObserver which we can easily dispatch to the main thread. Then there is mProgressSink, for which we can do the same.

Adding dep, should it significantly delay, I can move only the writes/flushes to a bck thread.

Depends on: omt-networking
Assignee: honzab.moz → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(gijskruitbosch+bugs)
Whiteboard: [qf:p2:responsiveness][necko-triaged] → [qf:p2:responsiveness][necko-triaged][bhr:nsIncrementalDownload]
Priority: P2 → P3
Performance Impact: --- → P2
Whiteboard: [qf:p2:responsiveness][necko-triaged][bhr:nsIncrementalDownload] → [necko-triaged][bhr:nsIncrementalDownload]
Severity: normal → S3

Can this still be reproduced?

We have omt-networking in the content-process scheduled for H1, 2023, fwiw.

(In reply to Andrew Creskey [:acreskey] from comment #11)

Can this still be reproduced?

I'm not sure. Florian, do you have cycles + a machine to check this on? It may be worth trying release vs. nightly here given the work on socket process etc.

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(florian)

(In reply to Andrew Creskey [:acreskey] from comment #11)

Can this still be reproduced?

I haven't tried recently, but it's still visible on BHR: https://fqueze.github.io/hang-stats/#date=20230222&row=0&filter=nsIncrementalDownload

It's possible we no longer see it on Windows if updates are downloaded by a background service there.

I think comment 6 still holds.
I think we can improve things at least a little by retargetting onDataAvailable to a background thread. We'd still have MT IO with onStart/onStop, but that's just 2 calls out of many.
Implementing nsIThreadRetargetableRequest, handling onData off-main-thread and dispatching progress notifications back to the main thread should be fairly straightforward.

Priority: P3 → P2
Whiteboard: [necko-triaged][bhr:nsIncrementalDownload] → [necko-triaged][bhr:nsIncrementalDownload][necko-priority-next]
See Also: → 1348087

It does sound plausible that this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1878502 is caused by Bug 1510262. In case that helps prioritize fixing it faster.

Whiteboard: [necko-triaged][bhr:nsIncrementalDownload][necko-priority-next] → [necko-triaged][bhr:nsIncrementalDownload][necko-priority-queue]
Assignee: nobody → acreskey
See Also: → 1878502

If anyone knows of a way to trigger an update download, please let me know. Would be helpful in testing.

https://searchfox.org/mozilla-central/rev/e65d93ace2a618b58bf1497c5be8918404f6dbbe/toolkit/mozapps/update/tests/data/shared.js#123-142

AppUpdater.check seems to be the main entry point
I think you can use nsIUpdateService.addDownloadListener to see when downloads are happening.

Note that this part of the code needs to be hit for the IncrementalDownloader to be used - which I believe is only Linux & Mac.

See Also: → 1350470
See Also: → 1852835

Retargeting OnDataAvailable to STS to avoid main thread jank during downloads.

(In reply to Florian Quèze [:florian] from comment #13)

(In reply to Andrew Creskey [:acreskey] from comment #11)

Can this still be reproduced?

I haven't tried recently, but it's still visible on BHR: https://fqueze.github.io/hang-stats/#date=20230222&row=0&filter=nsIncrementalDownload

It's possible we no longer see it on Windows if updates are downloaded by a background service there.

I almost wrote the same comment again, it's still visible on Mac on BHR: https://fqueze.github.io/hang-stats/#date=20240518&row=0&filter=nsIncrementalDownload

A few days after the fix lands, this stack should disappear from BHR.

Flags: needinfo?(florian)
Pushed by acreskey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40c0022a52f0 nsIncrementalDownload causes a lot of jank with main thread I/O while downloading updates in the background r=necko-reviewers,valentin
Pushed by acreskey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/98f82a742b40 nsIncrementalDownload causes a lot of jank with main thread I/O while downloading updates in the background r=necko-reviewers,valentin

Backed out for causing failures on browser_aboutPrefs_fc_patch_partialBadSize_complete.js.

[task 2024-05-25T05:11:16.474Z] 05:11:16     INFO - TEST-PASS | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | Sanity check: Expected download status text should be non-empty - "0 bytes of 13.9 KB" == true - 
[task 2024-05-25T05:11:16.474Z] 05:11:16     INFO - Buffered messages finished
[task 2024-05-25T05:11:16.484Z] 05:11:16     INFO - TEST-UNEXPECTED-FAIL | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | Download status text should end as expected: {"actualText":"Downloading update — 1.4 of 1.4 KB","expectedSuffix":"0 bytes of 13.9 KB"} - false == true - {"filename":"chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js","name":"runAboutPrefsUpdateTest/processAboutPrefsStep/<","sourceId":2185,"lineNumber":1155,"columnNumber":20,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js","name":"processAboutPrefsStep","sourceId":2185,"lineNumber":1236,"columnNumber":7,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js","name":"runAboutPrefsUpdateTest/<","sourceId":2185,"lineNumber":1313,"columnNumber":13,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js","name":"runAboutPrefsUpdateTest","sourceId":2185,"lineNumber":1315,"columnNumber":5,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js","name":"aboutPrefs_foregroundCheck_partialBadSize_complete","sourceId":2192,"lineNumber":20,"columnNumber":9,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"handleTask","sourceId":571,"lineNumber":1139,"columnNumber":26,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"_runTaskBasedTest","sourceId":571,"lineNumber":1211,"columnNumber":18,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"Tester_execTest","sourceId":571,"lineNumber":1353,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"nextTest/<","sourceId":571,"lineNumber":1128,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js","name":"SimpleTest.waitForFocus/<","sourceId":598,"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":"async*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":{}},"caller":null,"formattedStack":"_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*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":"handleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*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":"aboutPrefs_foregroundCheck_partialBadSize_complete@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js:20:9\nhandleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*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":"async*runAboutPrefsUpdateTest@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1315:5\naboutPrefs_foregroundCheck_partialBadSize_complete@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js:20:9\nhandleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*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":{}},"caller":null,"formattedStack":"runAboutPrefsUpdateTest/<@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1313:13\nasync*runAboutPrefsUpdateTest@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1315:5\naboutPrefs_foregroundCheck_partialBadSize_complete@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js:20:9\nhandleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*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":"async*processAboutPrefsStep@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1236:7\nrunAboutPrefsUpdateTest/<@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1313:13\nasync*runAboutPrefsUpdateTest@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1315:5\naboutPrefs_foregroundCheck_partialBadSize_complete@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js:20:9\nhandleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*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":{}},"caller":null,"formattedStack":"runAboutPrefsUpdateTest/processAboutPrefsStep/<@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1155:20\nasync*processAboutPrefsStep@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1236:7\nrunAboutPrefsUpdateTest/<@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1313:13\nasync*runAboutPrefsUpdateTest@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:1315:5\naboutPrefs_foregroundCheck_partialBadSize_complete@chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js:20:9\nhandleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*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":{}}
[task 2024-05-25T05:11:16.485Z] 05:11:16     INFO - Stack trace:
[task 2024-05-25T05:11:16.486Z] 05:11:16     INFO - chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:runAboutPrefsUpdateTest/processAboutPrefsStep/<:1155
[task 2024-05-25T05:11:16.486Z] 05:11:16     INFO - chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:processAboutPrefsStep:1236
[task 2024-05-25T05:11:16.487Z] 05:11:16     INFO - chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:runAboutPrefsUpdateTest/<:1313
[task 2024-05-25T05:11:16.487Z] 05:11:16     INFO - chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/head.js:runAboutPrefsUpdateTest:1315
[task 2024-05-25T05:11:16.488Z] 05:11:16     INFO - chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js:aboutPrefs_foregroundCheck_partialBadSize_complete:20
[task 2024-05-25T05:11:16.488Z] 05:11:16     INFO - chrome://mochikit/content/browser-test.js:handleTask:1139
[task 2024-05-25T05:11:16.488Z] 05:11:16     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1211
[task 2024-05-25T05:11:16.489Z] 05:11:16     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1353
[task 2024-05-25T05:11:16.489Z] 05:11:16     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1128
[task 2024-05-25T05:11:16.490Z] 05:11:16     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-05-25T05:11:16.491Z] 05:11:16     INFO - TEST-PASS | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | The panel ID should equal apply - "apply" == "apply" - 
[task 2024-05-25T05:11:16.492Z] 05:11:16     INFO - TEST-PASS | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | The current update state should be "STATE_PENDING". Actual: "STATE_PENDING" - 
[task 2024-05-25T05:11:16.493Z] 05:11:16     INFO - TEST-PASS | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | There should be an active update - 
[task 2024-05-25T05:11:16.493Z] 05:11:16     INFO - TEST-PASS | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | The active update state should equal pending - 
[task 2024-05-25T05:11:16.494Z] 05:11:16     INFO - TEST-PASS | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | The button should be enabled - true == true - 
[task 2024-05-25T05:11:16.495Z] 05:11:16     INFO - Leaving test bound aboutPrefs_foregroundCheck_partialBadSize_complete
[task 2024-05-25T05:11:16.541Z] 05:11:16     INFO - GECKO(5025) | [Parent 5025, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:163
[task 2024-05-25T05:11:16.542Z] 05:11:16     INFO - GECKO(5025) | [Parent 5025, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:163
[task 2024-05-25T05:11:16.991Z] 05:11:16     INFO - GECKO(5025) | MEMORY STAT | vsize 11863MB | residentFast 679MB | heapAllocated 328MB
[task 2024-05-25T05:11:16.992Z] 05:11:16     INFO - TEST-OK | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_complete.js | took 2975ms
[task 2024-05-25T05:11:17.001Z] 05:11:17     INFO - GECKO(5025) | [Child 5149: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7fc1a256e000 == 2 [pid = 5149] [id = 27]
[task 2024-05-25T05:11:17.002Z] 05:11:17     INFO - GECKO(5025) | [Child 5149: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 4 (7fc1a2a6d3e0) [pid = 5149] [serial = 57] [outer = 0]
[task 2024-05-25T05:11:17.004Z] 05:11:17     INFO - GECKO(5025) | [Child 5149: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 5 (7fc1a256e400) [pid = 5149] [serial = 58] [outer = 7fc1a2a6d3e0]
[task 2024-05-25T05:11:17.056Z] 05:11:17     INFO - checking window state
[task 2024-05-25T05:11:17.089Z] 05:11:17     INFO - TEST-START | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_patch_partialBadSize_completeBadSize.js
Flags: needinfo?(acreskey)
Flags: needinfo?(acreskey)

Kershaw, as far as I can tell this change (retarget OnDataAvailable for nsIncrementalDownload.cpp) was backed out because it fails with the socket process enabled.

Failure push

Test group - Mochitest browser-chrome run with networking on socket process enabled.

If this is indeed the reason for the failure, is it reasonable to skip the retargeting of nsIncrementalDownload if the socketProcess is running?
i.e. nsIOService::UseSocketProcess()

Flags: needinfo?(kershaw)

(In reply to Andrew Creskey [:acreskey] from comment #24)

Kershaw, as far as I can tell this change (retarget OnDataAvailable for nsIncrementalDownload.cpp) was backed out because it fails with the socket process enabled.

Failure push

Test group - Mochitest browser-chrome run with networking on socket process enabled.

If this is indeed the reason for the failure, is it reasonable to skip the retargeting of nsIncrementalDownload if the socketProcess is running?
i.e. nsIOService::UseSocketProcess()

Yeah, it's reasonable to me.
Or we can just skip running that test with socket process by adding skip-if = ["socketprocess_networking"].
Up to you. :)

Flags: needinfo?(kershaw)
Pushed by acreskey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96db2d238e3e nsIncrementalDownload causes a lot of jank with main thread I/O while downloading updates in the background r=necko-reviewers,valentin,kershaw
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Duplicate of this bug: 1878502

With the fix landed I no longer see nsIncrementalDownload::OnDataAvailable() in the hang report.

Looking back from the start of the year, I calculated that nsIncrementalDownload::OnDataAvailable made up ~80% of the time spent janked due to nsIncrementalDownload:
https://fqueze.github.io/hang-stats/#date=20240101&row=9&filter=nsIncrementalDownload

The remainder comes from nsIncrementalDownload::CallOnStopRequest(), which we can still traces of:
https://fqueze.github.io/hang-stats/#date=20240610&row=1&filter=nsIncrementalDownload

Florian, it's not clear to me how serious the nsIncrementalDownload::CallOnStopRequest() hangs are, relative to other hangs.
We have a new API to allow for OnStopRequest OMT (OnDataFinished), so we could consider moving that in a new bug, if you think it could be worth it.

Also is there a way to see top 100 or top 200 hangs?
https://fqueze.github.io/hang-stats/#date=20240610&row=0&filter=

Flags: needinfo?(acreskey) → needinfo?(florian)
See Also: 1878502
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: