Closed Bug 1664905 Opened 4 years ago Closed 4 years ago

Crash in [@ nsObserverService::AddObserver]

Categories

(Core :: Graphics: Layers, defect)

Desktop
Windows 10
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox82 --- wontfix
firefox83 --- fixed

People

(Reporter: toshi, Assigned: jgilbert)

References

(Regressed 1 open bug)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

I just found the GPU process 100% crashes when I open facebook.com with setting layers.acceleration.disabled to true. I did this configuration to test another fix and I know it's unusual, so this may be negligible.

Crash report: https://crash-stats.mozilla.org/report/index/cfda0df5-b06d-4cf5-98b8-898c90200914

Top 10 frames of crashing thread:

0 xul.dll nsObserverService::AddObserver xpcom/ds/nsObserverService.cpp:211
1 xul.dll mozilla::widget::GfxInfoBase::Init widget/GfxInfoBase.cpp:640
2 xul.dll mozilla::widget::GfxInfo::Init widget/windows/GfxInfo.cpp:440
3 xul.dll mozilla::xpcom::CreateInstanceImpl xpcom/components/StaticComponents.cpp:12187
4 xul.dll nsGetServiceByContractID::operator const xpcom/components/nsComponentManagerUtils.cpp:243
5 xul.dll nsCOMPtr_base::assign_from_gs_contractid xpcom/base/nsCOMPtr.cpp:82
6 xul.dll XPCOMService_GetGfxInfo xpcom/build/Services.cpp:312
7 xul.dll mozilla::WebGLContext::WebGLContext dom/canvas/WebGLContext.cpp:163
8 xul.dll static mozilla::WebGLContext::Create dom/canvas/WebGLContext.cpp:572
9 xul.dll static mozilla::HostWebGLContext::Create dom/canvas/HostWebGLContext.cpp:62

The crash reason is "Using observer service off the main thread!". It looks like the GfxInfo service is being initialized off of the main thread, and it tries to add itself as an observer, which is not allowed.

Component: XPCOM → Graphics: Layers

This looks like something I've run into before (see bug 1654957 comment #7): we try to initialize GfxInfo on the GPU process main thread before any non-main-thread use is possible, but only if WebRender is in use, and I notice that the crash report says WR-. This ought to be fixable by removing that condition, I think?

GfxInfo generally wants to be main-thread, so WebGL (especially
out-of-process) runs into problems sometimes.

Also remove obsolete FEATURE_WEBGL_MSAA.

Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ea0c63fe8b8
Use gfxVars instead of GfxInfo in WebGL code. r=mattwoodrow
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3dcacf3ae5a1
Use gfxVars instead of GfxInfo in WebGL code. r=mattwoodrow

Backed out for assertion failures on GfxInfoBase.cpp

*backout:*https://hg.mozilla.org/integration/autoland/rev/58748009e356364221c5e9d3f63206623ad0deab

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=3dcacf3ae5a17f941a42443c80553498e969821d&group_state=expanded&selectedTaskRun=Hjux12ngS92sCSK91S_yFA.0

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=316688932&repo=autoland&lineNumber=1968

