usb printer backend crashes

Bug #887094 reported by Aurimas Fišeras
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Undecided
Unassigned
Oneiric
Fix Released
Undecided
Unassigned

Bug Description

This problem is probably the same as #793244.

Started having crashes after updating to Oneiric on 2 computers with Samsung ML-2015 printers.
cups 1.5.0-8ubuntu4

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cups 1.5.0-8ubuntu4
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Mon Nov 7 14:15:13 2011
Lpstat:
 device for BIRCH_BP-846M: usb://BIRCH/BP-846M+
 device for Samsung_ML-2010: usb://Samsung/ML-2010
Lsusb:
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 006: ID 04e8:326c Samsung Electronics Co., Ltd ML-2010P Mono Laser Printer
 Bus 001 Device 003: ID 1203:0152 TSC Auto ID Technology Co., Ltd
MachineType: Hewlett-Packard HP Vectra
Papersize: letter
PpdFiles:
 Samsung_ML-2010: Generic text-only printer
 BIRCH_BP-846M: Generic text-only printer
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic root=UUID=8bffe6fd-56b5-46d1-b332-ba7f756f4244 ro quiet splash acpi=force vt.handoff=7
SourcePackage: cups
UpgradeStatus: Upgraded to oneiric on 2011-11-02 (4 days ago)
dmi.bios.date: 11/23/99
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: HZ.01.10US
dmi.board.name: HP Holmes System Board
dmi.board.vendor: Hewlett-Packard
dmi.board.version: D4066-60001
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 3
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvrHZ.01.10US:bd11/23/99:svnHewlett-Packard:pnHPVectra:pvrVLi8:rvnHewlett-Packard:rnHPHolmesSystemBoard:rvrD4066-60001:cvnHewlett-Packard:ct3:cvrN/A:
dmi.product.name: HP Vectra
dmi.product.version: VLi8
dmi.sys.vendor: Hewlett-Packard
mtime.conffile..etc.cups.cupsd.conf: 2011-10-25T14:38:47.238057

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :
Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

