Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-19 Thread Patricio Rojo
1.3.9-5 seems to be working for me!!! thank you very much! 


On Mon, 2008-11-17 at 11:44 +0100, Martin Pitt wrote:
 Martin Pitt [2008-11-16 16:59 +0100]:
  Upstream committed a different patch:
  
http://www.cups.org/strfiles/3001/str3001.patch
 
 This patch is now included in 1.3.9-5, which just got uploaded to
 experimental. Can you guys please test this version? If it works, I
 need to push that to unstable and lenny, too, but the window for that
 gets smaller every day.
 
 Thank you!
 
 Martin




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-17 Thread Martin Pitt
Martin Pitt [2008-11-16 16:59 +0100]:
 Upstream committed a different patch:
 
   http://www.cups.org/strfiles/3001/str3001.patch

This patch is now included in 1.3.9-5, which just got uploaded to
experimental. Can you guys please test this version? If it works, I
need to push that to unstable and lenny, too, but the window for that
gets smaller every day.

Thank you!

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-17 Thread Andreas Mohr
Hi,

On Mon, Nov 17, 2008 at 11:44:04AM +0100, Martin Pitt wrote:
 Martin Pitt [2008-11-16 16:59 +0100]:
  Upstream committed a different patch:
  
http://www.cups.org/strfiles/3001/str3001.patch
 
 This patch is now included in 1.3.9-5, which just got uploaded to
 experimental. Can you guys please test this version? If it works, I
 need to push that to unstable and lenny, too, but the window for that
 gets smaller every day.

OK, I don't know what to make of this:

I downgraded cups to 1.3.8-1lenny2 (the original, hanging version),
tried printing two of the complex formerly problematic documents,
didn't get any socket backend hangs this time (with printer test
which remained configured exactly as last time when it did produce hangs).
Verified timestamp of socket backend binary, was ok (October, matching
distribution package, _NOT_ my custom-patched package version),
and of course I had stopped and started cups, repeatedly even.

Then I said so what and upgraded to incoming.debian.org 1.3.9-5
(plus _all_ cups helper packages),
first submitted job got stuck at first page without producing any
printer traffic, second job worked fine.
(first job could possibly have been confused by an earlier Job
Abort button action at the printer, though)

Puzzled.

Thanks a lot for your work,

Andreas Mohr



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-16 Thread Martin Pitt
Hello all,

Upstream committed a different patch:

  http://www.cups.org/strfiles/3001/str3001.patch

It's not quite doing the same as Samuel's, but according to upstream
it is more correct. Any chance you can apply this instead of Samuel's,
and checking if it still works?

Many thanks!

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-16 Thread Samuel Thibault
Martin Pitt, le Sun 16 Nov 2008 16:59:45 +0100, a écrit :
 Upstream committed a different patch:
 
   http://www.cups.org/strfiles/3001/str3001.patch

Ok. I was actually tempted to do something similar but I didn't know the
consequences. I guess it's ok then.

Samuel



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-13 Thread Martin Pitt
Hi Samuel,

Samuel Thibault [2008-11-11 14:46 +0100]:
 Right but here the issue is on the input side: device_fd got to EOF,
 thus select() returning it and read() on it returning 0. The attached
 patch at least prevents select from returning, avoiding 100% CPU usage.

