Bug 421671 - With MaxJobs=0, PreserveJobFiles=On cupsd uses 100% CPU
With MaxJobs=0, PreserveJobFiles=On cupsd uses 100% CPU
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
19
All Linux
low Severity high
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: F10Target 459700
  Show dependency treegraph
 
Reported: 2007-12-12 09:47 EST by Opher Shachar
Modified: 2014-10-03 23:21 EDT (History)
1 user (show)

See Also:
Fixed In Version: cups-1.7.5-4.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-02 23:57:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
CUPS Bugs and Features 2913 None None None Never

  None (edit)
Description Opher Shachar 2007-12-12 09:47:12 EST
Description of problem:
On our production system we use a dedicated 2 dual core Xeon 2GB RAM server for 
printing (e.g. the server runs no service save CUPS).
In cupsd.conf we have:
   MaxJobs 0
   PreserveJobFiles On
and a daily cron script that purges jobs 14 days old.
On average we have 17,000 jobs in history.
Using the web interface if we click "Show all jobs" the cupsd process will hug 
100% of the CPU (1 core out of four) for 260 seconds (~4.5 minutes)!
During this time clients submitting print jobs (via lp) hang (the lp command 
doesn't fail), print jobs are not sent to idle/ready printers.
The same behavior is exhibited with commands such:
   lpstat -Wall -u
or
   lpstat -Wall -o MyPrinter

Thanks,
Opher Shachar,
LADPC Ltd.

Version-Release number of selected component (if applicable):
1.2.12-1

How reproducible:
Very.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Tim Waugh 2007-12-14 11:42:06 EST
I have not yet been able to reproduce the problem here.

There is a large delay when fetching information for jobs where which-jobs=all,
and this is due to the fact that CUPS must load the completed jobs from the file
system each time this operation is performed.  However, during this delay cupsd
is not processor-bound but disc-bound (i.e. usually state 'D' in the output of
ps, not 'R').

May I ask what MIME file types your print jobs are?  For instance, what output
does this command give, when run as root?:

ls -1 /var/spool/cups/d* | head -n1 | xargs file

The reason I ask is that when CUPS loads the completed jobs it seems to perform
automatic file-type detection in some cases, and I wonder if that's the case here.
Comment 2 Opher Shachar 2007-12-16 05:21:53 EST
Hi,
The vast majority of print files are 
prd:/var/spool/cups# find . -name "d*" | sort | head -n2 | xargs file
./d96486-001: ISO-8859 text
./d96487-001: ISO-8859 text, with escape sequences
If it's relevant, some of the files are large 7MB+.

(incidentally,
    ls -1 d* | head -n1 | xargs file 
 gives: 
    d96486-001:   ERROR: cannot open `d96486-001' (No such file or directory)
)

We've tried lowering the number of files by deleting files older than 7 then 
6,5... days old from /var/spool/cups, after each time running:
   service cups reload
we noticed the time the CPU spent at 100% decreasing from 130 seconds, for 9600 
jobs, to 17 seconds for 1309 jobs.
Also as we lowered the number of files, cupsd was sending ready print jobs to 
printers (top showed entries of backends) but, still, new job submissions - 
using lp - hang while cupsd was at 100%.

We set MaxJobs=1000 in cupsd.conf and restarted cups (after work hours)
   service cups restart
the response, to lpstat -Wall -o, now was instantaneous (I had expected a 4 
second delay). It is running for 2.5 days now (with MaxJobs=1000) and the 
problem did not reappear.

Obviously we can't have our production system slagging neither is limiting the 
history to 1000 jobs too great. So, we're still in need for a solution.

Sincerely,
Opher Shachar,
LADPC Ltd.
Comment 3 Tim Waugh 2007-12-17 09:51:16 EST
Changing version to 7.  Fedora Core 6 has reached its end-of-life; however this
problem remains in (at least) Fedora 7.
Comment 4 Bug Zapper 2008-05-14 11:09:27 EDT
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Tim Waugh 2008-05-14 11:25:23 EDT
Changing version to '8'.
Comment 6 Tim Waugh 2008-09-24 10:53:23 EDT
Patch filed upstream.
Comment 7 Bug Zapper 2008-11-25 21:04:08 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Bug Zapper 2009-11-18 04:33:01 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Bug Zapper 2010-04-27 07:51:24 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Tim Waugh 2010-04-27 08:07:14 EDT
Still affects Fedora 12.
Comment 11 Bug Zapper 2010-11-04 08:03:58 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Opher Shachar 2010-11-04 09:28:07 EDT
This bug is marked '1.5-feature' upstream, so it will evetually be fixed.
Tim, should it not survive being closed here?
Comment 13 Tim Waugh 2010-11-04 13:39:50 EDT
Changing version to rawhide.
Comment 14 Tim Waugh 2012-01-03 11:38:02 EST
Changing version to 15.
Comment 15 Tim Waugh 2012-07-16 12:29:25 EDT
Changing version to 16.
Comment 16 Fedora End Of Life 2013-01-16 20:25:34 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 17 Fedora End Of Life 2013-07-04 02:55:02 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 18 Fedora End Of Life 2013-08-01 14:35:35 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 19 Tim Waugh 2014-08-20 05:42:46 EDT
Re-opening as there is an upstream patch to address this now.
Comment 20 Fedora Update System 2014-08-21 07:34:19 EDT
cups-1.7.5-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/cups-1.7.5-3.fc20
Comment 21 Fedora Update System 2014-08-21 07:34:51 EDT
cups-1.6.4-9.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/cups-1.6.4-9.fc19
Comment 22 Fedora Update System 2014-08-22 21:55:16 EDT
Package cups-1.7.5-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cups-1.7.5-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9673/cups-1.7.5-3.fc20
then log in and leave karma (feedback).
Comment 23 Fedora Update System 2014-10-02 23:57:00 EDT
cups-1.6.4-10.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Fedora Update System 2014-10-03 23:21:33 EDT
cups-1.7.5-4.fc20 has been pushed to the Fedora 20 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.