gs crashed with SIGSEGV

Bug #534525 reported by A Munro on 2010-03-08
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Medium
ghostscript (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: ghostscript

In Lucid 10.04 alpha3 when trying to print to Epson R220 printer this bug appears.
Amd athlon 64 with 32 bit install. 1gb ram nvidea graphics card.

ProblemType: Crash
Architecture: i386
CrashCounter: 1
CupsErrorLog:
 E [08/Mar/2010:16:33:40 +0000] Unable to remove temporary file "/var/spool/cups/tmp/.hplip" - Is a directory
 E [08/Mar/2010:16:37:03 +0000] cupsdReadClient: 15 IPP Read Error!
 E [08/Mar/2010:16:58:54 +0000] Unable to remove temporary file "/var/spool/cups/tmp/.hplip" - Is a directory
Date: Mon Mar 8 16:37:13 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/bin/gs
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20100113)
Lpstat: device for Stylus-Photo-R220: usb://EPSON/Stylus%20Photo%20R220
MachineType: Dell Inc Dimension C521
NonfreeKernelModules: nvidia
Package: ghostscript 8.71.dfsg.1-0ubuntu2
Papersize: a4
PpdFiles: Stylus-Photo-R220: Epson Stylus Photo R220 - CUPS+Gutenprint v5.2.5
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-15-generic root=UUID=58b5d038-f1d6-4d92-b5ed-38f55b0b5728 ro quiet splash
ProcCmdline: /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts -sMediaClass=Standard -sMediaType=Plain -r720x360 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -dcupsRowFeed=5 -scupsPageSizeName=A4 -c -f -_
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SegvAnalysis:
 Segfault happened at: 0x1029022: mov %al,(%edx)
 PC (0x01029022) ok
 source "%al" ok
 destination "(%edx)" (0x000045b3) not located in a known VMA region (needed writable region)!
SegvReason: writing NULL VMA
Signal: 11
SourcePackage: ghostscript
StacktraceTop:
 ?? () from /usr/lib/libgs.so.8
 ?? () from /usr/lib/libgs.so.8
 ?? () from /usr/lib/libgs.so.8
 ?? () from /usr/lib/libgs.so.8
 ?? () from /usr/lib/libgs.so.8
Title: gs crashed with SIGSEGV
Uname: Linux 2.6.32-15-generic i686
UserGroups:

dmi.bios.date: 04/07/2007
dmi.bios.vendor: Dell Inc
dmi.bios.version: 1.1.6
dmi.board.name: 0HY175
dmi.board.vendor: Dell Inc
dmi.board.version: A03
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc
dmi.modalias: dmi:bvnDellInc:bvr1.1.6:bd04/07/2007:svnDellInc:pnDimensionC521:pvr:rvnDellInc:rn0HY175:rvrA03:cvnDellInc:ct3:cvr:
dmi.product.name: Dimension C521
dmi.sys.vendor: Dell Inc

Related branches

A Munro (awamunro) wrote :
visibility: private → public

