No printing at all possible, hpijs of HPLIP 2.7.12 simply segfaults

Bug #182658 reported by Till Kamppeter
2
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
High
Unassigned

Bug Description

I have an HP PhotoSmart Pro B9100 connected to my Ubuntu Hardy box via USB and HPLIP 2.7.12 installed on an amd64 system.

I am using the PPD file for the HP PhotoSmart B8300 and no printing at all is possible.

foomatic-rip generates the following Ghostscript command line, which causes hpijs to segfault:

till@till-laptop:~/ubuntu/hplip/svn/pkg-hpijs/hplip/trunk$ cat /usr/share/cups/data/testprint.ps | gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="deskjet 5600" -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dDuplex=false -r600 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2,PS:MediaPosition=7 -dIjsUseOutputFD -sOutputFile=- - > x*** glibc detected *** hpijs: double free or corruption (out): 0x000000000068d080 ***
======= Backtrace: =========
/lib/libc.so.6[0x2b9fd147001a]
/lib/libc.so.6(cfree+0x8c)[0x2b9fd1473bac]
hpijs[0x42ef9a]
/lib/libc.so.6(__libc_start_main+0xf4)[0x2b9fd141a1c4]
hpijs(__gxx_personality_v0+0xd1)[0x401f19]
======= Memory map: ========
00400000-0044f000 r-xp 00000000 08:05 2232466 /usr/bin/hpijs
0064f000-00672000 rw-p 0004f000 08:05 2232466 /usr/bin/hpijs
00672000-00694000 rw-p 00672000 00:00 0 [heap]
2b9fcf25e000-2b9fcf27b000 r-xp 00000000 08:05 344065 /lib/ld-2.7.so
2b9fcf27b000-2b9fcf27e000 rw-p 2b9fcf27b000 00:00 0
2b9fcf47b000-2b9fcf47d000 rw-p 0001d000 08:05 344065 /lib/ld-2.7.so
2b9fcf47d000-2b9fcf4a2000 r-xp 00000000 08:05 2228657 /usr/lib/libhpip.so.0.0.1
2b9fcf4a2000-2b9fcf6a1000 ---p 00025000 08:05 2228657 /usr/lib/libhpip.so.0.0.1
2b9fcf6a1000-2b9fcf6a3000 rw-p 00024000 08:05 2228657 /usr/lib/libhpip.so.0.0.1
2b9fcf6a3000-2b9fcf6a4000 rw-p 2b9fcf6a3000 00:00 0
2b9fcf6a4000-2b9fcf6b9000 r-xp 00000000 08:05 2232467 /usr/lib/libhpmud.so.0.0.1
2b9fcf6b9000-2b9fcf8b8000 ---p 00015000 08:05 2232467 /usr/lib/libhpmud.so.0.0.1
2b9fcf8b8000-2b9fcf8b9000 rw-p 00014000 08:05 2232467 /usr/lib/libhpmud.so.0.0.1
2b9fcf8b9000-2b9fcf986000 rw-p 2b9fcf8b9000 00:00 0
2b9fcf986000-2b9fcf98b000 r-xp 00000000 08:05 2231148 /usr/lib/libsane.so.1.0.18
2b9fcf98b000-2b9fcfb8b000 ---p 00005000 08:05 2231148 /usr/lib/libsane.so.1.0.18
2b9fcfb8b000-2b9fcfb8c000 rw-p 00005000 08:05 2231148 /usr/lib/libsane.so.1.0.18
2b9fcfb8c000-2b9fcfb8d000 rw-p 2b9fcfb8c000 00:00 0
2b9fcfb8d000-2b9fcfb94000 r-xp 00000000 08:05 426064 /lib/libusb-0.1.so.4.4.4
2b9fcfb94000-2b9fcfd93000 ---p 00007000 08:05 426064 /lib/libusb-0.1.so.4.4.4
2b9fcfd93000-2b9fcfd95000 rw-p 00006000 08:05 426064 /lib/libusb-0.1.so.4.4.4
2b9fcfd95000-2b9fcfdcb000 r-xp 00000000 08:05 2229878 /usr/lib/libcups.so.2
2b9fcfdcb000-2b9fcffca000 ---p 00036000 08:05 2229878 /usr/lib/libcups.so.2
2b9fcffca000-2b9fcffcd000 rw-p 00035000 08:05 2229878 /usr/lib/libcups.so.2
2b9fcffcd000-2b9fd0063000 r-xp 00000000 08:05 2229704 /usr/lib/libnetsnmp.so.15.1.0
2b9fd0063000-2b9fd0263000 ---p 00096000 08:05 2229704 /usr/lib/libnetsnmp.so.15.1.0
2b9fd0263000-2b9fd0267000 rw-p 00096000 08:05 2229704 /usr/lib/libnetsnmp.so.15.1.0
2b9fd0267000-2b9fd029c000 rw-p 2b9fd0267000 00:00 0
2b9fd029c000-2b9fd03f6000 r-xp 00000000 08:05 2230067 /usr/lib/libcrypto.so.0.9.8
2b9fd03f6000-2b9fd05f6000 ---p 0015a000 08:05 2230067 /usr/lib/libcrypto.so.0.9.8
2b9fd05f6000-2b9fd0619000 rw-p 0015a000 08:05 2230067 /usr/lib/libcrypto.so.0.9.8
2b9fd0619000-2b9fd061c000 rw-p 2b9fd0619000 00:00 0
2b9fd061c000-2b9fd061e000 r-xp 00000000 08:05 445191 /lib/libdl-2.7.so
2b9fd061e000-2b9fd081e000 ---p 00002000 08:05 445191 /lib/libdl-2.7.so
2b9fd081e000-2b9fd0820000 rw-p 00002000 08:05 445191 /lib/libdl-2.7.so
2b9fd0820000-2b9fd0842000 r-xp 00000000 08:05 2230028 /usr/lib/libjpeg.so.62.0.0
2b9fd0842000-2b9fd0a42000 ---p 00022000 08:05 2230028 /usr/lib/libjpeg.so.62.0.0
2b9fd0a42000-2b9fd0a43000 rw-p 00022000 08:05 2230028 /usr/lib/libjpeg.so.62.0.0
2b9fd0a43000-2b9fd0a44000 rw-p 2b9fd0a43000 00:00 0
2b9fd0a44000-2b9fd0a5a000 r-xp 00000000 08:05 445202 /lib/libpthread-2.7.so
2b9fd0a5a000-2b9fd0c5a000 ---p 00016000 08:05 445202 /lib/libpthread-2.7.so
2b9fd0c5a000-2b9fd0c5c000 rw-p 00016000 08:05 445202 Aborted (core dumped)
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
till@till-laptop:~/ubuntu/hplip/svn/pkg-hpijs/hplip/trunk$ hpijs -h

