Closed Bug 1669191 Opened 4 years ago Closed 2 years ago

Crash in [@ OOM | unknown | NS_ABORT_OOM | PLDHashTable::Add | gfxFontGroup::BuildFontList]

Categories

(Core :: Print Preview, defect, P2)

All
Linux
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox82 --- affected
firefox83 --- affected

People

(Reporter: asoncutean, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, Whiteboard: [print2020][old-ui-] )

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/7795b600-27fe-42bc-8c44-568420201005

Reason: SIGSEGV /SEGV_MAPERR
MOZ_CRASH Reason: MOZ_CRASH(OOM)

Top 10 frames of crashing thread:

0 libxul.so NS_ABORT_OOM xpcom/base/nsDebugImpl.cpp:620
1 libxul.so PLDHashTable::Add xpcom/ds/PLDHashTable.cpp:579
2 libxul.so gfxFontGroup::BuildFontList gfx/thebes/gfxTextRun.cpp:1893
3 libxul.so gfxFontGroup::UpdateUserFonts gfx/thebes/gfxTextRun.cpp:3573
4 libxul.so mozilla::dom::CanvasBidiProcessor::SetText dom/canvas/CanvasRenderingContext2D.cpp:3474
5 libxul.so nsBidiPresUtils::ProcessText layout/base/nsBidiPresUtils.cpp:2230
6 libxul.so mozilla::dom::CanvasRenderingContext2D::DrawOrMeasureText dom/canvas/CanvasRenderingContext2D.cpp:3830
7 libxul.so mozilla::dom::CanvasRenderingContext2D::MeasureText dom/canvas/CanvasRenderingContext2D.cpp:3347
8 libxul.so mozilla::dom::CanvasRenderingContext2D_Binding::measureText dom/bindings/CanvasRenderingContext2DBinding.cpp:6552
9 libxul.so bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions> dom/bindings/BindingUtils.cpp:3229

Affected versions

  • 83.0a1 (2020-10-04)
  • 82.0b7

Affected platforms

  • Ubuntu 18.04

Steps to reproduce

  1. Launch Firefox
  2. Make sure print.tab_modal.enabled is set on true
  3. Open a pdf (eg. http://www.dbsparks.com/research/html/SNRN02.pdf)
  4. Toggle between Portrait and Landscape mode using arrow keys

Additional notes

  • This looks Linux specific, so far we didn’t manage to reproduced on windows or mac
  • I’ve reproduced it only using using a pdf

Suggested severity

  • S2
QA Whiteboard: [qa-regression-triage]

jfkthame: I see gfxFontGroup::BuildFontList so will start with you :) Maybe rapidly toggling orientation is causing us to run out of memory rendering the PDF to canvas?

Severity: -- → S2
Flags: needinfo?(jfkthame)
Priority: -- → P2

The crash occurs way back to nightly from 2020-08-18, on even older builds, I ran into the issue that triggered the “Print Preview error” dialog when switching between Portrait and Landscape mode, therefore I can't come up with a certain conclusion, but it seems that this crash is not actually a regression.

Has STR: --- → yes
Whiteboard: [print2020_v83] [old-ui-] → [print2020_v84][old-ui-]

(This doesn't seem like a Toolkit bug, so I'm throwing it over to the Platform team…)

Component: Printing → Print Preview
Product: Toolkit → Core
Whiteboard: [print2020_v84][old-ui-] → [print2020_v85][old-ui-]
Whiteboard: [print2020_v85][old-ui-] → [print2020_v86][old-ui-]
Whiteboard: [print2020_v86][old-ui-] → [print2020_v88][old-ui-]
Whiteboard: [print2020_v88][old-ui-] → [print2020][old-ui-]
See Also: → 1740682

Anca, would you mind seeing if this is still reproducible with your provided STR? I can't reproduce at this point. I tried current Nightly as well as Nightly 2020-10-05 from the day this was filed, with ~30 seconds of toggling using arrow keys in step 3, and I didn't see any issues.

Side note: it looks like the crash report in comment 0 has disappeared, unfortunately -- good thing we have the backtrace quoted in the comment at least. From that, it looks like the crash (er, abort) was on this line:

      // We failed to resize the existing entry storage, either due to OOM or
      // because we exceeded the maximum table capacity or size; report it as
      // an OOM. The multiplication by 2 gets us the size we tried to allocate,
      // which is double the current size.
      NS_ABORT_OOM(2 * EntrySize() * EntryCount());

https://searchfox.org/mozilla-central/rev/1dfcb71d2f5fe6bed7e220d0f2879d9e014f57c8/xpcom/ds/PLDHashTable.cpp#579

So this was due to this table growing too large and exceeding a threshold or OOM'ing, for some reason.

Flags: needinfo?(anca.soncutean)

(In reply to Daniel Holbert [:dholbert] from comment #4)

Anca, would you mind seeing if this is still reproducible with your provided STR? I can't reproduce at this point. I tried current Nightly as well as Nightly 2020-10-05 from the day this was filed, with ~30 seconds of toggling using arrow keys in step 3, and I didn't see any issues.

I can no longer reproduce this crash with the latest Nightly 96.0a1 (2021-11-24) on Ubuntu 18.04.

Flags: needinfo?(anca.soncutean)

I will close this issue since it is no longer reproducible on the latest Fx builds 103.0a1 (2022-06-22) and 102.0 on Ubuntu 20.04.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.