Closed
Bug 1364627
Opened 7 years ago
Closed 7 years ago
NativeFontResourceFontconfig leak when using DrawTargetRecording on Linux
Categories
(Core :: Graphics, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox-esr45 | --- | unaffected |
firefox-esr52 | --- | unaffected |
firefox53 | --- | wontfix |
firefox54 | --- | fixed |
firefox55 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: lsalzman)
References
Details
(Keywords: regression, Whiteboard: [gfx-noted][tor 23970])
Attachments
(2 files)
1.04 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
1.03 KB,
patch
|
lsalzman
:
review+
ritu
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Updated•7 years ago
|
Priority: -- → P2
Whiteboard: [gfx-noted]
Assignee | ||
Comment 1•7 years ago
|
||
The issue here is that the Cairo scaled font passed to the ScaledFontFontconfig constructor then gets ref'd by cairo_scaled_font_reference inside ScaledFontBase. ScaledFontBase is thus expecting that something else either owned the Cairo scaled font or was going to release the reference to fully hand it off to it if that was the intention. Thus, we need to to unref (via cairo_scaled_font_destroy) after we pass it in to the constructor. We weren't doing this, so the Cairo scaled fonts never got destroyed, and all bad stuff followed from this. I'm not sure whether or not to consider this a "regression", since while this was introduced in bug 1309205, we never even supported font recording at all prior to that bug. None the less, this affects versions 53+ when using print-via-parent on Linux, so uplifting this fix is probably a good thing to not leak memory during printing.
Assignee | ||
Updated•7 years ago
|
Blocks: 1309205
Has Regression Range: --- → yes
Has STR: --- → yes
status-firefox53:
--- → affected
status-firefox54:
--- → affected
status-firefox55:
--- → affected
status-firefox-esr45:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Component: Graphics: WebRender → Graphics
Keywords: regression
OS: Unspecified → Linux
Priority: P2 → P1
Hardware: Unspecified → All
Version: unspecified → 53 Branch
Assignee | ||
Updated•7 years ago
|
Summary: NativeFontResourceFontconfig leak when running with WebRender/BlobImage → NativeFontResourceFontconfig leak when using DrawTargetRecording on Linux
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Attachment #8872863 -
Flags: review?(jmuizelaar) → review+
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/5e7872cb3b5c fix leaking of Cairo scaled font when creating ScaledFontFontconfig from a recording. r=jrmuizel
Comment 3•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5e7872cb3b5c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 4•7 years ago
|
||
Please request Beta approval on this at your earliest convenience. The RC build is happening on Monday.
Flags: needinfo?(lsalzman)
Assignee | ||
Comment 5•7 years ago
|
||
Just a rebased version of the patch for 54, since the surrounding code changed a little bit. Approval Request Comment [Feature/Bug causing the regression]: bug 1309205 [User impact if declined]: Memory leaks when printing on Linux with E10s. [Is this code covered by automated tests?]: Currently printing is not covered by automated testing, which was why this leak managed to sneak in. Tobias Schneider is currently working on fixing that scenario. [Has the fix been verified in Nightly?]: yes [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]: [Is the change risky?]: no [Why is the change risky/not risky?]: Just a simple one line fix to free a Cairo font that should have been freed, which gets rid of the leak. [String changes made/needed]: none
Flags: needinfo?(lsalzman)
Attachment #8873261 -
Flags: review+
Attachment #8873261 -
Flags: approval-mozilla-beta?
Comment on attachment 8873261 [details] [diff] [review] fix leaking of Cairo scaled font when creating ScaledFontFontconfig from a recording (54) Seems like a low risk fix for a memleak issue, Beta54+
Attachment #8873261 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 7•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/a85ff8f8399d
Comment 8•7 years ago
|
||
(In reply to Lee Salzman [:lsalzman] from comment #5) > [Is this code covered by automated tests?]: Currently printing is not > covered by automated testing, which was why this leak managed to sneak in. > Tobias Schneider is currently working on fixing that scenario. > [Has the fix been verified in Nightly?]: yes > [Needs manual test from QE? If yes, steps to reproduce]: no Setting qe-verify- based on Lee's assessment on manual testing needs.
Flags: qe-verify-
Updated•6 years ago
|
Whiteboard: [gfx-noted] → [gfx-noted][tor 23970]
You need to log in
before you can comment on or make changes to this bug.
Description
•