pdftops crashed with SIGABRT in __libc_message()

Bug #982675 reported by Lorenco Trichardt on 2012-04-15
60
This bug affects 10 people
Affects Status Importance Assigned to Milestone
cups-filters (Ubuntu)
High
Unassigned
Precise
High
Unassigned

Bug Description

Printing document twice in a row.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: cups-filters 1.0.15-0bzr1
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu3
Architecture: amd64
Date: Mon Apr 16 07:27:45 2012
ExecutablePath: /usr/lib/cups/filter/pdftops
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120301)
Lpstat:
 device for IBM-Infoprint-Color-1764: socket://9.190.125.22:9100
 device for Officejet_6500_E710a-f: hp:/net/Officejet_6500_E710a-f?zc=hpcolour
 device for Officejet_6500_E710a-f_fax: hpfax:/net/Officejet_6500_E710a-f?zc=hpcolour
MachineType: LENOVO 4389A97
Papersize: a4
PpdFiles:
 /etc/cups/ppd/IBM-Infoprint-Color-1764.ppd:*NickName: "IBM Infoprint Color 1764 (English)"
 Officejet_6500_E710a-f: HP Officejet 6500 e710a-f, hpcups 3.12.2
 Officejet_6500_E710a-f_fax: HP Fax4 hpcups
ProcCmdline: IBM-Infoprint-Color-1764 4 lorenco Support\ Client\ Quick\ Reference\ Guide\ AUS%092011.pdf\ —\ Support\ Client\ Quick\ Reference\ Guide\ AUS\ 2011.ppt 2 TonerDarkness=PrinterS\ ColorSaver=PrinterS\ BlackBalance=PrinterS\ OutputBin=PrinterS\ Duplex=DuplexNoTumble\ number-up=1\ Collate\ PageSize=A4\ Resolution=4800CQ\ InputSlot=Tray1\ CyanBalance=PrinterS\ MediaColor=PrinterS\ ManualRGBText=PrinterS\ SepSource=PrinterS\ LexContrast=PrinterS\ LexBrightness=PrinterS\ ManualRGBGraphics=PrinterS\ ManualRGBImage=PrinterS\ ManualCMYK=PrinterS\ MediaType=PrinterS\ LexBlankPage=PrinterS\ LexSaturation=PrinterS\ LexLineDetail=PrinterS\ StapleJob=PrinterS\ YellowBalance=PrinterS\ MagentaBalance=PrinterS\ SepPages=PrinterS\ BLW=PrinterS\ Offset=PrinterS\ job-uuid=urn:uuid:03f7e284-696b-3e29-7501-06f1e21cd6ce\ job-originating-host-name=localhost\ time-at-creation=1334532465\ time-at-processing=1334532465
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_AU.UTF-8
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-23-generic root=UUID=4142c181-619c-438a-a3fe-81ace848b406 ro quiet splash vt.handoff=7
Signal: 6
SourcePackage: cups-filters
StacktraceTop:
 raise () from /lib/x86_64-linux-gnu/libc.so.6
 abort () from /lib/x86_64-linux-gnu/libc.so.6
 ?? () from /lib/x86_64-linux-gnu/libc.so.6
 ?? () from /lib/x86_64-linux-gnu/libc.so.6
 _IO_vfscanf () from /lib/x86_64-linux-gnu/libc.so.6
Title: pdftops crashed with SIGABRT in raise()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

dmi.bios.date: 02/24/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 6NET76WW (1.37 )
dmi.board.name: 4389A97
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6NET76WW(1.37):bd02/24/2011:svnLENOVO:pn4389A97:pvrThinkPadW510:rvnLENOVO:rn4389A97:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4389A97
dmi.product.version: ThinkPad W510
dmi.sys.vendor: LENOVO

StacktraceTop:
 __libc_message (do_abort=2, fmt=0x7f509e6cd0d0 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
 malloc_printerr (action=3, str=0x7f509e6cd208 "free(): invalid next size (normal)", ptr=<optimized out>) at malloc.c:5007
 _IO_vfscanf_internal (s=<optimized out>, format=<optimized out>, argptr=0x7fff072e2168, errp=0x0) at vfscanf.c:2938
 _IO_vsscanf (string=0x7fff072e67a0 "4800CQ", format=0x7f509f1c168b "%dx%d", args=0x7fff072e2168) at iovsscanf.c:45
 __sscanf (s=<optimized out>, format=<optimized out>) at sscanf.c:34

Changed in cups-filters (Ubuntu):
importance: Undecided → Medium
summary: - pdftops crashed with SIGABRT in raise()
+ pdftops crashed with SIGABRT in __libc_message()
tags: removed: need-amd64-retrace

Can reproduce now all the time.

This only happens when I print multople copies (2) of the documents.... (any documents)
Prining a single copy works....

visibility: private → public
Till Kamppeter (till-kamppeter) wrote :

Lorenco, can you post the PPD file of your print queue (in /etc/cups/ppd/)? Thanks.

Changed in cups-filters (Ubuntu):
status: New → Incomplete
importance: Medium → High
milestone: none → precise-updates
Till Kamppeter (till-kamppeter) wrote :

Thank you very much.

Unfortunately, I cannot reproduce this bug, even printing 2 copies into a queue using your PPD. I have added a crash guard to the upstream code now.and also some improvements to solve other problems. he new package will appear as an update. I will ask you for testing as soon as it gets available.

Changed in cups-filters (Ubuntu):
status: Incomplete → In Progress
Joachim Schwender (jschwender) wrote :

I can reproduce the bug by sending multiple copies of this document with duplex printing to a Samsung CLX copy machine

Joachim Schwender (jschwender) wrote :

I could reproduce this bug also on my PostScript printer (HP Color LaserJet CM3530 MFP, should occur on all PostScript printers which do internal Collate according to their PPD files) and with this I could find the bug in the pdftops filter. I have fixed it now in the cups-filters package upstream and will make it available as SRU for Precise.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.18-1

---------------
cups-filters (1.0.18-1) unstable; urgency=low

  * New upstream release
     - pdftops: Allow selection whether Ghostscript or Poppler is used
       at runtime, setting the "pdftops-renderer" option to "gs" or
       "pdftops". This way one can switch to Poppler per-queue if there
       are incompatibilities with certain PostScript printers.
     - pdftops: Allow setting an upper limit for the image rendering
       resolution, also at runtime, setting the option
       "pdftops-max-image-resolution-default" to the desired limit in dpi.
       "0" means no limit. Default limit is 1440 dpi. This prevents slow
       processing by the printer if very high resolutions are used or
       if the printing resolution is mis-detected by the pdftops filter.
     - pdftops: Fixed crash by wrong usage of sizeof() function when adding
       "Collate" to the fifth command line argument for the "pstops" CUPS
       filter call (LP: #982675).
     - pdftops: Removed newline from copies value when reading it from
       the "%%PDFTOPDFNumCopies" entry of the incoming PDF file.
     - pdftops: Silenced compiler warning about ignoring the return
       value of the write() function.
     - pdftops: Added a crash guard.
     - pdftops: Start determining the printing resolution with
       cupsRasterInterpretPPD(), this is the most reliable as often
       the choice names of the "Resolution" option are marketing names
       with higher numerical values than the actual resolution. Also
       ignore error exit values of cupsRasterInterpretPPD() as the
       function can error out after having found the resolution.
     - pdftops: If printing resolution is determined by
       cupsRasterInterpretPPD() do not stick on 100 dpi if the
       resolution cannot be determined (LP: #984082).
     - pdftopdf: Fixed segmentation fault when printing selected pages
       ("page-ranges" option, LP: #980673).
 -- Martin Pitt <email address hidden> Wed, 16 May 2012 11:45:03 +0200

Changed in cups-filters (Ubuntu):
status: In Progress → Fix Released

I have uploaded a fixed cups-filters package to precise-proposed now. Please test the package as soon as it gets available for download and give feedback here. This is required to make the new package an official update for Precise. Another comment with testing instructions will get posted here.

A debdiff of the changes is attached.

Changed in cups-filters (Ubuntu Precise):
status: New → Fix Committed
importance: Undecided → High
milestone: none → precise-updates
Changed in cups-filters (Ubuntu):
milestone: precise-updates → quantal-alpha-1

To the SRU team: The relevant changes for the fix are in the file filter/pdftops.c. The file in the debdiff looks very cluttered as there are many lines where only white space (indentation) changed. Attached to this comment is a cleaner diff for this file with white space changes ignored (diff -b), here one especially sees how the conditional compiling for Ghostscript/Poppler is replaced by "if"s so that the Ghostscript/Poppler decision can be made at run time.

Hello Lorenco, or anyone else affected,

Accepted cups-filters into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed

I tested it this morning and could print 3x copies double sided to that printer... good job!

Thanks.

Thank you for testing. I have marked the bug as verified now.

tags: added: verification-done
removed: verification-needed
Joachim Schwender (jschwender) wrote :

we have successfully printed several hundret print-jobs this morning without a single pdftops crash and print output as expected. That looks good, thank you!

Confirmed this bug was affecting us on Xerox Workcentre 7425, and the new package from proposed fixed it.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.18-0ubuntu0.1

---------------
cups-filters (1.0.18-0ubuntu0.1) precise-proposed; urgency=low

  [ Till Kamppeter ]
  * New upstream release
     - pdftops: Allow selection whether Ghostscript or Poppler is used
       at runtime, setting the "pdftops-renderer" option to "gs" or
       "pdftops". This way one can switch to Poppler per-queue if there
       are incompatibilities with certain PostScript printers.
     - pdftops: Allow setting an upper limit for the image rendering
       resolution, also at runtime, setting the option
       "pdftops-max-image-resolution-default" to the desired limit in dpi.
       "0" means no limit.
     - pdftops: Fixed crash by wrong usage of sizeof() function when adding
       "Collate" to the fifth command line argument for the "pstops" CUPS
       filter call (LP: #982675).
     - pdftops: Removed newline from copies value when reading it from
       the "%%PDFTOPDFNumCopies" entry of the incoming PDF file.
     - pdftops: Silenced compiler warning about ignoring the return
       value of the write() function.
     - pdftops: Added a crash guard.
     - pdftops: Start determining the printing resolution with
       cupsRasterInterpretPPD(), this is the most reliable as often
       the choice names of the "Resolution" option are marketing names
       with higher numerical values than the actual resolution. Also
       ignore error exit values of cupsRasterInterpretPPD() as the
       function can error out after having found the resolution
       (LP: #984082).
     - pdftops: If printing resolution is determined by
       cupsRasterInterpretPPD() do not stick on 100 dpi if the
       resolution cannot be determined (LP: #984082).
  * debian/rules: Set default renderer for the pdftops filter to Poppler
    due to many printer's buggy interpreters having problems with GhostScript's
    PostScript and set image rendering resolution limit of the pdftops filter
    to 360 dpi to prevents slow processing by the printer if very high
    resolutions are used or if the printing resolution is mis-detected by the
    pdftops filter (LP: #668800, LP #951627 (comment #30), LP: #998087,
    LP: #992982 (comments #26, #27, #30, #31), LP: #997728, LP: #994477,
    LP: #998087, LP: #978120, LP: #862167).

  [ Didier Raboud ]
  * Drop libtiff5-dev, just use libtiff-dev, this fixes the FTBFS due to
    incompatibility with cups.
 -- Till Kamppeter <email address hidden> Wed, 16 May 2012 11:25:03 +0200

Changed in cups-filters (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.