Hewlett-Packard Co. Inkjet Server 2.7.12
Copyright (c) 2001-2004, Hewlett-Packard Co.
till@till-laptop:~/ubuntu/hplip/svn/pkg-hpijs/hplip/trunk$

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

Additional remark: The problem occurs on both i386 and amd64 platforms.

Revision history for this message
Tim Waugh (twaugh) wrote :

Looks like this is due to an insufficient malloc in compression.c. This patch fixes it for me:

http://cvs.fedoraproject.org/viewcvs/devel/hplip/hplip-alloc.patch?rev=1.1&view=auto

but obviously the maths for the worst case allocation needed by the compression need to be worked out properly by someone who knows the algorithm.

Are HP watching this bug?

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

I'll be sure the HPLIP team looks at this.

Aaron

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

I have applied the patch of Tim Waugh's posting and this makes the command line of the initial posting working correctly. This command line works also if feeding in a PostScript file with high-resolution photos, but printing through a CUPS queue still leads to an immediate crash of Ghostscript. So there is probably also another bug. For end users printing is still impossible.

Here is the output in error_log:

----------
D [28/Jan/2008:12:18:11 +0000] [Job 111] renderer PID kid4=24640
D [28/Jan/2008:12:18:11 +0000] [Job 111] renderer command: gs -q -dBATCH -dPARAN
OIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="
HEWLETT-PACKARD" -sDeviceModel="deskjet 5600" -dDEVICEWIDTHPOINTS=595 -dDEVICEHE
IGHTPOINTS=842 -dDuplex=false -r1200 -sIjsParams=Quality:Quality=3,Quality:Color
Mode=2,Quality:MediaType=2,Quality:PenSet=2,PS:MediaPosition=7 -dIjsUseOutputFD
-sOutputFile=- -
D [28/Jan/2008:12:18:13 +0000] [Job 111] foomatic-gswrapper: gs '-sstdout=%stderr' '-dBATCH' '-dPARANOIDSAFER' '-dQUIET' '-dNOPAUSE' '-sDEVICE=ijs' '-sIjsServer=hpijs' '-sDeviceManufacturer=HEWLETT-PACKARD' '-sDeviceModel=deskjet 5600' '-dDEVICEWIDTHPOINTS=595' '-dDEVICEHEIGHTPOINTS=842' '-dDuplex=false' '-r1200' '-sIjsParams=Quality:Quality=3,Quality:ColorMode=2,Quality:MediaType=2,Quality:PenSet=2,PS:MediaPosition=7' '-dIjsUseOutputFD' '-sOutputFile=%stdout' '-_'
D [28/Jan/2008:12:18:14 +0000] [Job 111] unable to open PrintContext object err=2
D [28/Jan/2008:12:18:14 +0000] [Job 111] GPL Ghostscript 8.61: Can't start ijs server "hpijs"
D [28/Jan/2008:12:18:14 +0000] [Job 111] **** Unable to open the initial device, quitting.
D [28/Jan/2008:12:18:14 +0000] [Job 111] renderer return value: 1
D [28/Jan/2008:12:18:14 +0000] [Job 111] renderer received signal: 1
D [28/Jan/2008:12:18:14 +0000] [Job 111] Process dying with "Possible error on renderer command line or PostScript error. Check options.", exit stat: 3
----------

The problem is this "unable to open PrintContext object err=2".

Changed in hplip:
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Fixed in hplip 2.8.2.

A

Changed in hplip:
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.