apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.94k stars 464 forks source link

USB backend fails on Solaris 10 #1756

Closed michaelrsweet closed 18 years ago

michaelrsweet commented 18 years ago

Version: 1.2.1 CUPS.org User: ywlke

I'm not sure that this problem is actually printer or OS-specific since I don't have another machine with a different OS to use for testing, nor do I have another USB printer to work with. I am using Solaris 10 (1/06 release) SPARC on a Sun Blade 150. The printer is an HP Color LaserJet 3800. This printer works when I use 1.1.23, but if I run 1.2.1 and send a print job, the usb backend ("usb") chews up 100% CPU without printing, and I end up having to kill it. I am sure this is not an ESP GS or Foomatic problem. The USB backend is running as user "lp".

michaelrsweet commented 18 years ago

CUPS.org User: mike

Please attach your /var/log/cups/error_log file.

Also, please run the following commands and send the output:

lpstat -v
su lp -c /usr/lib/cups/backend/usb
michaelrsweet commented 18 years ago

CUPS.org User: mike

[posting to cups.bugs - William, please post your comments to the web form to get them into the bug database, thanks!]

series of commands run: /etc/init.d/cups start lpr -P 115_Color /etc/cups/printers.conf

waited some

pkill -9 usb lprm -P 115_Color /etc/init.d/cups stop

time lapse

/etc/init.d/cups start lpstat -v su lp -c /usr/lib/cups/backend/usb /etc/init.d/cups stop

lpstat -v (irrelevant printers clipped for security) device for 115_Color: usb://HP/Color%20LaserJet%203800

su lp -c /usr/lib/cups/backend/usb direct usb://HP/Color%20LaserJet%203800 "HP Color LaserJet 3800" "HP Color LaserJet 3800 USB #1" "MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PCLXL,PCL,PJL,POSTSCRIPT;1284.4DL:4d,4e,1;MDL:HP Color LaserJet 3800;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet 3800;"

michaelrsweet commented 18 years ago

CUPS.org User: ywlke

The error_log reflects the commands listed in the previous post.

michaelrsweet commented 18 years ago

CUPS.org User: mike

Fixed in Subversion repository.

michaelrsweet commented 18 years ago

"str1756.patch":

Index: runloop.c

--- runloop.c (revision 5719) +++ runloop.c (working copy) @@ -53,6 +53,7 @@ totalbytes, /* Total bytes written / bytes; / Bytes written / int paperout; /_ "Paper out" status */

-int open_device(const char uri); +int open_device(const char uri, int *use_bc);

/* @@ -75,14 +75,6 @@ (void)argv;

/*

- */

- use_bc = strcasecmp(hostname, "Canon") != 0;

@@ -90,7 +82,15 @@

do {