[Pkg-cups-devel] Bug#612975: cups: gs run by pdftopdf filter gives floating point exception

Sanjoy Mahajan sanjoy at olin.edu
Fri Feb 11 21:21:51 UTC 2011


Package: cups
Version: 1.4.5-2
Severity: normal
File: /usr/lib/cups/filter/pdftopdf

[I'm not sure whether this bug belongs to cups or to ghostscript.]

When I printed the first attached PDF file to my HP Photosmart 2710,
with 

  lp -o fitplot r02-abstraction-symmetry-annotated.pdf

the last two pages printed fine, the third-to-last page came out blank,
and no further pages printed (outputorder=reverse is the default option
for that printer).

The error_log had this line:

D [11/Feb/2011:07:27:36 -0500] PID 2262 (/usr/lib/cups/filter/pdftoraster) stopped with status 1!

The gs command line (also from the error_log) was

/usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts -sMediaType=Automatic -sOutputType=0 -r600x600 -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -dcupsMediaType=-1 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=17 -scupsPageSizeName=Letter -c -f -_

To find more about the error, I ran the original PDF file through a good
approximation of the CUPS filter chain (I didn't take care of all the
environment variables, but I did get the command-line arguments right).
The chain is 

   pdftopdf | pdftoraster | ...

I used this shell script (the "args" variable setting is extracted from
the error_log):

==================== cut here =======================================
#!/bin/sh -xe
args="finishings=3 fitplot number-up=1 outputorder=reverse PageSize=Letter PrintoutMode=High job-uuid=urn:uuid:7a5f7926-dd39-326a-6ecc-1484455f1a8d job-originating-host-name=localhost time-at-creation=1297427155 time-at-processing=1297427155 AP_D_InputSlot="

export PPD=/etc/cups/ppd/psc.ppd
/usr/lib/cups/filter/pdftopdf 1 sanjoy '' 1 "$args" < r02-abstraction-symmetry-annotated.pdf > pdftopdfoutput.pdf
/usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts -sMediaType=Automatic -sOutputType=0 -r600x600 -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -dcupsMediaType=-1 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=17 -scupsPageSizeName=Letter -c -f -_ < pdftopdfoutput.pdf > gs.stdout 2> gs.stderr
==================== cut here =======================================

gs fails with "Floating point exception".  Should I rebuild the gs
package with debugging and get a gdb stacktrace?

The intermediate pdftopdfoutput.pdf file is also attached.  It's
basically the original PDF file with the pages reversed and rescaled to fit
on letter paper (the "-o fitplot").

Running that gs command on the original PDF file (r02....pdf) produced no
complaints.  Although the raster file is enormous (1.2GB)!

-Sanjoy

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.37 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cups depends on:
ii  adduser                 3.112+nmu2       add and remove users and groups
ii  bc                      1.06.95-2        The GNU bc arbitrary precision cal
ii  cups-client             1.4.5-2          Common UNIX Printing System(tm) - 
ii  cups-common             1.4.5-2          Common UNIX Printing System(tm) - 
ii  cups-ppdc               1.4.5-2          Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0]   1.5.38           Debian configuration management sy
ii  ghostscript             8.71~dfsg2-10    The GPL Ghostscript PostScript/PDF
ii  libavahi-client3        0.6.27-3         Avahi client library
ii  libavahi-common3        0.6.27-3         Avahi common library
ii  libc6                   2.11.2-11        Embedded GNU C Library: Shared lib
ii  libcups2                1.4.5-2          Common UNIX Printing System(tm) - 
ii  libcupscgi1             1.4.5-2          Common UNIX Printing System(tm) - 
ii  libcupsdriver1          1.4.5-2          Common UNIX Printing System(tm) - 
ii  libcupsimage2           1.4.5-2          Common UNIX Printing System(tm) - 
ii  libcupsmime1            1.4.5-2          Common UNIX Printing System(tm) - 
ii  libcupsppdc1            1.4.5-2          Common UNIX Printing System(tm) - 
ii  libdbus-1-3             1.4.1-2          simple interprocess messaging syst
ii  libgcc1                 1:4.4.5-10       GCC support library
ii  libgnutls26             2.10.4-2         the GNU TLS library - runtime libr
ii  libgssapi-krb5-2        1.8.3+dfsg-4     MIT Kerberos runtime libraries - k
ii  libijs-0.35             0.35-7           IJS raster image transport protoco
ii  libkrb5-3               1.8.3+dfsg-4     MIT Kerberos runtime libraries
ii  libldap-2.4-2           2.4.23-7         OpenLDAP libraries
ii  libpam0g                1.1.1-6.1        Pluggable Authentication Modules l
ii  libpaper1               1.1.24           library for handling paper charact
ii  libpoppler5             0.12.4-1.2       PDF rendering library
ii  libslp1                 1.2.1-7.8        OpenSLP libraries
ii  libstdc++6              4.4.5-10         The GNU Standard C++ Library v3
ii  libusb-0.1-4            2:0.1.12-17      userspace USB programming library
ii  lsb-base                3.2-27           Linux Standard Base 3.2 init scrip
ii  poppler-utils           0.12.4-1.2       PDF utilitites (based on libpopple
ii  procps                  1:3.2.8-10       /proc file system utilities
ii  ssl-cert                1.0.28           simple debconf wrapper for OpenSSL
ii  ttf-freefont            20090104-7       Freefont Serif, Sans and Mono True
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages cups recommends:
ii  avahi-daemon               0.6.27-3      Avahi mDNS/DNS-SD daemon
ii  cups-driver-gutenprint     5.2.6-1       printer drivers for CUPS
ii  foomatic-filters           4.0.5-6       OpenPrinting printer support - fil
ii  ghostscript-cups           8.71~dfsg2-10 The GPL Ghostscript PostScript/PDF

Versions of packages cups suggests:
ii  cups-bsd                  1.4.5-2        Common UNIX Printing System(tm) - 
ii  cups-pdf                  2.5.0-17       PDF printer for CUPS
ii  foomatic-db               20100804-1     OpenPrinting printer support - dat
ii  hplip                     3.10.6-2       HP Linux Printing and Imaging Syst
ii  smbclient                 2:3.5.6~dfsg-5 command-line SMB/CIFS clients for 
ii  udev                      165-1          /dev/ and hotplug management daemo

-- Configuration Files:
/etc/cups/cupsd.conf changed:
LogLevel debug2
MaxLogSize 0
SystemGroup lpadmin
Listen localhost:631
Listen /var/run/cups/cups.sock
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
DefaultAuthType Basic
<Location />
  Order allow,deny
</Location>
<Location /admin>
  Order allow,deny
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>
<Policy default>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  <Limit Create-Job Print-Job Print-URI>
  AuthType Default
  Order deny,allow
</Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
  AuthType Default
  Require user @SYSTEM
  Order deny,allow
    </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
      </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
      AuthType Default
      Require user @OWNER @SYSTEM
      Order deny,allow
        </Limit>
  <Limit All>
        Order deny,allow
          </Limit>
</Policy>
RIPCache 386462k


-- debconf information:
  cupsys/raw-print: true
  cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp, dnssd

-------------- next part --------------
A non-text attachment was scrubbed...
Name: r02-abstraction-symmetry-annotated.pdf
Type: application/pdf
Size: 454175 bytes
Desc: pdf file that failed to print
URL: <http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20110211/a0df668c/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdftopdfoutput.pdf
Type: application/pdf
Size: 556091 bytes
Desc: output of pdftopdf filter
URL: <http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20110211/a0df668c/attachment-0003.pdf>


More information about the Pkg-cups-devel mailing list