Bug 93891 - Hang when recursing in _cairo_scaled_font_reset_cache()
Summary: Hang when recursing in _cairo_scaled_font_reset_cache()
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-27 19:03 UTC by Hans Petter Jansson
Modified: 2016-08-02 21:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-scaled-font-Fix-deadlock-when-recursing-in-_cairo_sc.patch (2.40 KB, patch)
2016-01-27 19:06 UTC, Hans Petter Jansson
Details | Splinter Review
evince-11.3test.pdf (6.10 MB, application/pdf)
2016-08-02 20:59 UTC, Hans Petter Jansson
Details
gdb.txt (32.04 KB, text/plain)
2016-08-02 21:00 UTC, Hans Petter Jansson
Details

Description Hans Petter Jansson 2016-01-27 19:03:52 UTC
The destruction of a scaled font can indirectly trigger the destruction
of a second scaled font, causing the global cache to be locked twice in
the same thread.

This can cause applications to deadlock when rendering certain PDF documents.
Comment 1 Hans Petter Jansson 2016-01-27 19:06:31 UTC
Created attachment 121328 [details] [review]
0001-scaled-font-Fix-deadlock-when-recursing-in-_cairo_sc.patch

Patch that fixes the bug here.
Comment 2 Behdad Esfahbod 2016-08-02 05:06:28 UTC
I don't pretend to know the glyph cache anymore, but I trust you with your analysis.

Humm, let's see any of the surviving maintainers can push this in.  Anyone?
Comment 3 Hans Petter Jansson 2016-08-02 20:59:51 UTC
Created attachment 125494 [details]
evince-11.3test.pdf

PDF that triggers the bug if viewed in evince (Cairo 1.12.16).
Comment 4 Hans Petter Jansson 2016-08-02 21:00:58 UTC
Created attachment 125495 [details]
gdb.txt

gdb trace. See thread 6.
Comment 5 Behdad Esfahbod 2016-08-02 21:22:13 UTC
Thanks.  Verified fixed and pushed to master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.