[task 2020-09-25T06:23:27.806Z] 06:23:27 INFO - [1387, Main Thread] WARNING: NS_ENSURE_TRUE(presShell) failed: file /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowOuter.cpp, line 4275
[task 2020-09-25T06:23:28.124Z] 06:23:28 INFO - Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Unexpected nsIGfxInfo feature?!), at /builds/worker/checkouts/gecko/widget/GfxInfoBase.cpp:223
[task 2020-09-25T06:23:28.131Z] 06:23:28 INFO - Initializing stack-fixing for the first stack frame, this may take a while...
[task 2020-09-25T06:23:34.600Z] 06:23:34 INFO - #01: mozilla::widget::GfxInfoBase::GetFeatureStatus(int, nsTSubstring<char>&, int*) [widget/GfxInfoBase.cpp:683]
[task 2020-09-25T06:23:34.600Z] 06:23:34 INFO - #02: mozilla::widget::GfxInfoBase::GetAllFeatures() [widget/GfxInfoBase.cpp:717]
[task 2020-09-25T06:23:34.601Z] 06:23:34 INFO - #03: mozilla::dom::ContentParent::InitInternal(mozilla::hal::ProcessPriority) [dom/ipc/ContentParent.cpp:2685]
[task 2020-09-25T06:23:34.601Z] 06:23:34 INFO - #04: mozilla::dom::ContentParent::LaunchSubprocessResolve(bool, mozilla::hal::ProcessPriority) [dom/ipc/ContentParent.cpp:2383]
[task 2020-09-25T06:23:34.601Z] 06:23:34 INFO - #05: mozilla::dom::ContentParent::WaitForLaunchSync(mozilla::hal::ProcessPriority) [dom/ipc/ContentParent.cpp:1150]
[task 2020-09-25T06:23:34.602Z] 06:23:34 INFO - #06: mozilla::dom::ContentParent::GetNewOrUsedBrowserProcess(nsTSubstring<char> const&, mozilla::dom::BrowsingContextGroup*, mozilla::hal::ProcessPriority, bool) [dom/ipc/ContentParent.cpp:1090]
[task 2020-09-25T06:23:34.602Z] 06:23:34 INFO - #07: mozilla::dom::ContentParent::CreateBrowser(mozilla::dom::TabContext const&, mozilla::dom::Element*, nsTSubstring<char> const&, mozilla::dom::BrowsingContext*, mozilla::dom::ContentParent*) [dom/ipc/ContentParent.cpp:1355]
[task 2020-09-25T06:23:34.602Z] 06:23:34 INFO - #08: nsFrameLoader::TryRemoteBrowserInternal() [dom/base/nsFrameLoader.cpp:2597]
[task 2020-09-25T06:23:34.603Z] 06:23:34 INFO - #09: nsFrameLoader::TryRemoteBrowser() [dom/base/nsFrameLoader.cpp:2660]
[task 2020-09-25T06:23:34.603Z] 06:23:34 INFO - #10: nsFrameLoader::ShowRemoteFrame(mozilla::gfx::IntSizeTyped<mozilla::ScreenPixel> const&, nsSubDocumentFrame*) [dom/base/nsFrameLoader.cpp:1071]
[task 2020-09-25T06:23:34.603Z] 06:23:34 INFO - #11: nsFrameLoader::Show(nsSubDocumentFrame*) [dom/base/nsFrameLoader.cpp:948]
[task 2020-09-25T06:23:34.604Z] 06:23:34 INFO - #12: nsSubDocumentFrame::ShowViewer() [layout/generic/nsSubDocumentFrame.cpp:196]
[task 2020-09-25T06:23:34.604Z] 06:23:34 INFO - #13: AsyncFrameInit::Run() [layout/generic/nsSubDocumentFrame.cpp:98]
[task 2020-09-25T06:23:34.605Z] 06:23:34 INFO - #14: nsContentUtils::RemoveScriptBlocker() [dom/base/nsContentUtils.cpp:5372]
[task 2020-09-25T06:23:34.605Z] 06:23:34 INFO - #15: mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) [layout/base/PresShell.cpp:4196]
[task 2020-09-25T06:23:34.606Z] 06:23:34 INFO - [Parent 1387, GMPThread] WARNING: Failed to delete GMP storage directory: file /builds/worker/checkouts/gecko/dom/media/gmp/GMPServiceParent.cpp, line 1563
[..]

Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fb95cf4f316a
Use gfxVars instead of GfxInfo in WebGL code. r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: needinfo?(jgilbert)
Regressions: 1675357
Regressions: 1673300
Regressed by: 1679671
No longer regressed by: 1679671
Regressions: 1679671
Regressions: 1730024
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: