Closed Bug 1514733 Opened 5 years ago Closed 5 years ago

Crash in mozilla::ipc::MessageChannel::CxxStackFrame::CxxStackFrame | mozilla::ipc::MessageChannel::Send | mozilla::dom::PRemoteWorkerParent::SendExecOp


(Core :: DOM: Workers, defect)

Not set



Tracking Status
firefox-esr60 --- unaffected
firefox64 --- unaffected
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed
firefox68 --- fixed


(Reporter: gsvelto, Assigned: baku)


(Blocks 1 open bug)


(Keywords: crash, regression)

Crash Data


(1 file)

This bug was filed from the Socorro interface and is
report bp-e919cc76-1491-4467-97c4-a008f0181216.

Top 10 frames of crashing thread:

0 mozilla::ipc::MessageChannel::CxxStackFrame::CxxStackFrame ipc/glue/MessageChannel.h:538
1 mozilla::ipc::MessageChannel::Send ipc/glue/MessageChannel.cpp:979
2 mozilla::dom::PRemoteWorkerParent::SendExecOp ipc/ipdl/PRemoteWorkerParent.cpp:90
3 mozilla::dom::RemoteWorkerController::RemoveWindowID dom/workers/remoteworkers/RemoteWorkerController.cpp:201
4 mozilla::dom::SharedWorkerManager::RemoveActor dom/workers/sharedworkers/SharedWorkerManager.cpp:104
5 mozilla::dom::SharedWorkerParent::ActorDestroy dom/workers/sharedworkers/SharedWorkerParent.cpp:35
6 mozilla::ipc::PBackgroundParent::DestroySubtree ipc/ipdl/PBackgroundParent.cpp:4060
7 mozilla::ipc::PBackgroundParent::OnChannelError ipc/ipdl/PBackgroundParent.cpp:3730
8 mozilla::detail::RunnableMethodImpl<mozilla::ipc::MessageChannel*, void  xpcom/threads/nsThreadUtils.h:1106
9 nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1157


We're hitting this assertion:

MOZ_RELEASE_ASSERT(mWorkerThread == GetCurrentVirtualThread()) (not on worker thread!)
This is weird and might actually be an IPC bug (vs. an error in how IPC is used by, in this case, workers): PRemoteWorker and PSharedWorker are both managed by PBackground, and all the PBackgroundParent instances should be bound to the same thread.  So even if the PBackground being torn down isn't for the same content process thread as the PRemoteWorker at the end of the stack, that assertion wouldn't fire.  Unless I'm missing something.

Bug 1438945 might be related; it's about shared workers, and the first build with its patches is 20181120100045, which is also the first build where this crash is reported.
See Also: → 1438945
See Also: → 1515183
Blocks: 1438945
Component: IPC → DOM: Workers
Keywords: regression
Hardware: Unspecified → All

Just hit this when restarting nightly with updates and lost all of my open tabs that were not pinned

David, do you have a crash report?

(I'm going to move this to IPC based on comment 2.)

Component: DOM: Workers → IPC
Flags: needinfo?(dburns)
Priority: P3 → --

Baku, is this something you can look into as this is related to the shared workers?

Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Pushed by
RemoteWorkerController should be notified when the RemoteWorkerParent actor is dismissed, r=asuth
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Baku, do you want to uplift to beta?

Flags: needinfo?(amarchesini)

Comment on attachment 9057324 [details]
Bug 1514733 - RemoteWorkerController should be notified when the RemoteWorkerParent actor is dismissed, r?asuth

Beta/Release Uplift Approval Request

  • Feature/Bug causing the regression: SharedWorkers in remote processes
  • User impact if declined: A crash can occur during the shutdown
  • Is this code covered by automated tests?: No
  • 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): The problem is that, when the parent actor is dismissed, we don't inform the manager.
    The fix is trivial, but we cannot write tests because this is a race condition and it's not easy to reproduce it consistently.
  • String changes made/needed:
Flags: needinfo?(amarchesini)
Attachment #9057324 - Flags: approval-mozilla-beta?

Comment on attachment 9057324 [details]
Bug 1514733 - RemoteWorkerController should be notified when the RemoteWorkerParent actor is dismissed, r?asuth

Low risk fix for a medium crash on beta, uplift approved, thanks.

Attachment #9057324 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.