pdftopdf crashed with SIGSEGV

Bug #980673 reported by Tadej Murovec
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cups-filters (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Unassigned

Bug Description

The error occures when I create a print job from terminal with number-up parameter greater than 1. Pdftopdf filter crashes with segmentation fault.

command: lp -o number-up=2 fails_to_print_multiple_pps.pdf
cups_error_log: E [13/Apr/2012:11:38:53 +0200] PID 2344 (/usr/lib/cups/filter/pdftopdf) crashed on signal 11.

Same file is printer normally with number-up parameter set to 1.
However, when I run the pdftopdf filter manually with number-up parameter set to 1 it crashes with segmentation fault.

command: /usr/lib/cups/filter/pdftopdf 1234 test test 1 "number-up=1" fails_to_print_multiple_pps.pdf
stdout: Segmentation fault (core dumped)

I've also tried to run pdftopdf filter on Debian 6.0 and CUPS 1.4.4 with the same file and the PDF is generated successfully.

lsb_release -rd

Description: Ubuntu precise (development branch)
Release: 12.04

apt-cache policy cups-filters

cups-filters:
  Installed: 1.0.15-0bzr1
  Candidate: 1.0.15-0bzr1
  Version table:
 *** 1.0.15-0bzr1 0
        500 http://si.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: cups-filters 1.0.15-0bzr1
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic-pae 3.2.9
Uname: Linux 3.2.0-18-generic-pae i686
ApportVersion: 2.0.1-0ubuntu2
Architecture: i386
CrashCounter: 1
CurrentDmesg:
 [ 39.584018] eth0: no IPv6 routers present
 [ 267.451672] show_signal_msg: 21 callbacks suppressed
 [ 267.451679] pdftopdf[2189]: segfault at 38 ip b773361a sp bff6a450 error 6 in pdftopdf[b772f000+25000]
 [ 375.114726] pdftopdf[2344]: segfault at 151 ip b76f4c13 sp bfbca940 error 4 in pdftopdf[b76eb000+25000]
Date: Fri Apr 13 11:38:52 2012
ExecutablePath: /usr/lib/cups/filter/pdftopdf
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120306)
Lpstat:
 device for 8100: socket://192.168.1.130
 device for Enterprise: socket://192.168.1.115
MachineType: Dell Inc. OptiPlex GX520
Papersize: letter
PpdFiles:
 Enterprise: HP Officejet Pro 8000 a809, hpcups 3.12.2
 8100: HP Officejet Pro 8100, hpcups 3.12.2
ProcCmdline: Enterprise 60 cloudomat fails_to_print_multiple_pps.pdf 1 finishings=3\ number-up=2\ job-uuid=urn:uuid:551712b5-af5b-358d-6843-b81661913843\ job-originating-host-name=localhost\ time-at-creation=1334309932\ time-at-processing=1334309932\ AP_D_InputSlot= /var/spool/cups/d00060-001
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-18-generic-pae root=UUID=e511bb43-ca70-4f60-aced-5d06759835da ro quiet splash vt.handoff=7
SegvAnalysis:
 Segfault happened at: 0xb76f4c13: mov 0x10(%eax),%edx
 PC (0xb76f4c13) ok
 source "0x10(%eax)" (0x00000151) not located in a known VMA region (needed readable region)!
 destination "%edx" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: cups-filters
StacktraceTop:
 ?? ()
 ?? ()
 ?? ()
 ?? ()
 ?? ()
Title: pdftopdf crashed with SIGSEGV
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

dmi.bios.date: 08/05/2005
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A03
dmi.board.name: 0C8810
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 15
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA03:bd08/05/2005:svnDellInc.:pnOptiPlexGX520:pvr:rvnDellInc.:rn0C8810:rvr:cvnDellInc.:ct15:cvr:
dmi.product.name: OptiPlex GX520
dmi.sys.vendor: Dell Inc.

