gs segfault while printing

Bug #1334712 reported by zefox on 2014-06-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ghostscript (Fedora)
Fix Released
ghostscript (Ubuntu)

Bug Description

OS : Lubuntu 14.04 32 or 64 bit
Printer : Canon BJC 4100
ghostscript 9.10~dfsg-0ubuntu10.1

Can't print, filter failed

Seems to be the same as


With certain drivers/printers it is impossible to print.

[Test Case]

Run the following command line (from the Red Hat bug report) in a terminal window:

gs -dFirstPage=1 -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -dNOINTERPOLATE -sDEVICE=bjc600 -dPrintColors=15 -dProcessColorModel=/DeviceCMYK -dBitsPerPixel=24 -sPrintQuality=Normal -dMediaWeight=80 -sMediaType=PlainPaper -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -r360x360 -sOutputFile=/dev/null

Without the fix Ghostscript crashes with a segmentation fault, with the proposed package Ghostscript does not crash any more.

[Regression Potential]

Very low, the patch are trivial NULL checks.

Created attachment 831332
output from printer troubleshoot

Description of problem:
system-printer-config reports "filter failed" for any print job. Troubleshoot reads "sorry, no obvious solution"

Version-Release number of selected component (if applicable):
3.11.9-200.fc19.x86_64 #1
Printer Canon-BJC-4200

How reproducible:

Steps to Reproduce:
1. Start a print job (or $lp...)
2. job sent to the printer
3. a message appears "filter failed"

Actual results:
No printing

Expected results:
Printer working

Additional info:
Printer was working before the update. Troubleshoot output attached

I think that's a kernel version number.

Did you print a file at the point the troubleshoot process asked you to? It doesn't record any file being printed. It would be really useful to see that debugging output from printing a file.

If you aren't able to do that using the troubleshooter, just use "cupsctl --debug-logging", then print a file, then attach /var/log/cups/error_log. You can turn off debugging afterwards with "cupsctl --no-debug-logging".

Created attachment 833114
error log

Download full text (3.5 KiB)

D [01/Dec/2013:20:34:55 -0300] [Job 112] Starting renderer with command: gs -dFirstPage=1 -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -dNOINTERPOLATE -sDEVICE=bjc600 -dPrintColors=15 -dProcessColorModel=/DeviceCMYK -dBitsPerPixel=24 -sPrintQuality=Normal -dMediaWeight=80 -sMediaType=PlainPaper -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -r360x360 -sOutputFile=- /var/spool/cups/tmp/foomatic-JJnW1t
D [01/Dec/2013:20:34:55 -0300] [Job 112] Starting process "kid3" (generation 1)
D [01/Dec/2013:20:34:55 -0300] [Job 112] Starting process "kid4" (generation 2)
D [01/Dec/2013:20:34:55 -0300] [Job 112] Starting process "renderer" (generation 2)
D [01/Dec/2013:20:34:55 -0300] [Job 112] JCL: %-12345X@PJL
D [01/Dec/2013:20:34:55 -0300] [Job 112] <job data>
D [01/Dec/2013:20:34:55 -0300] [Job 112] renderer received signal 11
D [01/Dec/2013:20:34:55 -0300] [Job 112] Kid3 exit status: 1
D [01/Dec/2013:20:34:55 -0300] [Job 112] Sent 0 bytes...
D [01/Dec/2013:20:34:55 -0300] [Job 112] PID 20113 (/usr/lib/cups/filter/foomatic-rip) stopped with status 9.

I think that's saying ghostscript crashed. In fact, just running that command line does indeed crash:

$ gdb --args gs -dFirstPage=1 -q -dBATCH -dPARANOIDSAFER -dT -dNOPAUSE -dNOINTERPOLATE -sDEVICE=bjc600 -dPrintColors=15 -dProcessColorModel=/DeviceCMYK -dBitsPerPixel=24 -sPrintQuality=Normal -dMediaWeight=80 -sMediaType=PlainPaper -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -r360x360 -sOutputFile=/dev/null
(gdb) r
Starting program: /usr/bin/gs -dFirstPage=1 -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -dNOINTERPOLATE -sDEVICE=bjc600 -dPrintColors=15 -dProcessColorModel=/DeviceCMYK -dBitsPerPixel=24 -sPrintQuality=Normal -dMediaWeight=80 -sMediaType=PlainPaper -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -r360x360 -sOutputFile=/dev/null
Program received signal SIGSEGV, Segmentation fault.
gs_setoverprint (pgs=0x63be98, ovp=0) at base/gsstate.c:711
711 if (profile_struct->sim_overprint == false) return;
(gdb) bt
#0 gs_setoverprint (pgs=0x63be98, ovp=0) at base/gsstate.c:711
#1 0x0000003432dd211c in zsetoverprint (i_ctx_p=0x657d10) at psi/zcssepr.c:71
#2 0x0000003432d80272 in interp (pi_ctx_p=pi_ctx_p@entry=0x6053e0,
    pref=<optimized out>, perror_object=perror_object@entry=0x7fffffffd2f0)
    at psi/interp.c:1561
#3 0x0000003432d80d19 in gs_call_interp (perror_object=0x7fffffffd2f0,
    pexit_code=0x7fffffffcc40, user_errors=<optimized out>,
    pref=0x7fffffffcca0, pi_ctx_p=0x605480) at psi/interp.c:510
#4 gs_interpret (pi_ctx_p=pi_ctx_p@entry=0x6053e0,
    pref=pref@entry=0x7fffffffcd20, user_errors=<optimized out>,
    perror_object=perror_object@entry=0x7fffffffd2f0) at psi/interp.c:468
#5 0x0000003432d75192 in gs_main_interpret (perror_object=0x7fffffffd2f0,
    pexit_code=0x7fffffffd2ec, user_errors=<optimized out>,
    pref=0x7fffffffcd20, minst=0x605340) at psi/imain.c:241
#6 gs_run_init_file (minst=minst@entry=0x605340,
    perror_object=perror_object@entry=0x7fffffffd2f0) at psi/imain.c:552
#7 0x0000003432d756a2 in gs_main_init2aux (minst=m...


Created attachment 834836

'git bisect' shows this to be the fix.

ghostscript-9.10-5.fc19 has been submitted as an update for Fedora 19.

ghostscript-9.10-5.fc20 has been submitted as an update for Fedora 20.

Package ghostscript-9.10-5.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ghostscript-9.10-5.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

*** Bug 1027425 has been marked as a duplicate of this bug. ***

ghostscript-9.10-5.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.

ghostscript-9.10-5.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.

Till Kamppeter (till-kamppeter) wrote :

Bug is fixed in Ghostscript 9.14 which comes with Utopic, therefore closing as fixed for Utopic. In Trusty (GS 9.10) I can reproduce the bug with the Ghostscript command line of the Red Hat bug report.

Changed in ghostscript (Ubuntu):
status: New → Fix Released

Identified the patch in the upstream GIT of Ghostscript and it is the patch which fixes

GIT commit ID is 142b12b.

Till Kamppeter (till-kamppeter) wrote :

the fix of the following Ghostscript upstream bug fixes also this bug:

description: updated
Changed in ghostscript (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → High
Changed in ghostscript (Ubuntu):
importance: Undecided → High
Till Kamppeter (till-kamppeter) wrote :

Uploaded a fixed package to trusty-proposed. As soon as this package gets approved it will be available for testing and instructions for installing it on a Trusty system will get posted here. Please test this package and tell us here whether it solves your problem. Your feedback is required to make the package an official update.

zefox (zefox) wrote :

Thank you for your quick answer.
I'm waiting for your instructions.

Yesterday I tried again and :
* dmesg :
[ 796.622427] gs[3033]: segfault at ac ip 00007fab4bd36c18 sp
00007fff3a075ed0 error 4 in[7fab4b9b2000+52a000]

* cupsctl --debug-logging", then print a file, then /var/log/cups/error_log in attachment.

Hello zedoc, or anyone else affected,

Accepted ghostscript into trusty-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in ghostscript (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
zefox (zefox) wrote :

When I used sudo apt-get install ghostscript/trusty-proposed, don't know why it removed lubuntu-core and ghostscript-x.
But thank you it works, now I can print !
So ghostscript/9.10~dfsg-0ubuntu10.2 fix this bug.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.10~dfsg-0ubuntu10.2

ghostscript (9.10~dfsg-0ubuntu10.2) trusty-proposed; urgency=low

  * debian/patches/020140626-142b12b-null-check-for-icc-profile.patch:
    Add NULL checks for ICC profiles (LP: #1334712, Upstream bug #694154).
 -- Till Kamppeter <email address hidden> Thu, 26 Jun 2014 20:15:33 +0200

Changed in ghostscript (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for ghostscript has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in ghostscript (Fedora):
importance: Unknown → Critical
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.