Closed Bug 1777181 Opened 3 years ago Closed 3 years ago

Crash in [@ mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable]

Categories

(Core :: DOM: Workers, defect)

defect

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 102+ fixed
firefox102 --- fixed
firefox103 --- fixed
firefox104 --- fixed

People

(Reporter: aryx, Assigned: nika)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash started with Firefox 102 branch, up to Nightly (104) affected. 102 has 19 crashes from 12 installations at the moment, 103.a1 had 137 crashes from 22 installations over the 22 days development cycle (compared with 13 for 6 during the 102.0a1 development cycle).

Crash report: https://crash-stats.mozilla.org/report/index/c82820c7-032f-4abb-96b1-dec470220629

MOZ_CRASH Reason: MOZ_CRASH(All runnables destined for a worker thread must be nsIDiscardableRunnable!)

Top 10 frames of crashing thread:

0 xul.dll mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable dom/workers/WorkerPrivate.cpp:1668
1 xul.dll mozilla::dom::WorkerThread::Dispatch dom/workers/WorkerThread.cpp:288
2 xul.dll fu2::abi_400::detail::invocation::invoke<`lambda at /builds/worker/checkouts/gecko/ipc/glue/DataPipe.cpp:61:9'&> third_party/function2/include/function2/function2.hpp:222
3 xul.dll mozilla::ipc::data_pipe_detail::DataPipeAutoLock::~DataPipeAutoLock ipc/glue/DataPipe.cpp:45
4 xul.dll mozilla::ipc::data_pipe_detail::DataPipeBase::AsyncWaitInternal ipc/glue/DataPipe.cpp:401
5 xul.dll mozilla::ipc::DataPipeReceiver::AsyncWait ipc/glue/DataPipe.cpp:643
6 xul.dll mozilla::InputStreamLengthWrapper::AsyncWait xpcom/io/InputStreamLengthWrapper.cpp:220
7 xul.dll nsBufferedInputStream::AsyncWait netwerk/base/nsBufferedStreams.cpp:684
8 xul.dll mozilla::RemoteLazyInputStream::AsyncWait dom/file/ipc/RemoteLazyInputStream.cpp:749
9 xul.dll mozilla::dom::FileReader::DoAsyncWait dom/file/FileReader.cpp:253

Hi Nika! This might have to do with the changes from bug 1768956 ? I assume that NS_NewRunnableFunction is not a DiscardableRunnable?

Flags: needinfo?(nika)

Those changes didn't introduce any new NS_NewRunnableFunction instances, it just updated existing ones, so I think this issue is unrelated to that specific bug. The issue is probably related to those runnables not being discardable however, as we dispatch them to the given event target if its provided.

The workaround for this should be as simple as changing the NS_NewRunnableFunction calls to NS_NewCancelableRunnableFunction.

Assignee: nobody → nika
Flags: needinfo?(nika)
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/58e20528df57 Use cancelable runnables for DataPipe notifications, r=asuth
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch

Please also request a release uplift, thanks.

Comment on attachment 9283453 [details]
Bug 1777181 - Use cancelable runnables for DataPipe notifications, r=asuth!

Beta/Release Uplift Approval Request

  • User impact if declined: Occasional crashes due to a runtime MOZ_CRASH check for appropriate worker runnables.
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): We just use the appropriate runnable base class, no logic change.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9283453 - Flags: approval-mozilla-release?
Attachment #9283453 - Flags: approval-mozilla-beta?

Comment on attachment 9283453 [details]
Bug 1777181 - Use cancelable runnables for DataPipe notifications, r=asuth!

Approved for 103.0b5, thanks.

Attachment #9283453 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9283453 [details]
Bug 1777181 - Use cancelable runnables for DataPipe notifications, r=asuth!

Approved for 102.0.1, thanks.

Attachment #9283453 - Flags: approval-mozilla-release? → approval-mozilla-release+
Flags: needinfo?(nika)

Comment on attachment 9283453 [details]
Bug 1777181 - Use cancelable runnables for DataPipe notifications, r=asuth!

The crashes stopped on 102.0.1, taking for the ESR102 branch and the ESR102.0.1 release

Attachment #9283453 - Flags: approval-mozilla-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: