CUPS 1.4.0, USB backend hangs

Bug #420797 reported by ilna
38
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Critical
Till Kamppeter

Bug Description

Binary package hint: cups

The issue is a continuation of this one: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/420015
After sending a job to USB printer new process is starting - 'usb' with owner 'lp'. The process eats almost 100% of CPU core (mostly 'system'). After a job is finished (printing itself is correct) the process still exists, eats CPU, doesn't respect sigterm.

Tags: backend cups usb
NoahY (noahy)
Changed in cups (Ubuntu):
status: New → Confirmed
Revision history for this message
Thorsten (kdefan) wrote :

In addition, the KDE printer management tools continues to show the print job that just completed printing as pending. No other documents can be printed until the print job has been canceled and the 100% CPU-sucking, 'lp'-owned usb process has been killed (-HUP.) After that, the cycle begins anew (documents prints fine, but continues to show as pending, 'usb' process continues to gobble up 100% CPU until killed.)

All this on Kubuntu Karmic Alpha-4 w/all recent updates. Printer: Samsung ML-1740 via usb.

Revision history for this message
Eric B (ebischoff) wrote :

I don't know if this helps, but here is the output of strace

poll([{fd=0, events=POLLIN}, {fd=4, events=POLLIN}], 2, -1) = 1 ([{fd=0, revents=POLLHUP}])
(... repeated in infinite loop)

and here is output of lsof :
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
usb 9846 lp 4u unix 0xffff88007e521b80 0t0 42632 socket

so the "hanging" usb process keeps polling a UNIX domain socket in vain.

My best guess is that cups forgets to close the UNIX domain socket that it uses to communicate with its backend after printing. This makes subsequent printing unavailable.

I'm using cups version 3.6.8-9ubuntu3 in karmic koala.

A workaround to the problem is to create a cron task that kills every minute any process which name starts with "usb://". Yes, that's ugly, dangerous, and miserable, but it helps me not being killed by my girlfriend who needs to print from her macintosh.

Revision history for this message
Eric B (ebischoff) wrote :
Revision history for this message
ilna (a-gaydenko) wrote :

Eric,

Thanks! I still can not register on cups.org.

