Closed Bug 1820434 Opened 1 year ago Closed 1 year ago

Leaked object in a worker causing globalScopeAlive assertions

Categories

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

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Crashes when running infrastructure/server/webtransport-h3.https.sub.any.js in a worker, due to leaking an object, which cases a globalScopeAlive error.

0:42.70 pid:189347 [Child 189660: DOM Worker]: D/WebTransport NotifyIncomingStream: 1 Bidirectional
0:42.70 pid:189347 [Parent 189347: Socket Thread]: D/WebTransport RecvCreateBidirectionalStream for 7fb6c5468c00 received, useSendOrder=0, sendOrder=0
0:42.70 pid:189347 [Parent 189347: Socket Thread]: D/WebTransport Bidirectional stream ready!
0:42.70 pid:189347 [Parent 189347: Socket Thread]: D/WebTransport Returning BidirectionalStream pipe to content
0:42.70 pid:189347 [Child 189660: DOM Worker]: D/WebTransport CreateBidirectionalStream response
0:42.70 pid:189347 [Child 189660: DOM Worker]: D/WebTransport Returning a bidirectionalStream
0:42.71 pid:189347 ********* passed
0:42.87 TEST_END: Test OK. Subtests passed 1/1. Unexpected 0
0:42.87 TEST_START: /infrastructure/server/webtransport-h3.https.sub.any.worker.html
0:42.89 INFO Closing window b3e90429-d7b1-468e-b4f6-89ee75a1c9aa
0:43.36 pid:189347 [Child 189660: DOM Worker]: D/WebTransport WebTransportChild::Shutdown() for 7f653f9ad060 (7f652a6a3a80)
0:43.36 pid:189347 [Child 189660: DOM Worker]: D/WebTransport ~WebTransport() for 7f652a6a3a80
0:43.53 pid:189347 Assertion failure: !globalScopeAlive, at /home/jesup/src/mozilla/inbound_merge/dom/workers/RuntimeService.cpp:2107

Doesn't leak if we call wt.close()

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]

nsIAsyncInputStreams keep a reference to the callback object, causing
possible leaks which will result in assertions in workers. Also use a
StrongWorkerRef to ensure the worker remains around until the
OnInputStreamReady callback occurs.

Pushed by rjesup@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39f22b088301
Isolate AsyncInputStream from InputToReadableStream for workers r=asuth

Backed out for causing build bustages on WebTransportDatagramDuplexStream.cpp

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Promise.h:300:33: error: function 'mozilla::dom::Promise::ThenWithCycleCollectedArgs<(lambda at /builds/worker/checkouts/gecko/dom/webtransport/api/WebTransportDatagramDuplexStream.cpp:190:13), RefPtr<mozilla::dom::IncomingDatagramStreamAlgorithms> &, RefPtr<mozilla::dom::Promise> &>' is used but not defined in this translation unit, and cannot be defined in any other translation unit
Flags: needinfo?(rjesup)
Pushed by rjesup@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c0358507d1e7
Isolate AsyncInputStream from InputToReadableStream for workers r=asuth
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: