Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 285159

Summary: Cups 1.4.1 usb printing issues - many instances of cupsd
Product: Gentoo Linux Reporter: Michael Evans <mjevans1983>
Component: [OLD] PrintingAssignee: Printing Team <printing>
Status: RESOLVED NEEDINFO    
Severity: major CC: brent.saner, catkfr, jesse, jrmalaq, martin, mkyral
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 370193    
Attachments: ps of cupsd/lp processes before "/etc/init.d/cupsd stop"

Description Michael Evans 2009-09-16 06:57:41 UTC
Prior to upgrade cups was able to print to my usb printer.
Cups 1.4.1 fails to print, AND
* Spawns many many many instances of cupsd that are defunct
* Continues to do so after blacklisting and rmmodding usblp
* Continues to do so after adding a udev rule to make the USB printing device owned by root:lp with perm 660

Downgrading to cups < 1.4.0 and allowing usblp to load restores normal operation.

Reproducible: Always

Steps to Reproduce:
Comment 1 Martin R. Ehmsen 2009-09-16 07:31:51 UTC
There seems to be many issues with USB and cups-1.4:
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/420015
Comment 2 Alexey Shvetsov archtester gentoo-dev 2009-09-19 09:48:18 UTC
(In reply to comment #1)
> There seems to be many issues with USB and cups-1.4:
> https://bugs.launchpad.net/ubuntu/+source/cups/+bug/420015
> 

Yep error seems the same.
I think cups should be able to read /dev/bus/usb/*/* 
so we shpuld adjust udev rules
Comment 3 Roman Gruber 2009-09-22 11:50:34 UTC
My FS-1300D Printer from kyocera, working on usb, also doesnt like this cups version: 
looking at: http://localhost:631
Processing - "Waiting for printer to become available..."

Well I downgrade, only workaround at the moment
Comment 4 Marian Kyral 2009-10-03 17:00:40 UTC
Can confirm. My Epson EPL-6200 does not work with Cups-1.4. First I lost all ppds provided by foomatic - missing ppds flag in ebuild (http://bugs.gentoo.org/show_bug.cgi?id=285690)

But even I installed all needed foomatic packages, printer does not work. I had to downgrade to 1.3.
Comment 5 michel 2009-10-21 17:58:48 UTC
Samsung CLP300 doesnt work with cups-1.4.1 ..

tail /var/log/cups/error_log
E [21/Oct/2009:19:07:43 +0200] Unable to open listen socket for address ::1:631 - Address family not supported by protocol.
E [21/Oct/2009:19:12:03 +0200] Returning IPP client-error-not-authorized for Print-Job (ipp://localhost:631/printers/Samsung_CLP-300) from localhost

Downgrading to cups-1.3.11 solved this problem
Comment 6 Michal Pytasz 2010-04-18 08:58:58 UTC
Well, Up to 1.4.3 Samsungs ML2010 nor CLP315 do no seem to print (splix driver)
Comment 7 Andrew Udvare 2010-07-06 19:50:11 UTC
(In reply to comment #5)
> Samsung CLP300 doesnt work with cups-1.4.1 ..
> 
> tail /var/log/cups/error_log
> E [21/Oct/2009:19:07:43 +0200] Unable to open listen socket for address ::1:631
> - Address family not supported by protocol.
> E [21/Oct/2009:19:12:03 +0200] Returning IPP client-error-not-authorized for
> Print-Job (ipp://localhost:631/printers/Samsung_CLP-300) from localhost
> 
> Downgrading to cups-1.3.11 solved this problem
> 

Had same exact things in the error log with 1.4.x. Downgraded to 1.3, masking 1.4 for now. ~AMD64 machine here.
Comment 8 Robert Bradbury 2010-08-07 15:11:01 UTC
Using net-print/cups-1.4.4 it seems very easy to get into a situation where there are multiple defunct cupsd processes causing poor system performance.  I don't know if the root user (superuser) does or does not obey ulimit -u (which appears to default to 400 processes on my system).  As cupsd runs as root (rather than say lp???) it may be able to swamp the system in defunct processes.

Suggested fixes:
1) Run cupsd as lp with an "enforced" process limit (say 10, maybe 50 processes?).  It gets complex because cups file processing may string together multipipe processes, e.g. texttops | pstops | usb which may run as children of cupsd(???).
2) cupsd should setup a signal handler for SIGCHLD and collect them as they exit (minimizing the accumulation of defunct processes) -- probably needs to be suggested to developers upstream.
3) Have cupsd internally limit the number of children it creates -- also needs to be suggested upstream.
Comment 9 Robert Bradbury 2010-08-07 15:29:29 UTC
A further analysis of cups-1.4.4 reveals that it generally runs ok, but the abundance of defunct child processes is created explicitly when using: /etc/init.d/cupsd stop.

I am not sure if this a cupsd or an init shell script problem.  This happens when there is a single job in the print queue which is not printing due to a "hung" usb device.  See attachments.
Comment 10 Robert Bradbury 2010-08-07 15:35:07 UTC
Created attachment 241789 [details]
ps of cupsd/lp processes before "/etc/init.d/cupsd stop"

Once the "stop" is issued, the ps ouput goes to a state where cupsd has 40+ defunct child processes.
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2011-06-05 15:49:01 UTC
Do you still have this problem with cups 1.4.6-r1 ?
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2012-01-27 20:40:01 UTC
Please try cups-1.5 and report back.
Comment 13 Andreas K. Hüttel archtester gentoo-dev 2012-04-05 19:19:49 UTC
(In reply to comment #11)
> Do you still have this problem with cups 1.4.6-r1 ?

(In reply to comment #12)
> Please try cups-1.5 and report back.

No reply for a couple of months...