StacktraceTop:
 mem_true24_fill_rectangle (dev=0x95d5a4c, x=5948, y=0,
 clip_fill_rectangle (dev=0xbfc7c750,
 clip_fill_rectangle (dev=0x96eae38, x=5948,
 gx_dc_pure_fill_rectangle (pdevc=0x9d35cec, x=5948, y=0,
 image_render_color (penum_orig=0x9d34694,

Changed in ghostscript (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Till Kamppeter (till-kamppeter) wrote :

Can you do a complete update of your system to today's state and try again? Yesterday I have uploaded a new ghostscript package (8.71.dfsg.1-0ubuntu3) with several fixes which could affect this bug. Please try.

Changed in ghostscript (Ubuntu):
status: New → Incomplete
A Munro (awamunro) wrote :

Did update as requested the bug still appears. Nothing printed

Till Kamppeter (till-kamppeter) wrote :

Does printing generally not work for you or are there only certaibn applications or files which do not print due to this problem. Please attach the file(s) which you are not able to print.

A Munro (awamunro) wrote :

It appears that some applications work and others don't.
The file AlistairSig (attached) fails from Gedit,
The File EntryConditions.pdf fails from Document Viewer 2.29.91
However files from Open Office Word Processor print correctly.
The file troubleshoot was generated when the print failed.

Till Kamppeter (till-kamppeter) wrote :

Can you attach your file /etc/cups/cupsd.conf and also an error_log of a failed job (as described on https://wiki.ubuntu.com/DebuggingPrintingProblems, section "CUPS error_log".

A Munro (awamunro) wrote :

Hello Till,
I should have noticed that after the updates the other day I tried without a restart. After the restart and I was checking for applications that failed to print I did not immediately recognise that the GS crash does not now occur. However printing still fails with some apps as above. The file troubleshoot.txt attached in my previous post was the CUPS error debug log. Do you now wish another one or shall I report a new bug for CUPS?

The troubleshoot.txt is a real troubleshoot.txt and not an error_log. The error_log snippet in it does not contain any job and so it is not usable. Please attach /etc/cups/cupsd.conf and also the error_log as I asked you for as two separate uncompressed files (then it is easier for me to look into them directly out of the browser).

For me Ghostscript sometimes crashed without segfault when running print jobs with your printer model selection and your files. So probably you are still suffering the same problem.

I can reproduce the crash without CUPS. To do so, I print your attached PDF file into a PDF file out of evince (evince re-renders the PDF, it does not pass it through) and then I run following command line (this is ONE command line):

cat ~/ghostscript/gpl/testfiles/EntryConditions-evince.pdf | PPD=/etc/cups/ppd/R220.ppd RIP_MAX_CACHE=1g /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts -sMediaClass=Standard -sMediaType=Plain -r720x360 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -dcupsRowFeed=5 -scupsPageSizeName=A4 -c -f -_ > out.raster 2>log

Using a smaller RIP_MAX_CACHE the segfault disappears:

cat ~/ghostscript/gpl/testfiles/EntryConditions-evince.pdf | PPD=/etc/cups/ppd/R220.ppd RIP_MAX_CACHE=64m /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts -sMediaClass=Standard -sMediaType=Plain -r720x360 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -dcupsRowFeed=5 -scupsPageSizeName=A4 -c -f -_ > out.raster 2>log

So try

cupsctl RIPCache=64m

Note that this is not a perfect solutions, other files segfault with small RIPCache and work with big RIPCache, as the attached file.

Use this evince-rerendered file for testing on the command line.

For anyone who also wants to test, here is the PPD file.

A Munro (awamunro) wrote :

OK here is the cupsd.conf file

A Munro (awamunro) wrote :

I am afraid a lot of this is beyond me but here is the cups error log

Changed in gs-gpl:
status: Unknown → Confirmed

Please try

cupsctl RIPCache=64m

or

cupsctl RIPCache=8m

Can you print after having given one of these commands?

A Munro (awamunro) wrote :

Issued cupsctl RIPCache=64m then tried printing.
The file AlistairSig prints OK from Gedit,
The File EntryConditions.pdf prints OK from evince.
The file CityMap-evince.pdf prints the menus etc but not the actual map and printing stops with an error. Error log attached.

This way you get at least your files printed, CityMap-evince.pdf seems to be another problem.

Changed in ghostscript (Ubuntu):
status: Incomplete → In Progress
Changed in ghostscript (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 8.71.dfsg.1-0ubuntu4

---------------
ghostscript (8.71.dfsg.1-0ubuntu4) lucid; urgency=low

  * debian/patches/cups-raster-error-out-without-segfault-and-force-banding.dpatch:
    Make the "cups" output device (CUPS Raster) error out correctly without
    causing segfaults and also force banding mode as some PDFs do not render
    otherwise (LP: #534525).
 -- Till Kamppeter <email address hidden> Tue, 23 Mar 2010 10:22:23 +0100

Changed in ghostscript (Ubuntu):
status: Fix Committed → Fix Released
Changed in gs-gpl:
status: Confirmed → Fix Released
Changed in gs-gpl:
importance: Unknown → Medium
To post a comment you must log in.