Closed Bug 1711332 Opened 3 years ago Closed 3 years ago

Crash in [@ nsObserverService::AddObserver]

Categories

(Core :: Layout: Text and Fonts, defect, P1)

Unspecified
macOS
defect

Tracking

()

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

People

(Reporter: jrmuizel, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Maybe Fission related. (DOMFissionEnabled=1)

Crash report: https://crash-stats.mozilla.org/report/index/cdd2a125-6004-41a8-9be0-4a8f00210515

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

Top 10 frames of crashing thread:

0 XUL nsObserverService::AddObserver xpcom/ds/nsObserverService.cpp:212
1 XUL gfxPlatformFontList::gfxPlatformFontList gfx/thebes/gfxPlatformFontList.cpp:271
2 XUL gfxMacPlatformFontList::gfxMacPlatformFontList gfx/thebes/gfxMacPlatformFontList.mm:822
3 XUL gfxPlatformMac::CreatePlatformFontList gfx/thebes/gfxPlatformMac.cpp:242
4 XUL gfxFontGroup::BuildFontList gfx/thebes/gfxTextRun.cpp:1869
5 XUL nsFontMetrics::nsFontMetrics gfx/src/nsFontMetrics.cpp:134
6 XUL nsDeviceContext::GetMetricsFor gfx/src/nsDeviceContext.cpp:275
7 XUL nsLayoutUtils::GetMetricsFor layout/base/nsLayoutUtils.cpp:9556
8 XUL Gecko_GetFontMetrics layout/style/GeckoBindings.cpp:1463
9 XUL <style::gecko::wrapper::GeckoFontMetricsProvider as style::font_metrics::FontMetricsProvider>::query servo/components/style/gecko/wrapper.rs:1003

I could reliably reproduce this by loading https://old.reddit.com/r/rust. However, after restarting it went away.

I think Jonathan made font list initialization lazy. Maybe too lazy?

Flags: needinfo?(jfkthame)
Regressed by: 1708768
Has Regression Range: --- → yes
Severity: -- → S2
Priority: -- → P1
Component: CSS Parsing and Computation → Layout: Text and Fonts

Yeah, this must have been triggered by bug 1708768. I haven't seen it happen locally, but I can easily believe it's dependent on exact timing of startup stuff, so reproducing may be unpredictable.

You could avoid it for now by setting gfx.font-list.lazy-init.enabled to false, but I'll look into it and fix properly.

Assignee: nobody → jfkthame
Flags: needinfo?(jfkthame)

Fixed by backout.

Status: NEW → RESOLVED
Closed: 3 years ago
Keywords: regression
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.