Revision history for this message
Tadej Murovec (tadej-murovec) wrote :
visibility: private → public
Revision history for this message
Tadej Murovec (tadej-murovec) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 P2PObject::outputRef (this=0x141, str=0xb8092c30) at P2PObject.cxx:116
 P2PResources::output (this=0xb80a5008, str=0xb8092c30) at P2PResources.cxx:138
 P2PPage::outputSelf (this=0xb80a4e38, str=0xb8092c30, tree=0xb8071e50, copiedObj=0x0) at P2PPage.cxx:347
 P2PPage::output (this=0xb80a4e38, str=0xb8092c30, tree=0xb8071e50, copiedObj=0x0) at P2PPage.cxx:506
 P2PPageTree::output (this=0xb8071e50, str=0xb8092c30, copies=1, collate=false) at P2PPageTree.cxx:203

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in cups-filters (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Changed in cups-filters (Ubuntu):
importance: Medium → Critical
milestone: none → ubuntu-12.04
status: New → Confirmed
Changed in cups-filters (Ubuntu):
status: Confirmed → In Progress
Changed in cups-filters (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.16-0bzr1

---------------
cups-filters (1.0.16-0bzr1) precise; urgency=low

  * New upstream release
     - pdftopdf: Fixed segmentation faults when using N-up with certain PDF
       files (LP: #980673) and when calling pdftopdf manually without
       specifyting a PPD file.
 -- Till Kamppeter <email address hidden> Mon, 16 Apr 2012 11:51:11 +0200

Changed in cups-filters (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Tadej Murovec (tadej-murovec) wrote :

Hi Till,

thanks for the provided patch!

It resolves the segmentation fault when printing full page range document, but fails with the same segmentation fault error when I manually specify the page range.

command: lp -o page-ranges=1-2 -o number-up=4 fails_to_print_multiple_pps.pdf
cups_error_log: E [19/Apr/2012:09:49:08 +0200] PID 16943 (/usr/lib/cups/filter/pdftopdf) crashed on signal 11.

I've also tested directly with pdftopdf tool and the output;

command: /usr/lib/cups/filter/pdftopdf 1234 test test 2 "number-up=2 page-ranges=1-2" fails_to_print_multiple_pps.pdf > pdftopdf_output_with_number_up_and_page_ranges.pdf
stdout: Segmentation fault (core dumped)

I've attached the pdftopdf pdf output below.

Changed in cups-filters (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have forwarded your report to the original author of pdftopdf. He usually fixes bugs quickly. As soon as I get the fix I will issue an update for Precise.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I got a patch with a fix for the problem. I will prepare an update for the upcoming Precise.

Changed in cups-filters (Ubuntu):
status: Incomplete → Triaged
Changed in cups-filters (Ubuntu):
milestone: ubuntu-12.04 → precise-updates
Changed in cups-filters (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded the fixed package to the precise-proposed repository. It is waiting for approval now. As soon as the package gets approved, another comment with instructions to test it will appear here. Please test the package then and tell us whether it solves your problem.

debdiff of the changes is attached.

Changed in cups-filters (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Tadej, 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
Revision history for this message
Martin Pitt (pitti) wrote :

Note, if this can be tested today, there is a good chance of getting this into precise final instead of a post-release update.

Changed in cups-filters (Ubuntu Precise):
importance: Critical → High
Revision history for this message
Tadej Murovec (tadej-murovec) wrote :

I've tested the laster pdftopdf (version 1.0.17) and I'm able report that the number-up printing is now working correctly with or without -o page-ranges parameter.

Good stuff!

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Thank you for testing. The fix will get added to the 0-day SRUs (updates available at release day).

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.17-0bzr0.1

---------------
cups-filters (1.0.17-0bzr0.1) precise-proposed; urgency=low

  * New upstream release
     - pdftopdf: Fixed segmentation fault when printing selected pages
       ("page-ranges" option, LP: #980673).
 -- Till Kamppeter <email address hidden> Fri, 20 Apr 2012 14:39:03 +0200

Changed in cups-filters (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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