Thanks for your analysis and the patch! It looks correct to me, and I
applied it to the package bzr. I forwarded it to upstream
(http://www.cups.org/str.php?L3001) and will wait a day or two for
upstream's comment before uploading it.

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-11 Thread Samuel Thibault
Andreas Mohr, le Tue 11 Nov 2008 19:33:02 +0100, a écrit :
 Or, simply stated, how to disable the test suite to get a successful
 .deb package build?

Usually you just need to prepend DEB_BUILD_OPTIONS=nocheck

Samuel



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-11 Thread Andreas Mohr
Hi,

On Tue, Nov 11, 2008 at 07:40:40PM +0100, Samuel Thibault wrote:
 Andreas Mohr, le Tue 11 Nov 2008 19:33:02 +0100, a écrit :
  Or, simply stated, how to disable the test suite to get a successful
  .deb package build?
 
 Usually you just need to prepend DEB_BUILD_OPTIONS=nocheck

That did it.

And re-attempting a 40-page duplexed job on cups Debian unstable 1.3.9-2
did hang just like before, and then downgrading to the patched 1.3.8-1lenny2
_does_ print immediately upon cupsd restart, without any socket backend lockup
any more.

Very nice work, thanks!

 
 Samuel

Andreas Mohr



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-11 Thread Andreas Mohr
Hi,

On Tue, Nov 11, 2008 at 02:46:55PM +0100, Samuel Thibault wrote:
 Right but here the issue is on the input side: device_fd got to EOF,
 thus select() returning it and read() on it returning 0. The attached
 patch at least prevents select from returning, avoiding 100% CPU usage.

Very nice, and fast reaction, too!

I wanted to verify this patch to succeed versus the unpatched version
to still fail with the very same test setup each,
but I failed during package build
(via fakeroot dpkg-buildpackage in the apt-get source'd cups-1.3.8/ directory):

.
.
.
lsb/usr/cups-included/Zebra/zebra.ppd Zebra ZPL Label Printer, 1.3
zebra.ppd Zebra ZPL Label Printer, 1.3
PASSED

Test Summary

PASS: Printer 'Test1' correctly produced 55 page(s).
PASS: Printer 'Test2' correctly produced 23 page(s).
PASS: 154 requests processed.
PASS: 0 emergency messages.
PASS: 0 alert messages.
PASS: 0 critical messages.
FAIL: 0 error messages, expected 9.
PASS: 0 warning messages.
PASS: 0 notice messages.
PASS: 1 info messages.
FAIL: 0 debug messages, expected more than 0.
PASS: 0 debug2 messages.

2 tests failed.
Log files can be found in /tmp/cups-root/log.
A HTML report was created in /tmp/cups-root/cups-str-1.3-2008-11-11-root.html.

Copies of the error_log and cups-str-1.3-2008-11-11-root.html files are in
/usr/src/system/cups-1.3.8/test.

make[1]: *** [check] Error 1
make[1]: Leaving directory `/usr/src/system/cups-1.3.8'
make: *** [debian/stamp-makefile-check] Error 2
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
birgit:/usr/src/system/cups-1.3.8#




Or, simply stated, how to disable the test suite to get a successful
.deb package build?
(maybe I shouldn't ignore a failing test run though; then what?)

Or could you tell me what the usual way is to do this cups .deb package build?

Thanks a lot,

Andreas Mohr



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-11 Thread Samuel Thibault
Andreas Mohr, le Sun 02 Nov 2008 17:17:12 +0100, a écrit :
 The CUPS backend mechanism had issues before already
 (STR #2664, http://www.cups.org/str.php?L2664+P0+S-2+C0+I0+E0+M20+Q ):
 
 
 r7204 | mike | 2008-01-09 19:59:55 +0100 (Mi, 09 Jan 2008) | 3 lines
 
 Don't select() on the output side of the device if we have a
 side-channel
 callback - this causes 100% CPU usage (STR #2664)

Right but here the issue is on the input side: device_fd got to EOF,
thus select() returning it and read() on it returning 0. The attached
patch at least prevents select from returning, avoiding 100% CPU usage.

Samuel
--- backend/runloop.c.orig  2008-11-11 14:38:02.0 +0100
+++ backend/runloop.c   2008-11-11 14:44:42.0 +0100
@@ -161,6 +161,7 @@
 #if defined(HAVE_SIGACTION)  !defined(HAVE_SIGSET)
   struct sigaction action; /* Actions for POSIX signals */
 #endif /* HAVE_SIGACTION  !HAVE_SIGSET */
+  int device_input = 1;
 
 
   fprintf(stderr,
@@ -210,7 +211,7 @@
 FD_ZERO(input);
 if (!print_bytes)
   FD_SET(print_fd, input);
-if (use_bc)
+if (use_bc  device_input)
   FD_SET(device_fd, input);
 if (!print_bytes  side_cb)
   FD_SET(CUPS_SC_FD, input);
@@ -273,6 +274,13 @@
CUPS_LLCAST bc_bytes);
 cupsBackChannelWrite(bc_buffer, bc_bytes, 1.0);
   }
+  else if (bc_bytes == 0)
+  {
+   /*
+* End of file, stop trying to read from device_fd
+   */
+device_input = 0;
+  }
 }
 
/*


Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-03 Thread Andreas Mohr
OK, using HPLIP (hp backend, which appears to be recommended) submitting
larger jobs seems to work without a backend lockup, however it's AWFULLY,
almost unusably slow (1 page per 2 minutes or so, adding up to maybe 4 minutes
per quadruple-duplexed PDF/PS page).
(HPLIP is actually known to be very slow in certain configurations, too, and
developers even already said that they're working on improving it)

I don't know, but whichever thing I try to configure in CUPS, I'm
_ALWAYS_ (yes, that's an always, since chances are about 60%)
hitting a brick wall of some more or less severe sort (and I'm
far from being the only one, judging from Internet discussions).

IOW, I found a crude if acceptable workaround, thus severity should be left at
grave, since the normal socket backend should at least be semi-usable, too.

Thanks,

Andreas Mohr



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-11-02 Thread Andreas Mohr
Environment clarification:
HPLJ4000TN JetDirect J3111A Firmware G.08.49 (newest), on a BNC(!)
connection.

This being a 10Mbps BNC connection here could be another indication
that this 100% CPU lockup issue possibly happens on slower connections only
(this issue does not seem to be too wide-spread, thus maybe it affects
slow-net users only)


The CUPS backend mechanism had issues before already
(STR #2664, http://www.cups.org/str.php?L2664+P0+S-2+C0+I0+E0+M20+Q ):


r7204 | mike | 2008-01-09 19:59:55 +0100 (Mi, 09 Jan 2008) | 3 lines

Don't select() on the output side of the device if we have a
side-channel
callback - this causes 100% CPU usage (STR #2664)

Andreas Mohr



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Processed: Re: [Pkg-cups-devel] Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-07-03 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 severity 489045 normal
Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with 
HPJetDirect
Severity set to `normal' from `grave'

 tag 489045 moreinfo
Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with 
HPJetDirect
There were no tags set.
Tags added: moreinfo

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: [Pkg-cups-devel] Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-07-03 Thread Martin Pitt
severity 489045 normal
tag 489045 moreinfo
thanks

Patricio Rojo [2008-07-02 20:03 -0400]:
Nothing happens when trying to print, even the test-page, to a HP 
 4200 network printer through HPDirect.  If I run 'top', I see a process 
 called 'socket' owned by user 'lp' that is using 100% of computer use.

Since this does not happen for everyone, just on this particular
model, I'm downgrading the severity.

Can you please attach your /var/log/cups/error_log right after this
happens? Also, by using top, can you find out the process ID of that
runaway socket process, and do


  strace -f -o /tmp/strace.out -p PID

  (set PID to the process ID of the socket process)

for some seconds? Please attach /tmp/strace.out here, too.

Thanks,

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#489045: cups: infinite loop, 100%CPU use, while trying to print with HPJetDirect

2008-07-02 Thread Patricio Rojo
Package: cups
Version: 1.3.7-7
Severity: grave
Justification: renders package unusable

Hi,

   Nothing happens when trying to print, even the test-page, to a HP 
4200 network printer through HPDirect.  If I run 'top', I see a process 
called 'socket' owned by user 'lp' that is using 100% of computer use.

   I first saw this problem several months ago when I was using 'etch' 
on my amd64 machine, but I did not reported a bug because my laptop 
(running i386 'sid') could print without problems in the same printer.  
So, I just thought it was an incompatibility of the etch version of cups 
with the printer.

   However, I'm now runnning 'lenny' on my amd64 machine (and thus I 
have the same version of cups in both computers) and I still have the 
same problem.

   Since no one else is reporting this problem, I guess is something 
very specific to amd64.

   I could not find errors messages anywhere to help with 
the debugging... so please let me know how else can I help.

Thank you very much,

  Patricio 



-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages cups depends on:
ii  adduser  3.108   add and remove users and groups
ii  cups-common  1.3.7-7 Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0]1.5.22  Debian configuration management sy
pi  ghostscript  8.62.dfsg.1-2.1 The GPL Ghostscript PostScript/PDF
ii  libavahi-compat-libdnssd 0.6.22-3Avahi Apple Bonjour compatibility 
ii  libc62.7-10  GNU C Library: Shared libraries
ii  libcups2 1.3.7-7 Common UNIX Printing System(tm) - 
pi  libcupsimage21.3.7-7 Common UNIX Printing System(tm) - 
ii  libdbus-1-3  1.2.1-2 simple interprocess messaging syst
ii  libgnutls26  2.4.0-2 the GNU TLS library - runtime libr
ii  libkrb53 1.6.dfsg.3-2MIT Kerberos runtime libraries
ii  libldap-2.4-22.4.9-1 OpenLDAP libraries
ii  libpam0g 0.99.7.1-6  Pluggable Authentication Modules l
ii  libpaper11.1.23  library for handling paper charact
ii  libslp1  1.2.1-7.3   OpenSLP libraries
ii  lsb-base 3.2-12  Linux Standard Base 3.2 init scrip
ii  perl-modules 5.10.0-11   Core Perl modules
ii  procps   1:3.2.7-8   /proc file system utilities
ii  ssl-cert 1.0.20  simple debconf wrapper for OpenSSL
ii  xpdf-utils [poppler-util 3.02-1.3Portable Document Format (PDF) sui

Versions of packages cups recommends:
ii  avahi-utils   0.6.22-3   Avahi browsing, publishing and dis
ii  cups-client   1.3.7-7Common UNIX Printing System(tm) - 
ii  foomatic-filters  3.0.2-20080211-3.1 OpenPrinting printer support - fil
ii  smbclient 2:3.0.30-3 a LanManager-like simple client fo

-- debconf information:
  cupsys/raw-print: true
  cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp, dnssd



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]