I tried to extract some useful information about the crash from /var/crash/_usr_lib_cups_backend_usb.0.crash, but all apport tools fail to do anything useful (can't detect a package, etc.).

Probably because cups package contains /usr/lib/cups/backend-available/usb
But crashing executable is /usr/lib/cups/backend/usb. A hard link to /usr/lib/cups/backend-available/usb.

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Downgraded cups to 1.5.0-8ubuntu3. Crashes disappeared, but then bug #872483 reappears.

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

Can you try the new CUPS package in my PPA (https://launchpad.net/~till-kamppeter/+archive/ppa)? Simply follow the instructions under "Adding this PPA to your system" and then update your Oneiric system.

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Upgraded CUPS from your PPA on 3 (2 experience this bug) different computers.
Printing works (no bug #872483) with Samsung ML-2015, Samsung ML-2525.

Syslog is no longer spammed with:
Nov 10 11:06:28 siavad3 kernel: [580256.776089] usb 1-1: reset full speed USB device number 16 using uhci_hcd
Nov 10 11:07:42 siavad3 kernel: [580330.460163] usb 1-1: reset full speed USB device number 16 using uhci_hcd
Nov 10 11:09:02 siavad3 kernel: [580410.280094] usb 1-1: reset full speed USB device number 16 using uhci_hcd

However, crash still happens, one computer with ML-2015 just had:
Nov 10 14:45:25 siavad3 kernel: [593393.260612] usb[32694]: segfault at bff65000 ip 00935423 sp bff61d28 error 4 in libc-2.13.so[8be000+176000]

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

Aurimas, so the new fix definitely fixes bug 872483 but does not fix this bug?

It seems that the crash is completely independent of this newest fix and the previous fix then?

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Yes, new fix fixes bug 872483, but not the crash.

I also think that crash is independent of both fixes.

It is probably the same crash as in bug 793244, that was reported for cups 1.4.3-1ubuntu1.3. Just, for some reason, we didn't experience it neither in Maverick, nor Natty.

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

Can you clone the print queue with which you got the segfault of the usb backend with commands like

cupsctl FileDevice=yes
lpadmin -p test -E -v file:/tmp/printout -P /etc/cups/ppd/<name of original queue>.ppd

Now send the print job which caused the segfault to the queue "test". After that find the device URI of your original print queue with "lpstat -v") and run

sudo -s
apt-get install cups-dbg
ulimit -c unlimited
DEVICE_URI=<device URI of the original print queue> /usr/lib/cups/backend-available/usb 1 1 1 1 '' < /tmp/printout

If the USB backend crashes, you get a file named core. Run

gdb -c core /usr/lib/cups/backend-available/usb

and when you get a prompt, run

bt

and post the output here.

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Unfortunately, usb backend doesn't crash reliably. If I retry the job that crashed usb backend the first time, it prints successfully the second time.

It seems that it is not the print data that crashes usb backend, but some other usb or printer related event.

I can upload a .crash file from /var/crash that appears there after the crash if it is useful?

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

Please upload the .crash file, it usually contains the core of the crash.

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

.crash file from the latest crash.

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

Aurimas, thanks for the .crash file. I could locate the cause of the crash and it is indeed independent of my patches. I am preparing a new PPA package now where the crash should not occur.

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

Corrected package (1.5.0-8ubuntu5~ppa2) uploaded to my PPA. As soon as it gets available for download, please test it.

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Thanks. I'll update the same 3 computers as soon, as I can get to them (in about 13 h).

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

I've been using 1.5.0-8ubuntu5~ppa2 package on 3 computers for past 8 hours.

More than 150 jobs were printed successfully, no crashes or other problems so far.

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

Aurimas, thank you very much. I think then I have fixed it. So I will apply the patches to precise and to a new CUPS SRU.

Changed in cups (Ubuntu):
status: Triaged → In Progress
Changed in cups (Ubuntu Oneiric):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.5.0-11

---------------
cups (1.5.0-11) unstable; urgency=low

  [ Till Kamppeter ]
  * debian/patches/usb-backend-gracefully-fail-on-more-cases-of-bad-device-id.patch:
    When reading out the device ID check also for too short lengths of the
    device ID and also in this case try to change the byte order of the length
    bytes and fail if the device ID lenght is still too short (LP: #887094).
  * debian/patches/usb-backend-skip-set-configuration-set-interface.patch:
    Avoid unneeded SET_CONFIGURATION and SET_INTERFACE requests after the
    printer has already been configured. This often leads to subsequent jobs
    coming out as garbage or not at all (CUPS STR #3965, LP: #872483).
  * debian/patches/usb-backend-reset-printer-before-printing.patch: Removed,
    as we are using the less invasive approach of CUPS STR #3965 now.
    This also removes the Linux specific #include, causing FTBFS on non-Linux
    platforms. (Closes: #647666)
  * debian/cups.postinst: Allow PPD updater trigger files in
    /usr/share/cups/ppd-updaters/ also be named
    printer-driver-<driver>.ppd-updater and not only <driver> or
    <driver>.ppd-updater. This makes it easier to provide these
    files in the printer driver packages when we rename all binary packages
    of printer drivers to "printer-driver-<driver>".

  [ Martin-Éric Racine ]
  * debian/control:
    + Added the Homepage field.
    + Cleaned up duplicate Build-Depends.
  * Removed |libheimdal-dev alternative from Build-Depends (Closes: #648105)
 -- Martin Pitt <email address hidden> Fri, 11 Nov 2011 15:48:39 +0100

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

Uploaded CUPS package with the fix for this bug and a new fix for bug 872483 to -proposed. As soon as the package is approved for testing we will post another comment with further instructions. Please test then and tell us whether the update fixes your problem, too. A debdiff of the changes is attached.

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

Bug reported upstream as

http://www.cups.org/str.php?L3978

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

Besides this bug, the SRU will also fix bug 872483, bug 883169, and perhaps bug 564917 and bug 793244. In addition, people who still have problems with detection of their printers after the proposed kernel update in bug 872711 will probably get their problem fixed with this CUPS SRU. Please make sure you have booted the proposed kernel (3.0.0-13) from bug 872711 before testing the CUPS SRU for this bug.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Aurimas, or anyone else affected,

Accepted cups into oneiric-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!

Changed in cups (Ubuntu Oneiric):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Shanekpiper (shanekpiper) wrote :

Just to add to the mix, at work I use my Ubuntu 11.10 machine for receiving emails as we get thousands a day and all of these need printing for a paper, trail. The printer that is use is HP Laser Jet 1320, which is shared over the network via Windows share via SAMBA, the printer is connected to the windows xp machine via, USB. Does this bug still apply in my configuration.

The problems I have is some emails print out ok where others all of a sudden start to print the content with spaces:

Eg.

H e l l o m y n a m e i s S h a n e

and its extremely annoying and is becoming increasingly unbearable to work around my QC manager. I have set up the drives as generic PCL 5e, and have tried others too. The problem seems to go away for a little while when I restart Ubuntu. Though I should not have to do this being ubuntu.

Sorry I am tagging on this bug but I feel it is connected some how.

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

Shanekpiper, this bug concerns only environments where the printer is directly connected to the USB of the Ubuntu Oneiric (11.10) box. So your problem is a different bug.

Revision history for this message
Shanekpiper (shanekpiper) wrote :

Even when the printer was connected via USB to my ubuntu machine I had the same issue. The printer is required by the windows machine hence the reason why its connected directly and not to my ubuntu 11.10 computer.

I have posted another bug which relates to networked printers too, here https://bugs.launchpad.net/ubuntu/+source/cups/+bug/890451

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Using cups packages from oneiric-proposed since Monday morning. No crashes, all jobs are printed fine.

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

Aurimas, thank you very much for your testing. I have marked the SRU as verified now.

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

This bug was fixed in the package cups - 1.5.0-8ubuntu5

---------------
cups (1.5.0-8ubuntu5) oneiric-proposed; urgency=low

  * debian/patches/usb-backend-gracefully-fail-on-more-cases-of-bad-device-id.patch:
    When reading out the device ID check also for too short lengths of the
    device ID and also in this case try to chjange the byte order of the length
    bytes and fail if the device ID lenght is still too short (LP: #887094).
  * debian/patches/usb-backend-skip-set-configuration-set-interface.patch:
    Avoid unneeded SET_CONFIGURATION and SET_INTERFACE requests after the
    printer has already been configured. This often leads to subsequent jobs
    coming out as garbage or not at all.
  * debian/patches/usb-backend-reset-printer-before-printing.patch: Removed,
    as we are trying the less invasive approach of CUPS STR #3965.
 -- Till Kamppeter <email address hidden> Fri, 11 Nov 2011 16:01:43 +0100

Changed in cups (Ubuntu Oneiric):
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.