(P.S. Unfortunately it isn't last cups 1.4 show stopper - have filed new one 421459)

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

bug 421459

[ Please write always "bug" before a bug number, to get automatic links, thanks. ]

Revision history for this message
Brian Harkness (maestro-bwh) wrote :

Happening with minolta pagepro 1350... messed around with it for an hour before I found this bug under yahoo search:-( I kept being goaded by the printing of a test page... seemed so hopeful.

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

Bug is fixed upstream.

Changed in cups (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Critical
assignee: nobody → Martin Pitt (pitti)
milestone: none → karmic-alpha-5
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fix committed into the Debian BZR repository of CUPS. Will be included in the next Karmic package of CUPS.

Changed in cups (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.4.0-3

---------------
cups (1.4.0-3) experimental; urgency=low

  [ Till Kamppeter ]
  * debian/patches/usb-backend-infinite-loop-on-end-of-job.dpatch: Fixed
    upstream bug of the new libusb-based CUPS "usb" backend falling into
    an infinite loop after completing the job, blocking the next job
    (LP: #420797).

  [ Martin Pitt ]
  * debian/local/filters/pdf-filters/pdftopdf/P2PDoc.cxx: Update for poppler
    0.11.3 API, thanks to Koji Otani <email address hidden>!
  * disable-pdftoopvp-with-old-poppler.dpatch: Revert above change when
    building with poppler 0.10.x.

 -- Martin Pitt <email address hidden> Tue, 01 Sep 2009 09:44:33 +0200

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
personman (personman-145) wrote :

According to my package manager, I'm running 1.4.0-3 and still experiencing this problem.

Running Kubuntu Karmic.

Revision history for this message
Andy Hibbins (andy-andyhibbins) wrote :

I can confirm that I am also experiencing a hanging usb backend, using cups 1.4.0-3.

Revision history for this message
Renate (yollywau) wrote :

With cups 1.4.0-3, my Canon_S400 is working again, but after printing a process named usb uses a lot of CPU. I had to
kill this process.

Revision history for this message
ilna (a-gaydenko) wrote :

Another confirmation for 1.4.0-3.

Changed in cups (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
ilna (a-gaydenko) wrote :

[ Being the issue reporter, I have tried to change the issue status from fixed to confirmed. But it seems a reporter has not such rights. Is it intended? ]

Revision history for this message
ilna (a-gaydenko) wrote :

[ ups... now it is confirmed nevertheless - probably there is some small time lag. Sorry for noise. ]

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

I can reproduce this with the HP LaserJet 3390 on USB and HP's PostScript PPD file, simply sending a Ubuntu test page. Printout is correct but usb backend does not terminate. My latest fix on the AppArmor configuration is applied (see bug 420015).

Martin Pitt (pitti)
Changed in cups (Ubuntu):
assignee: Martin Pitt (pitti) → Till Kamppeter (till-kamppeter)
milestone: karmic-alpha-5 → ubuntu-9.10-beta
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fix uploaded to Debian BZR repository of CUPS. It will appear in the next CUPS package.

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

Submitted patch upstream as

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

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

This bug was fixed in the package cups - 1.4.0-3.1

---------------
cups (1.4.0-3.1) karmic; urgency=low

  Urgent bzr head upload to karmic to unbreak printing for Alpha-5.

  [ Till Kamppeter ]
  * debian/patches/usb-backend-infinite-loop-on-end-of-job.dpatch: Fixed the
    patch so that the usb backend really terminates after a job (LP: #420797).
  * debian/local/apparmor-profile: cupsd needs also to be allowed to read
    the /dev/bus/usb/ directory, given with the "/" in the end. This should
    finally fix LP: #420015.

  [ Martin Pitt ]
  * debian/control: Drop the transitional cupsys packages.
  * printer-filtering.dpatch: Fix sometimes overzealous filtering, thanks to
    Stéphane Graber!
  * debian/rules: Drop autoconf call on build again, we have a proper upstream
    release.

 -- Martin Pitt <email address hidden> Wed, 02 Sep 2009 17:01:51 +0200

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
NoahY (noahy) wrote :

Can confirm that this fix works.

Revision history for this message
personman (personman-145) wrote :

I also can confirm that this fix is working.

Revision history for this message
Andy Hibbins (andy-andyhibbins) wrote :

The usb backend problem appears to be fixed.
However I am getting a "Unable to write xxxx bytes to printer!" message or "Files have gone away!".
I tried printing a 3 page document in oowriter and the first page printed okay, but other 2 pages refused to print.
Am using a Lexmark X1180, using the Z600 PPD.

Revision history for this message
personman (personman-145) wrote :

I tried to reproduce the issue in post #22. I wrote 3 simple pages in open office writer and sent them to the printer. Seems to have worked properly here, so I'm unable to confirm that bug.

Running Karmic with a Canon PIXMA MX700 USB printer. If someone else can confirm it you might consider posting a new bug report. (If you haven't already)

-Another Andy (We Andys got to stick together...:P)

Revision history for this message
Andy Hibbins (andy-andyhibbins) wrote :

I'm going to try printing from a friend's HP printer.
If that works then maybe it is time for me to replace the ageing Lexmark with a new HP.

If I try to print and no paper is in the paper feeder, the power light will flash. Upon inserting paper and pressing the "continue" button, the printer will wait for a while then sometimes just eject the paper.

Other times 1 page will print and then no more.

Revision history for this message
Eric B (ebischoff) wrote :

Tested, new version works for me, problem disappeared for me.

Thanks everyone.

Revision history for this message
Andy Hibbins (andy-andyhibbins) wrote :

Tested new version of cups on the parents' HP F2200 series printer, works a dream.
I will be purchasing a HP printer to replace the ageing Lexmark.
Thank you to all who work on cups, especially Till Kamppeter and Martin Pitt.

Revision history for this message
Brian Harkness (maestro-bwh) wrote :

My Konica Minolta Page Pro 1350 now works properly:-)

Revision history for this message
Mark Greenwood (fatgerman) wrote :

I can confirm the issue in post#22. It was working for me in Jaunty but has never worked in Karmic, I see that exact same error. I'm using an Epson Stylus Photo R1800

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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