Closed Bug 1705007 Opened 5 months ago Closed 5 months ago

Crash in [@ nsObserverService::AddObserver]

Categories

(Core :: Graphics, defect)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox88 --- wontfix
firefox89 --- wontfix
firefox90 --- fixed

People

(Reporter: gsvelto, Assigned: bradwerth)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/fde3642d-0938-49d6-b60e-5fafe0210414

MOZ_CRASH Reason: MOZ_CRASH(Using observer service off the main thread!)

Top 10 frames of crashing thread:

0 xul.dll nsObserverService::AddObserver xpcom/ds/nsObserverService.cpp:209
1 xul.dll static `anonymous namespace'::ProcessPriorityManagerChild::StaticInit dom/ipc/ProcessPriorityManager.cpp:779
2 xul.dll static mozilla::ProcessPriorityManager::CurrentProcessIsForeground dom/ipc/ProcessPriorityManager.cpp:857
3 xul.dll mozilla::WebGLContext::OnMemoryPressure dom/canvas/WebGLContext.cpp:237
4 xul.dll mozilla::dom::WebGLParent::RecvOnMemoryPressure dom/canvas/WebGLParent.cpp:287
5 xul.dll mozilla::dom::PWebGLParent::OnMessageReceived ipc/ipdl/PWebGLParent.cpp:1758
6 xul.dll mozilla::ipc::PBackgroundParent::OnMessageReceived ipc/ipdl/PBackgroundParent.cpp:6293
7 xul.dll mozilla::ipc::MessageChannel::DispatchMessage ipc/glue/MessageChannel.cpp:2074
8 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1153
9 xul.dll mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:332

The GPU process is receiving a memory pressure event from the parent process via IPC. Before reacting on the event it's calling ProcessPriorityManager::CurrentProcessIsForeground(). The first thing that happens is that the ProcessPriorityManagerChild singleton is initialized and this requires the observer service. However the observer service cannot be called off the main thread so it trips an assertion.

I need to investigate how the process priority manager is supposed to work in this particular scenario because AFAIK that particular singleton should have already been initialized during startup.

Blocks: gfx-triage

In triage, we concluded that GPUParent::Init needs to call ProcessPriorityManager::Init(). I'll build a patch.

Assignee: nobody → bwerth
No longer blocks: gfx-triage
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e7d4eb02cabd
Ensure GPU process has created the observer service. r=gfx-reviewers,aosmond
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.