Bug 720921 - cups-polld busy-loops in recvfrom() after suspend/resume
Summary: cups-polld busy-loops in recvfrom() after suspend/resume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 722259 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-13 08:56 UTC by Nils Philippsen
Modified: 2011-09-09 05:24 UTC (History)
4 users (show)

Fixed In Version: cups-1.4.8-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-03 02:39:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
excerpt of strace attached to affected cups-polld process (8.59 KB, text/plain)
2011-07-13 08:56 UTC, Nils Philippsen
no flags Details
Output of lsof attached to the affected process (3.12 KB, text/plain)
2011-07-13 08:58 UTC, Nils Philippsen
no flags Details
gdb backtrace of the affected process (6.93 KB, text/plain)
2011-07-13 09:01 UTC, Nils Philippsen
no flags Details
/etc/cups/cupsd.conf (2.78 KB, text/plain)
2011-07-13 09:02 UTC, Nils Philippsen
no flags Details
gdb affected process, up to frame #2, keep hitting next (2.96 KB, text/plain)
2011-07-13 09:16 UTC, Nils Philippsen
no flags Details
gdb affected process, print *http (1.89 KB, text/plain)
2011-07-13 09:17 UTC, Nils Philippsen
no flags Details
printing with problematic patch (753.69 KB, text/plain)
2011-08-30 11:41 UTC, Arkadiusz Miskiewicz
no flags Details
printing without problematic patch (967.08 KB, text/plain)
2011-08-30 11:41 UTC, Arkadiusz Miskiewicz
no flags Details

Description Nils Philippsen 2011-07-13 08:56:30 UTC
Created attachment 512603 [details]
excerpt of strace attached to affected cups-polld process

Description of problem:

Since updating to cups-1.4.7-3.fc15.x86_64, after resuming from Suspend-to-RAM, cups-polld burns 100% CPU, strace shows it's busy-looping in recvfrom().

Version-Release number of selected component (if applicable):
cups-1.4.7-3.fc15.x86_64
cups-1.4.7-6.fc15.x86_64 <-- all traces made with this one

How reproducible:
Reproducible

Steps to Reproduce:
1. Have BrowsePoll lines in cupsd.conf
2. Suspend to RAM
3. Resume
  
Actual results:
cups-polld busy loops in recvfrom() burning 100% CPU

Expected results:
Not sure, but not the above :-)

Additional info:
I have two BrowsePoll lines, one for the print server in the office, one for the one at home. Right now (being in the office), only the one for the office print server shows the described behavior.

Comment 1 Nils Philippsen 2011-07-13 08:58:27 UTC
Created attachment 512605 [details]
Output of lsof attached to the affected process

Comment 2 Nils Philippsen 2011-07-13 09:00:21 UTC
List of cups processes:

nils@gibraltar:~> ps auxw|grep cups| grep -v grep
lp       10548  0.0  0.0  58320  1604 ?        S    10:02   0:00 /usr/lib/cups/notifier/dbus dbus:// 
lp       10549  0.0  0.0  58320  1608 ?        S    10:02   0:00 /usr/lib/cups/notifier/dbus dbus:// 
root     18319  0.0  0.0 194960  2464 ?        Ss   Jul12   0:01 cupsd -C /etc/cups/cupsd.conf
lp       18320  0.0  0.0  58320  1064 ?        S    Jul12   0:00 cups-polld 10.0.0.2 631 30 631
lp       18321  3.1  0.0  64704  1316 ?        R    Jul12  45:27 cups-polld cups.str.redhat.com 631 30 631
nils@gibraltar:~>

Comment 3 Nils Philippsen 2011-07-13 09:01:00 UTC
Created attachment 512608 [details]
gdb backtrace of the affected process

Comment 4 Nils Philippsen 2011-07-13 09:02:30 UTC
Created attachment 512609 [details]
/etc/cups/cupsd.conf

Comment 5 Nils Philippsen 2011-07-13 09:16:21 UTC
Created attachment 512611 [details]
gdb affected process, up to frame #2, keep hitting next

Comment 6 Nils Philippsen 2011-07-13 09:17:27 UTC
Created attachment 512612 [details]
gdb affected process, print *http

Comment 7 Tim Waugh 2011-07-13 11:38:38 UTC
Please try cups-1.4.7-7.fc15.

Comment 8 Nils Philippsen 2011-07-14 08:07:38 UTC
Looks good to me, both cups-polld instances seem to be in a blocking system call instead of busy looping, according to strace. Thanks for the quick help!

Comment 9 Tim Waugh 2011-07-15 08:13:22 UTC
*** Bug 722259 has been marked as a duplicate of this bug. ***

Comment 10 Jiri Moskovcak 2011-07-15 08:29:23 UTC
(In reply to comment #9)
> *** Bug 722259 has been marked as a duplicate of this bug. ***

- probably the same bug, only I didn't do suspend/resume...

Comment 11 Fedora Update System 2011-07-20 16:38:06 UTC
cups-1.4.7-8.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/cups-1.4.7-8.fc14

Comment 12 Fedora Update System 2011-07-20 16:39:01 UTC
cups-1.4.7-9.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/cups-1.4.7-9.fc15

Comment 13 Fedora Update System 2011-07-22 19:35:37 UTC
Package cups-1.4.7-8.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cups-1.4.7-8.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/cups-1.4.7-8.fc14
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2011-08-03 02:39:16 UTC
cups-1.4.8-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2011-08-19 12:04:06 UTC
cups-1.4.8-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/cups-1.4.8-2.fc14

Comment 16 Arkadiusz Miskiewicz 2011-08-28 08:34:46 UTC
Doesn't this patch break things (like printing) if http authorization is required to access cups server?

Comment 17 Tim Waugh 2011-08-30 10:00:03 UTC
I don't believe so.  Authorization is handled in httpSendRequest() (http->status would be HTTP_UNAUTHORIZED in that case, not HTTP_ERROR).

Comment 18 Arkadiusz Miskiewicz 2011-08-30 11:40:05 UTC
Here we have a problem with this patch but didn't debug it deeply yet, so you can ignore this report since it's not on fedora (but most likely fedora people will also hit this).

"This patch causes auth to fail in a strange way.
I have, in my cupsd.conf on server:

<Location /printers/lp2040a>
  Encryption ifRequested
  AuthType Default
  Require valid-user
  Order allow,deny
  Allow localhost
  Allow ip1...
  ....
</Location>

Without this patch 'lp' on client nicely asks for a password and does
its job, with this patch 'lp' asks for a password and then prints 'lp: Unknown'
and nothing gets sent to printer.

It's probably caused by the server returning a HTML page in IPP response
when it claims that auth is required, and this patch makes client to
trip on this, instead of just ignoring it.

Attached are debug logs (CUPS_DEBUG_LEVEL=9) from running command 
'./lp -d lp2040a /etc/host.conf' with and without this patch applied."

Comment 19 Arkadiusz Miskiewicz 2011-08-30 11:41:04 UTC
Created attachment 520594 [details]
printing with problematic patch

Comment 20 Arkadiusz Miskiewicz 2011-08-30 11:41:35 UTC
Created attachment 520595 [details]
printing without problematic patch

Comment 21 Fedora Update System 2011-09-09 05:24:43 UTC
cups-1.4.8-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.