After suspend/hibernate usb printer backend repeatedly crashes

Bug #793244 reported by Bryce Nesbitt
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Binary package hint: cups

Rebooting the machine with the USB printer results in printing joy.

After suspend/hibernate cups reports
idle "/usr/lib/cups/backend/usb" failed

and /var/log/cups/error_log reports:

D [05/Jun/2011:13:02:42 -0700] [Job 71] envp[15]="CUPS_SERVER=/var/run/cups/cups.sock"
D [05/Jun/2011:13:02:42 -0700] [Job 71] envp[20]="PPD=/etc/cups/ppd/HL-2040-series.ppd"
D [05/Jun/2011:13:02:42 -0700] [Job 71] envp[23]="DEVICE_URI=usb://Brother/HL-2040%20series"
D [05/Jun/2011:13:02:42 -0700] [Job 71] envp[24]="PRINTER_INFO=Brother HL-2040 series"
D [05/Jun/2011:13:02:42 -0700] [Job 71] envp[26]="PRINTER=HL-2040-series"
D [05/Jun/2011:13:02:42 -0700] [Job 71] envp[29]="AUTH_U****"
D [05/Jun/2011:13:02:42 -0700] [Job 71] envp[30]="AUTH_P****"
D [05/Jun/2011:13:02:42 -0700] [Job 71] Started filter /usr/lib/cups/filter/commandtops (PID 3410)
D [05/Jun/2011:13:02:42 -0700] [Job 71] Started backend /usr/lib/cups/backend/usb (PID 3411)
D [05/Jun/2011:13:02:42 -0700] [Job 71] STATE: +connecting-to-device
D [05/Jun/2011:13:02:42 -0700] [Job 71] Backend returned status -11 (crashed)
D [05/Jun/2011:13:02:42 -0700] [Job 71] End of messages
D [05/Jun/2011:13:02:42 -0700] [Job 71] printer-state=3(idle)
D [05/Jun/2011:13:02:42 -0700] [Job 71] printer-state-message="/usr/lib/cups/backend/usb failed"
D [05/Jun/2011:13:02:42 -0700] [Job 71] printer-state-reasons=none
E [05/Jun/2011:13:03:25 -0700] [cups-deviced] PID 3420 (usb) crashed on signal 11!
E [05/Jun/2011:13:03:35 -0700] [cups-deviced] PID 3432 (usb) crashed on signal 11!

You get a separate "crashed on signal 11" for each time the usb cable is unplugged and replugged.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: cups 1.4.3-1ubuntu1.3
ProcVersionSignature: Ubuntu 2.6.32-32.62-generic 2.6.32.38+drm33.16
Uname: Linux 2.6.32-32-generic i686
Architecture: i386
Date: Sun Jun 5 13:00:35 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
Lpstat: device for HL-2040-series: usb://Brother/HL-2040%20series
MachineType: Dell Inc. MXC061
Papersize: letter
PpdFiles: HL-2040-series: Brother HL-2060 Foomatic/hpijs-pcl5e (recommended)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-32-generic root=UUID=8a493a50-5169-4cb5-a207-30a2c0939db3 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cups
dmi.bios.date: 12/18/2006
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A08
dmi.board.name: 0MG532
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA08:bd12/18/2006:svnDellInc.:pnMXC061:pvr:rvnDellInc.:rn0MG532:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: MXC061
dmi.sys.vendor: Dell Inc.

Revision history for this message
Bryce Nesbitt (bryce2) wrote :
Revision history for this message
Bryce Nesbitt (bryce2) wrote :

Restarting cups has no effect.

Revision history for this message
Bryce Nesbitt (bryce2) wrote :

Here it is with "debug" enabled the cups configuration:

D [05/Jun/2011:13:25:41 -0700] cupsdSendCommand: 13 file=11
D [05/Jun/2011:13:25:41 -0700] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 2243)
D [05/Jun/2011:13:25:41 -0700] [cups-deviced] Started backend /usr/lib/cups/backend/serial (PID 2244)
D [05/Jun/2011:13:25:41 -0700] [cups-deviced] Started backend /usr/lib/cups/backend/dnssd (PID 2245)
D [05/Jun/2011:13:25:41 -0700] [CGI] list_devices_libusb
D [05/Jun/2011:13:25:41 -0700] [CGI] usb_find_busses=5
D [05/Jun/2011:13:25:41 -0700] [CGI] usb_find_devices=16
D [05/Jun/2011:13:25:41 -0700] [CGI] Flushed attributes...
D [05/Jun/2011:13:25:41 -0700] [cups-deviced] Found device "usb://Brother/HL-2040%20series"...
D [05/Jun/2011:13:25:41 -0700] Script header: Content-Type: application/ipp
D [05/Jun/2011:13:25:41 -0700] Script header:
E [05/Jun/2011:13:25:41 -0700] [cups-deviced] PID 2243 (usb) crashed on signal 11!
D [05/Jun/2011:13:25:41 -0700] [cups-deviced] PID 2244 (serial) exited with no errors.
D [05/Jun/2011:13:25:41 -0700] cupsdAcceptClient: 16 from localhost (Domain)
D [05/Jun/2011:13:25:41 -0700] cupsdAcceptClient: 17 from localhost (Domain)
D [05/Jun/2011:13:25:41 -0700] cupsdReadClient: 16 WAITING Closing on EOF

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

Does the "usb" CUPS backend also crash if you run it from the command line (terminal window, also after a hibernate or suspend), via

sudo /usr/lib/cups/backend/usb

If you can reproduce the crash from the command line, please proced as described on

https://wiki.kubuntu.org/DebuggingProgramCrash

Install the "cups-dbg" package and get backtrace and other useful info for the

sudo /usr/lib/cups/backend/usb

call. If there are problems with "sudo", run "sudo -s" and then investigate the

/usr/lib/cups/backend/usb

call at the root prompt ("#").

Attach the files you get to this bug report.

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

Can you also check whether the problem still persists with a newer version of Ubuntu, preferably Natty? If you do not have a machine running this version, boot your laptop with a live CD of Natty and check whether the problem still occurs there.

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

Can you also, after a hibernate/suspend, follow the instructions in the section "Usb printer" on https://wiki.ubuntu.com/DebuggingPrintingProblems.

Revision history for this message
Bryce Nesbitt (bryce2) wrote :

I have followed all the steps at https://wiki.ubuntu.com/DebuggingPrintingProblems
and found that CUPS does see the device.

I will not try this on Natty. 10.04 is the LTS version of Ubutu, and the goal here is a stable system. Natty is too much in flux. We will move to Windows on this machine long before making a move to a less stable Ubuntu. I don't have regular access to the machine, I was called in to help fix it.

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

Can you post the output of the commands of the steps of https://wiki.ubuntu.com/DebuggingPrintingProblems here? Perhaps there are small irregularities which could help us.

About Natty, we do not want that you install Natty, but from the Natty live CD session on your machine we can perhaps find out whether we can backport something from Natty to Lucid to solve your problem.

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

Can you also run the following commands in a terminal window:

lsmod | grep usblp
sudo /usr/lib/cups/backend/usb
sudo rmmod usblp
sudo /usr/lib/cups/backend/usb
sudo modprobe usblp

Please post all the output here.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cups (Ubuntu) because there has been no activity for 60 days.]

Changed in cups (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Martin Collins (mkc-steadfast) wrote :

My father also has segfaults in backends/usb. He is running Kubuntu Natty. He has a HP LJ6MP on a Prolific USB->parallel cable.
It seems to be the case that if we delete the printer and reboot so it gets recreated then it works and he can print. After another reboot it stops working. I have tried it with and without usblp loaded but there is no difference.

I have installed cups-dbg but it is not obvious to me how to get a backtrace or core dump for backends/usb.

Revision history for this message
Martin Collins (mkc-steadfast) wrote :
Changed in cups (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

To get a backtrace, follow the instructions on https://wiki.ubuntu.com/DebuggingProgramCrash. If your printer is not detected but the USB backend does not crash, see bug 872711.

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

According to the error_log all crashes happened while the backend was used to print a job, there is nothing which looks like a crash of the backend when it was called to detect devices, bvut as the device detection code is alo used when a job is sent, it is not excluded that the crash is in the device detection code.

Anyway, I need a backtrace to be able to do anything with the bug.

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

You can try to get a backtrace as follows:

Make sure you have the package cups-db installed and it matches the version of your installed cups package.

Run the following commands in a terminal window:

sudo -s
ulimit -c unlimited
cat <large plain text file> | DEVICE_URI='usb://HP/LaserJet%206MP' /usr/lib/cups/backend/usb 1 1 1 1 ''

If you get a segmentation fault or any other crash saying "core dumped", run

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

As soon as you get the prompt inside dbg, run

backtrace full

and paste the output here.

See also

https://wiki.ubuntu.com/Backtrace

Changed in cups (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Martin Collins (mkc-steadfast) wrote :

I cannot induce it to crash in that way. I tried several files up t o 55 pages in size with no result. But a smaller rtf file printed in the normal way has crashed twice today.
Is there some way to get a core dump while running the whole cups chain?

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

pitti, how does one make Apport popping up a crash report on the CUPS USB backend when it crashes. The reporting users are on released versions of Ubuntu.

Revision history for this message
Martin Pitt (pitti) wrote :

To temporarily enable apport until the next reboot, please run this in a terminal:

   sudo start apport force_start=1

Then reproduce the cups crash. You should then get a popup window that a system crash occurred, which you can then report to Launchpad. Thanks!

Revision history for this message
Martin Collins (mkc-steadfast) wrote :

The crash suddenly got all shy so I have enabled apport permanently. I'm sure we'll catch it eventually, but I apologise in advance for any false alarms; my Dad is ancient, clueless and several thousand miles away...

Revision history for this message
Martin Collins (mkc-steadfast) wrote :

We got a crash report. I have extracted the core file and done the gdb thing:

(gdb) backtrace full
#0 0x00e876ae in ?? () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
#1 0x0042baa6 in ?? ()
No symbol table info available.
#2 0x0042c8bd in ?? ()
No symbol table info available.
#3 0x0da30042 in ?? ()
No symbol table info available.
#4 0x00010043 in ?? ()
No symbol table info available.
#5 0x001b0000 in ?? () from /lib/i386-linux-gnu/libgcrypt.so.11
No symbol table info available.
Cannot access memory at address 0xd15cbfad

I don't think that's too useful though. gdb lists a bunch of libraries it can't load debugging symbols for, including libcups which is the -dbg version already. I can post the whole crash report if it will help (96k).

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

Started having very similar crashes after updating to Oneiric on 2 computers with Samsung ML-2015 printers.

cups 1.5.0-8ubuntu4

D [04/Nov/2011:12:17:19 +0200] [Job 22542] Backend returned status -11 (crashed)
[16923.863948] usb[1950]: segfault at bfa9a000 ip 00529423 sp bfa95bc8 error 4 in libc-2.13.so[4b2000+176000]

However, I don't know how to reliably reproduce it. For example, usb backend crashes, but if I immediately release a held CUPS print job for printing it gets printed.

One day we printed 100+ jobs without crashing once, the next day it crashed 3 times in 3 hours.

I installed and enabled apport, installed cups-dbg, libc6-dbg. Ran ulimit -c unlimited.

What else should I do to get the most information of the next crash when it happens?

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

Can everyone who suffers this bug 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.

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

New package (1.5.0-8ubuntu5~ppa2) uploaded to my PPA, to also fix crasher bug 887094. Perhaps it also fixes this bug. As soon as it gets available for download, please test this one.

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

The package in my PPA is now also proposed as an SRU (Stable Release Update) for Oneirc in bug 887094. Besides testing my PPA please also test the SRU which will be announced in that bug.

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

The SRU mentioned in the previous comment has been approved in oneiric-proposed and is ready for download. See bug 887094 for further instructions and test the package to see whether also this bug got fixed. Please report your results here.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cups (Ubuntu) because there has been no activity for 60 days.]

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

If you are still getting crashes with the current Oneiric (with all updates), especially after suspend, try the package

cups - 1.5.0-8ubuntu7~ppa1

from my PPA

https://launchpad.net/~till-kamppeter/+archive/ppa

Its USB backend is based on the new libusb 1.0.x. Perhaps this helps as libusb 1.0.x has probably several bugs of libusb 0.1.x fixed.

The backend can still have bugs, so tell us exactly what the behavior is after having installed the new CUPS package.

Changed in cups (Ubuntu):
status: Expired → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cups (Ubuntu) because there has been no activity for 60 days.]

Changed in cups (Ubuntu):
status: Incomplete → Expired
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.