cupsd hangs when HP or Kyocera Mita printer is added with web interface

Bug #33545 reported by Pascal De Vuyst
14
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Adding a Hewlett Packard (HP) printer in the following way causes cupsd to hang using 100% of CPU time:

1) Run in a terminal:
$ hp-makeuri /dev/usblp0
This output the DeviceURI you need for adding you printer.
CUPS URI: hp:/usb/DESKJET_3820?device=/dev/usblp0
2) Open up a web browser and go to http://localhost:631
2) Click Add Printer.
3) Fill out Printer Name, ... then click continue.
4) Choose Device: AppSocket/HP Jetdirect. Click Continue.
5) Now on the next page you will see a place for entry that says socket. Delete that and paste in your CUPS URI: that you got from step 1. Click Continue.
6) Select Manufacturer "HP (HPLIP)" => the page just continuously loads and doesn't show a list of Printer Models. This continuous loading only appears when selecting Manufacturer "HP (HPLIP)". When selecting other Manufacturers we immediately get a list of Printer Models.

I have put cups ErrorLevel to "debug", the error_log is included in attachment.

This error_log indicates an authentication problem although I did add the cupsys user to the shadow group as suggested in /usr/share/doc/cupsys/README.Debian.gz to allow printer administration over the web interface.

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote : cups error_log

The error_log indicating a authentication problem.

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote : Re: cupsd hangs when HP printer is added with web interface

I forgot to mention I'm using:

Dapper 20060303
cupsys 1.1.99.b1.r4929-0ubuntu2

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

I found out that the hanging occurs only when selecting a Manufacturer that has a space character inside the name, e.g. "HP (HPLIP)" and "Kyocera Mita".

A simple workaround is to replace "HP (HPLIP)" by "HP(HPLIP)" (without space) with following command:
$ sudo sed -i 's/HP (HPLIP)/HP(HPLIP)/' /usr/share/ppd/hplip/*

So it seems CUPS has difficulties handling spaces inside Manufacturer names.

Revision history for this message
Robert McQueen (robot101) wrote :

I am seeing this behaviour too. cupsd uses 100% CPU, strace shows repeatedly:

select(1024, [0 1 6 7 8 9], [7], NULL, {1, 0}) = 1 (out [7], left {1, 0})
time(NULL) = 1143159140

The fact that the HPLIP drivers appear with a manufacturer name that's not HP also seems to break with USB manufacturer detection - I'm only showed a list of "HP" printers, which doesn't include my printer, which is in the HP (HPLIP) pseudo-manufacturer. The solution to both might be to merge the HPLIP printers into HP.

Changed in cupsys:
status: Unconfirmed → Confirmed
Matthias Klose (doko)
Changed in cupsys:
assignee: nobody → doko
Revision history for this message
Alexandre Otto Strube (surak) wrote :

is this a duplicate from #32085, isn't it?

Revision history for this message
Matthias Klose (doko) wrote :

the manufacturer names (HP und Kyocera) are fixed with recent foomatic-* updates (20060414).

Changed in cupsys:
status: Confirmed → Fix Released
Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

I'm using dapper 20060416.
Reopening this bug since it still occurs when adding "Kyocera Mita" printer after recent updates. This manufacturer has a space in the name causing cupsd to hang. This is a cups issue as reported upstream here: http://www.cups.org/str.php?L1567+P0+S-2+C0+I0+E0+Q.

linuxprinting.org-ppds still contains ppds with manufacturer indication "Kyocera Mita".

Changed in cupsys:
status: Fix Released → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed upstream, will import the fix soon.

Changed in cupsys:
assignee: doko → pitti
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in my local version, awaiting UVF exception approval.

Changed in cupsys:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Unfortunately upstream's patch brought some regression; I backed out the change until this is resolved.

Changed in cupsys:
status: Fix Committed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed the reason (g-c-m regression) for holding back the patch:

 gnome-cups-manager (0.31-1.1ubuntu8) dapper; urgency=low
 .
   * Add debian/patches/get-ppds-attrs.patch:
     - libgnomecups/gnome-cups-ui-driver.c, ppd_request(): Do not use
       gnome_cups_request_add_requested_attributes() to select only particular
       attributes; this libgnomecups operation seems to not work any more with
       current cups (which is why cups' svn 5438 fix had to be reverted). With
       this patch, we can finally fix LP#33545.
     - This will now send about three attributes we are not interested in, but
       this is negligible compared to the > 3000 attributes we get from the
       PPDs.

Will upload fixed cupsys soon.

Changed in cupsys:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

 cupsys (1.2.0-0ubuntu5) dapper; urgency=low
 .
   * Remove debian/patches/56_revert_svn_5438.dpatch: The reason for this
     reversion has now been fixed in gnome-cups-manager 0.31-1.1ubuntu8. This
     fixes the handling of spaces in manufacturer names. Closes: LP#33545

Changed in cupsys:
status: Fix Committed → Fix Released
Revision history for this message
Gustavo Sverzut Barbieri (barbieri-profusion) wrote :

I'm trying to add HP 660C, using both KDE or web admin UIs without success: in the last step it just hangs and cupsd starts to hog 100% CPU.

Maybe my problem is related to this bug?

Running edgy with cups-1.2.4-2ubuntu3.

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

@Gustavo
It is highly unlikely that your problem is related to this bug since this problem was fixed before dapper release, please open a separate bug report for your problem and provide the output of the printingbug info script. The printingbug info script can be found here: https://wiki.ubuntu.com/PrintingBugInfoScript.

Revision history for this message
Gustavo Sverzut Barbieri (barbieri-profusion) wrote :

Pascal,

Sorry for not replying earlier, but my problem was actually related to #47892. :-(

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.