Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476234 - =media-libs/lcms-2.5 in same process with ghostscript-gpl leads to segfault, affecting evince, lc-monocle and possibly others - #3 0x00007fffe233afe0 in cmsBuildSegmentedToneCurve () from /usr/lib64/liblcms2.so.2
Summary: =media-libs/lcms-2.5 in same process with ghostscript-gpl leads to segfault, ...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-08 21:32 UTC by Georg Rudoy
Modified: 2015-01-18 11:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Backtrace for leechcraft-monocle (segfault,6.38 KB, text/plain)
2013-07-08 21:49 UTC, Georg Rudoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Rudoy 2013-07-08 21:32:40 UTC
Applications that have ghostscript-gpl and lcms-2.5 (pulled via poppler[lcms]) in the same process and call poppler API after issuing at least one call to ghostscript-gpl library experience a crash seemingly caused by an lcms bug. The crash appears to be avoided on some PDFs lacking images, apparently allowing poppler to skip lcms initialization and thus avoiding the crash. Examples of such apps are Evince and LeechCraft Monocle (I'm the dev of the latter).

Some relevant info and considerations could be found in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=977528

As LeechCraft developer I can also confirm the suggestion in that bugreport about memory issues due to ghostscript-gpl — after commenting out all of the ghostscript-gpl-calling code everything is fine.

Downgrading to lcms-2.4 (and thus ghostscript-gpl-9.06 due to dependency) fixes the issue. A user of another distro can confirm the same segfault with lcms 2.5 and ghostscript 9.07 with Monocle, and that the segfault goes away after downgrading to lcms 2.4 keeping ghostscript 9.07 (thus the issue is in lcms).

There is no easy workaround since poppler is required to be built with USE="lcms" by cups-filters (which is I guess is quite a popular package).

Reproducible: Always

Steps to Reproduce:
1. Install lc-monocle package with USE flags including `pdf` and `spectre`, making sure poppler is built with USE="lcms" and lcms's version is 2.5.
2. Run the following in a terminal:
leechcraft -P /usr/lib/leechcraft/plugins/libleechcraft_monocle.so -P /usr/lib/leechcraft/plugins/libleechcraft_monocle_pdf.so -P /usr/lib/leechcraft/plugins/libleechcraft_monocle_postrus.so

(note that omitting the last plugin, `/usr/lib/leechcraft/plugins/libleechcraft_monocle_postrus.so`, avoids the crash, proving the suggestion in the bugreport)

3. Open a new tab by pressing Ctrl+T and choose a PDF file, preferably rich with images and similar stuff.
Actual Results:  
A crash.

Expected Results:  
A PDF file happily opened.
Comment 1 Georg Rudoy 2013-07-08 21:49:06 UTC
Created attachment 352882 [details]
Backtrace for leechcraft-monocle
Comment 2 Sergey Popov gentoo-dev 2013-08-08 19:08:14 UTC
app-leechcraft/lc-monocle:

Confirming this with ghostscript-9.07 and lcms-2.5.
Do not confirm with ghostscript-9.06 and lcms-2.5.

I see some tricky thingi here :-/
Comment 3 Pacho Ramos gentoo-dev 2014-12-19 14:37:43 UTC
As I read in relevant bug report, looks like lcms-2.6 should fix this, I would retry with that version then

Thanks