MASTER [Feisty] cupsd leaking file descriptors (was: Multiple jobs are not printed)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cupsys (Debian) |
Fix Released
|
Unknown
|
|||
cupsys (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Feisty |
Invalid
|
Undecided
|
Unassigned | ||
dbus (Ubuntu) |
Fix Released
|
High
|
Martin Pitt | ||
Feisty |
Fix Released
|
High
|
Martin Pitt |
Bug Description
When I send more than one job to printer, only the first job is printed.
Then I have to restart cupsys in order to be able to print the rest of jobs.
It is a simple solution but it could be a annoying solution for a new gnu/linux user.
I have a 116 Mb error_log file with a lot of lines like this:
E [06/May/
My system: Feisty
My printer: Epson Sytlus Color 600
Cupsys: 1.2.8-0ubuntu8
Pekka Jääskeläinen (pekka-jaaskelainen) wrote : | #1 |
misan (misan) wrote : | #2 |
Seems like Bug #113060 in cupsys (dupe)
misan (misan) wrote : | #3 |
- Output of lsof Edit (667.6 KiB, text/plain)
I was asked to provide the output of lsof when the problem happened to me.
Alan (alanrr-sr-yahoo) wrote : | #4 |
- lsof.output Edit (781.5 KiB, text/plain)
Same here, and after some time
lsof below... var directory has been filled by the log
Alan (alanrr-sr-yahoo) wrote : | #5 |
Sorry, forgot details
Ubuntu feisty, 64 bits, up to date (17/May/07)
Printer: Epson Stylus Color CX4100 (in Brazil) usb
misan (misan) wrote : | #6 |
Hi,
I'm including the output of my error_log once the problem is happening (now with the debug2 option activated). It goes over and over like the lines below till the harddisk is full (not funny):
d [22/May/
D [22/May/
D [22/May/
d [22/May/
d [22/May/
D [22/May/
d [22/May/
d [22/May/
d [22/May/
E [22/May/
d [22/May/
D [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
D [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
d [22/May/
D [22/May/
D [22/May/
d [22/May/
d [22/May/
D [22/May/
d [22/May/
d [22/May/
d [22/May/
E [22/May/
d [22/May/
Till Kamppeter (till-kamppeter) wrote : | #7 |
Can you run
sudo lsof -p `pidof cupsd`
and post the output.
misan (misan) wrote : Re: [Bug 112803] Re: Multiple jobs are not printed | #8 |
Sorry, I can't do this now as I restarted cupsys once the problem hit me,
but I'll do next time it strike me.
On 5/22/07, Till Kamppeter <email address hidden> wrote:
>
> Can you run
>
> sudo lsof -p `pidof cupsd`
>
> and post the output.
>
> --
> Multiple jobs are not printed
> https:/
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
misan (misan) wrote : | #9 |
Here you have the output requested (as it failed again).
On 5/22/07, Till Kamppeter <email address hidden> wrote:
>
> Can you run
>
> sudo lsof -p `pidof cupsd`
>
> and post the output.
>
> --
> Multiple jobs are not printed
> https:/
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
MauricioZ (mauricio-zunino) wrote : Re: Multiple jobs are not printed | #10 |
Hi,
my name is Mauricio and i would like join with you the problem that i haven too. The problem is that cupsys open to many files when there are more than one work in the queue ), that we know, why don´t close is the question. If you send a lot of files to the printer and execute this command "lsof |grep cupsys | wc -l " you see for each file cupsys open others that don´t close, that only resetting cups close the files. I'm so sorry about my languaje, it's because English isn't my first languaje. I wait that you can understand me.
Till Kamppeter (till-kamppeter) wrote : | #11 |
Reported upstream:
Till Kamppeter (till-kamppeter) wrote : | #12 |
Can you try the newest CUPS version by doing the following:
Download the attached files into one directory.
Do
sudo apt-get install build-essential
sudo apt-get build-dep cupsys
dpkg-source -x cupsys_
cd cupsys-1.2.11
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i *.deb
and try again. Does this solve your problem.
Till Kamppeter (till-kamppeter) wrote : | #13 |
Till Kamppeter (till-kamppeter) wrote : | #14 |
Till Kamppeter (till-kamppeter) wrote : | #15 |
Changed in cupsys: | |
status: | Unconfirmed → Needs Info |
cubells (cubells) wrote : | #16 |
I've installed the newest cups version:
$ sudo aptitude show cupsys
Paquet: cupsys
Estat: instal·lat
Instal·lat automàticament: no
Versió: 1.2.11-2ubuntu1
Prioritat: opcional
Secció: net
Mantenidor: Ubuntu Core Developers <email address hidden>
Mida descomprimit: 8569k
....
and I'll try again...
cubells (cubells) wrote : | #17 |
Hi,
I've tried it by sending about ten jobs into my printer queue and it works.
All jobs are printed and I haven't had to restart cupsys.
And I don't get any cups error message. Not even a line.
Thanks!
misan (misan) wrote : output of lsof for cupsd proc | #18 |
Till Kamppeter (till-kamppeter) wrote : Re: Multiple jobs are not printed | #19 |
Thank you, then this bug is fixed in Gutsy.
Changed in cupsys: | |
status: | Needs Info → Fix Released |
maxschulz (max-schulz-deactivatedaccount) wrote : Re: [Feisty] cupsd leaking file descriptors | #20 |
Does that mean there will be no official cupsys upgrade in feisty?
Markus Jonskog (omljud) wrote : | #21 |
In which version is this fixed? I'm using Gutsy and cupsys 1.2.11-2ubuntu1 and have the problem with too many open files and the log getting filled with:
Unable to accept client connection - Too many open files.
Unable to create job status pipes - Too many open files.
It can work fine for a couple of hours, and then suddenly the log file is growing like crazy.
maxschulz (max-schulz-deactivatedaccount) wrote : Re: [Bug 112803] Re: MASTER [Feisty] cupsd leaking file descriptors | #22 |
What you see is more probably bug 116673. While it has been marked as a
duplicate of this one, I doubt this is true. I also updated to 1.2.11
(in feisty), but still see the problem.
https:/
cubells (cubells) wrote : | #23 |
Markus said:
>>In which version is this fixed? I'm using Gutsy and cupsys 1.2.11-2ubuntu1 and have the problem with too many open files
Cupsys 1.2.11-2ubuntu1 fixed that problem in my Feisty: https:/
Now I have no problem with my printer...
Kirk Steffensen (kirk-steffensen) wrote : | #24 |
I think that what Till said should read:
sudo apt-get install build-essential fakeroot
sudo apt-get build-dep cupsys
sudo dpkg-source -x cupsys_
cd cupsys-1.2.11
sudo dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i *.deb
Thanks1
Sean Clarke (sean-clarke) wrote : | #25 |
Is there going to be an official backport/fix for Fiesty ?
Kirk Steffensen (kirk-steffensen) wrote : | #26 |
I have changed the status of this bug back to "Confirmed" from "Fixed Released" because I'm still seeing it after updating my Feisty to cupsys_
Last night I upgraded our Edubuntu Feisty server to 1.2.11 per the instructions above. No problems on the compile. But this morning cupsys stopped and began filling /etc/var/
Here are the first few lines of the cups error_log:
E [07/Jun/
E [07/Jun/
E [07/Jun/
E [07/Jun/
E [07/Jun/
E [07/Jun/
E [07/Jun/
E [07/Jun/
E [07/Jun/
E [07/Jun/
The last line repeats for the rest of the file at several hundred KB per minute.
I forgot to do an lsof while cups was dead. The next time it dies, I will do it. Is there any other information that would be helpful for troubleshooting?
Thanks for looking into this.
Changed in cupsys: | |
status: | Fix Released → Confirmed |
Kirk Steffensen (kirk-steffensen) wrote : | #27 |
- Output from "sudo lsof -p $(pidof cupsd) > cupsys_lsof" Edit (54.7 KiB, text/plain)
cupsys_
I've attached an output from "lsof -p $(pidof cupsys)". This shows about 700 open pipes. About 50 jobs have been printed since cupsd was restarted.
I'm running two printers, both over the network: HP 1022N and Minolta Pi3500.
Hope this helps. Please let me know any other diagnostics to try.
cubells (cubells) wrote : | #28 |
I have not had any problem since I installed cupsys 1.2.11-2ubuntu1 as Till said...
If you need any information about my system to compare, you only have to say it...
Kirk Steffensen (kirk-steffensen) wrote : | #29 |
I forgot to say that I'm running the AMD64 kernel. Doesn't seem like it should matter, but you never know.
(As a temporary work-around, I've added a cron job to root's crontab that restarts cupsys every 10 minutes. It works for now, but is not very elegant.)
Thanks.
Carey (carey) wrote : | #30 |
I am also experiencing this exact problem. So I followed Kirk's instructions to upgrade to 1.2.11, but just like Kirk, it does not fix the problem for me. The problem persists with cupsys 1.2.11.
$ apt-cache policy cupsys
Installed: 1.2.11-2ubuntu1
$ tail -f /var/log/
E [09/Jun/
cubells (cubells) wrote : | #31 |
Now we have a new cups version: 1.2.11-2ubuntu2
http://
Can you try it??
Carey (carey) wrote : | #32 |
How would be the best way to try this new version?
cubells (cubells) wrote : | #33 |
Download the gutsy package and install it...
or follow Kirk's instructions with:
http://
http://
http://
Kirk Steffensen (kirk-steffensen) wrote : | #34 |
Sorry, no joy with cupsys_
Compile and install went well again, but then it had the exact same symptoms. It's still spawning about 10 FIFO pipes per job that it never closes.
Flavor: Edubuntu
Version: 7.04
Kernel: AMD64
Thanks for continuing to look into this.
Blade (johnblade) wrote : | #35 |
Yes I've had to have cups restart every minute to work on a server. I'm looking into trying to install the previous edgy version for a workaround.
Blade (johnblade) wrote : | #36 |
Recompiling Edgy's cupsys 1.2.4 works as a workaround. Was tired of restarting cups servers.
# wget http://
# wget http://
# wget http://
# dpkg-source -x cupsys_
# cd cupsys-1.2.4
# dpkg-buildpackage -rfakeroot
# cd ..
# sudo dpkg -i *.deb
This is a fairly serious error though. Without a workaround it prevents ubuntu 7.10 to be even considered as a printing server.
Blade (johnblade) wrote : | #37 |
Recompiling Edgy's cupsys 1.2.4 works as a workaround. Was tired of restarting cups servers.
# wget http://
# wget http://
# wget http://
# dpkg-source -x cupsys_
# cd cupsys-1.2.4
# dpkg-buildpackage -rfakeroot
# cd ..
# sudo dpkg -i *.deb
This is a fairly serious error though. Without a workaround it prevents ubuntu 7.04 to be even considered as a printing server.
Sebastian Berthold (sleif) wrote : | #38 |
Hello, the same problem on my cups server:
cups version from feisty and current gutsy
Ubuntu Version: 7.04
Linux 2.6.19-4-server #2 SMP Thu Apr 5 06:07:34 UTC 2007 i686 GNU/Linux (xen domU)
MauricioZ (mauricio-zunino) wrote : | #39 |
I tried with cups 1.2.4 as did you say Blade, but it then had the exact same symptoms in my system Feisty (7.04). Cups still crash!
Mauricio
Markus Jonskog (omljud) wrote : | #40 |
Same here. Upgraded from edgy to feisty and the problem showed up. Upgraded to cups to 1.2.11. Still problems. Upgraded whole machine to gutsy. No good. Downgraded cups in gutsy to 1.2.4. Still same problem.
MauricioZ (mauricio-zunino) wrote : Cups run OK | #41 |
I FOUND THE SOLUTION!!! or at least the way to make that cups work... You have to run in a XTERM (this is important, non in a text console, have to be in a XTERM )..."invoke-rc-d cupys restart". The service "cupsys" have to start in a graphic ambient, for example gnome like i do.. I am using cups 1.2.11 and this is working ... It is not a solucion for this bug, but is a way to make run fine....
Saludos
Mauricio
diaboflo (ubuntu-diaboflo) wrote : cupsys_1.2.11 doesn't work either | #42 |
i upgrade to cupsys_1.2.11 following Kirks instruction but it stops working:
A print error occurred. Error message received from system:
cupsdoprint -P 'FLO_HP_1200' -J 'Haupttext.ps' -H '/var/run/
client-
Till Kamppeter (till-kamppeter) wrote : | #43 |
I posted another upstream bug report:
http://
Can everyone who has still the file descriptor leaking problem supply his error_log (set "LogLevel" to "debug" in /etc/cups/
Changed in cupsys: | |
status: | Confirmed → Needs Info |
Kirk Steffensen (kirk-steffensen) wrote : | #44 |
Till,
Just to clarify, do you only need the error log up to the point where it starts endlessly repeating?
Till Kamppeter (till-kamppeter) wrote : | #45 |
Yes, from the repeats include only one and tell what is repeating.
Till Kamppeter (till-kamppeter) wrote : | #46 |
Can you please supply everything asked for by Mike Sweet (author of CUPS) in the upostream bug report?
Till Kamppeter (till-kamppeter) wrote : | #47 |
Pitti, can you check whether this problem can be caused by your non-root patches?
Changed in cupsys: | |
importance: | Undecided → Medium |
maxschulz (max-schulz-deactivatedaccount) wrote : Re: [Bug 112803] Re: MASTER [Feisty] cupsd leaking file descriptors | #48 |
OK here we go. At the moment it looks like the problem only exists when
I boot up the system, on first start of cupsys. After restarting cupsys
it doesn't seem to leak anymore.
At the moment, after 20min uptime, cupsd already has 62 file descriptors
open:
cupsd 6260 cupsys 0r CHR 1,9 3993 /dev/urandom
cupsd 6260 cupsys 1u REG 8,2 6774 130708
/var/log/
cupsd 6260 cupsys 2u IPv4 23369 TCP localhost:ipp
(LISTEN)
cupsd 6260 cupsys 3u unix 0xf78dae40 23370
/var/run/
cupsd 6260 cupsys 4r FIFO 0,6 23372 pipe
cupsd 6260 cupsys 5w FIFO 0,6 23372 pipe
[...]
cupsd 6260 cupsys 60r FIFO 0,6 29564 pipe
cupsd 6260 cupsys 61r FIFO 0,6 29747 pipe
cupsd 6260 cupsys 62r FIFO 0,6 29750 pipe
cupsd.conf is attached. My printers.conf:
# Printer configuration file for CUPS v1.2.4
# Written by cupsd on 2007-04-02 13:29
<Printer dj3650>
Info HP DeskJet 3650 hpijs
DeviceURI ipp://192.
State Idle
StateTime 1174661163
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>
<DefaultPrinter dj3650_lokal>
Info HP Deskjet 3650
Location Büro
DeviceURI hp:/usb/
State Idle
StateTime 1175513390
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>
/var/log/
D [21/Jun/
event...
I [21/Jun/
"/var/cache/
I [21/Jun/
I [21/Jun/
I [21/Jun/
"/etc/cups/
I [21/Jun/
/var/spool/
I [21/Jun/
"/var/spool/
I [21/Jun/
I [21/Jun/
host.
I [21/Jun/
I [21/Jun/
I [21/Jun/
'/usr/share/
D [21/Jun/
D [21/Jun/
D [21/Jun/
cache.
I [21/Jun/
"/var/cache/
D [21/Jun/
D [21/Jun/
D [21/Jun/
D [21/Jun/
D [21/Jun/
D [21/Jun/
D [21/Jun/20...
MauricioZ (mauricio-zunino) wrote : | #49 |
I remove /etc/rc2.
Saludos
Mauricio
Till Kamppeter (till-kamppeter) wrote : | #50 |
mstreibe, and anyone else who has reported this problem, can you please set the LogLevel to "debug2" (not simply "debug") in cupsd.conf, restart CUPS again (or reboot) and then supply the error_log as soon as the problem occures again? The extra info which "debug2" supplies is very important.
maxschulz (max-schulz-deactivatedaccount) wrote : | #51 |
I have no idea why but at the moment cupsd is not leaking file
descriptors anymore here. I'll provide the data as soon as I see the
problem again.
DonB (donbivens) wrote : | #52 |
I can confirm that this is not fixed in the latest updates on Gutsy. What makes this really difficult is my customer has a proprietary app on SCO that we ported to Linux and I setup SAMBA and told him all about Linux goodness but his printing dies a couple times a day now :(
cubells (cubells) wrote : | #53 |
- cubells.tar.gz Edit (521.5 KiB, application/x-tar)
==> Till:
Here you have attached my error_log file (+28 Mb without compression ) after set the LogLevel to debug2 in cupsd.conf and I can confirm that the bug is not fixed.
I've also attached the output from "sudo lsof | grep cupsys" and a capture when the bug is on and I try to print from Evince.
I wish it was useful for solving the problem...
If you need any data
If you need any other data, only you have to say it because I can replay the bug... Now I hnow how...
Till Kamppeter (till-kamppeter) wrote : | #54 |
Thank you. I have reopened the issue upstream at
http://
and attached all your files.
Changed in cupsys: | |
status: | Incomplete → Triaged |
Jens Braeuer (jens-braeuer) wrote : | #55 |
The issue also has a ticket in the debian bugtracker: http://
Till Kamppeter (till-kamppeter) wrote : | #56 |
We need a test with a CUPS version which does not have the numerous patches as the Ubuntu version has.
Can you try the following:
Download
http://
or
http://
depending on whether you are using the 32-bit or 64-bit PC platform.
Convert the package to the Debian format:
sudo apt-get install alien
sudo alien --scripts cups-*.rpm
Install this package:
sudo dpkg -i cups_*.deb
Transfer your print queues to the new CUPS:
sudo cp /etc/cups/
sudo cp /etc/cups/ppd/*.ppd /etc/opt/cups/ppd/
Stop the system's CUPS
/etc/init.d/cupsys stop
and start the new CUPS
/etc/init.d/cups start
(NOTE: only "cups" not "cupsys" here).
Try to print and observe whether the memory leak appears again.
Till Kamppeter (till-kamppeter) wrote : | #57 |
I forgot one thing:
Before installing the CUPS package, you need to install the LSB compatibility package:
sudo apt-get install lsb
Till Kamppeter (till-kamppeter) wrote : | #58 |
- Patch to move authentication into external SUID root program Edit (8.4 KiB, text/plain)
See Mike's comment and my last comment in
http://
I have looked into the patches of the Ubuntu CUPS package and the relevant patch (8 KB) is attached. The patch separates the verification of the credentials into an external program which runs SUID root (as CUPS runs as user in Ubuntu). Username and password are sent via a pipe to the standard input of the external program (newly introduced function "cupsdCallPamAu
The patch is one of Martin Pitt's non-root mode patches, therefore assigning to Martin Pitt.
Changed in cupsys: | |
assignee: | nobody → pitti |
importance: | Medium → High |
Till Kamppeter (till-kamppeter) wrote : | #59 |
I think this bug is worth an SRU. It breaks an important function of Feisty (Printing) and the fix is probably small (inside an 8-KB patch).
cubells (cubells) wrote : | #60 |
==> Till
Just in case, I've tried your instructions:
$ sudo aptitude install lsb
I've downloaded http://
$ sudo alien --scripts *.rpm
$ sudo dpkg -i *.deb
$ sudo cp /etc/cups/
$ sudo cp /etc/cups/ppd/*.ppd /etc/opt/cups/ppd/
$ sudo /etc/init.d/cupsys stop
* Stopping Common Unix Printing System: cupsd [ OK ]
$ sudo /etc/init.d/cups start
cups: started scheduler.
And I can't print!!
Martin Pitt (pitti) wrote : | #61 |
I just uploaded
cupsys (1.2.12-1ubuntu1) gutsy; urgency=low
.
* Merge to Debian's svn head to get upstream fixes.
* debian/
errors, too. This can not really be responsible for the mess in #112803,
but should be fixed anyway.
This fixes the only pipe handling bugs that I can see. In the 'normal' case, pipes were already closed properly in that patch.
I am not able to reproduce the issue. I tried a standard USB printer and a file:// target, tried on the command line with and without specifying a host, tried printing from a Gnome app (gedit), and played around with administrative commands in the web interface. None of these actions produced additional FIFOs (just the two that are always open, and an additional one when a print job was running).
Do you use remote or local printing? Can someone please attach /etc/cups/
Changed in cupsys: | |
status: | Triaged → Incomplete |
cubells (cubells) wrote : | #62 |
- cupsd+printers_conf.tar.gz Edit (1.5 KiB, application/x-tar)
==> Martin
Here you have attached the files you have requested...
To reproduce this bug only I have to send to the printer many different jobs consecutively with an interval of some seconds.
For example, the last time I reproduce the bug, I send 10 jobs with an interval of 4/5 seconds...
My printer is a Epson Stylus color 600, a serial printer...
cubells (cubells) wrote : | #63 |
Sorry: I use local printing..
Changed in cupsys: | |
status: | Unknown → Fix Released |
Christian Niessner (ubuntu-christian-niessner) wrote : | #64 |
Hi There,
i'm joining this thread because i also have this problem on some of my cups machines. I have several cups servers running, and the 'socket eating' problem only occures on some of them, not on all.
I started debugging by myself and discovered that my fd eating problem is originated from dbus. I strace'd cupsd and discovered following (on the 'fd eating machin'):
every time when i spool a job, libdbus seems to executes dbus-launch:
pipe([15, 16]) = 0
clone(Process 4232 attached
child_stack=0, flags=CLONE_
[pid 4229] close(16) = 0
[pid 4229] read(15, <unfinished ...>
[pid 4232] open("/dev/null", O_RDWR) = 17
[pid 4232] close(15) = 0
[pid 4232] close(0) = 0
[pid 4232] close(1) = 0
[pid 4232] close(2) = 0
[pid 4232] dup2(17, 0) = 0
[pid 4232] dup2(16, 1) = 1
[pid 4232] dup2(17, 2) = 2
[pid 4232] close(17) = 0
[pid 4232] close(16) = 0
[pid 4232] execve(
"--binary-syntax"], [/* 17 vars */]) = 0
[pid 4232] brk(0) = 0x804e000
[removed lots of stuff]
[pid 4232] mprotect(
[pid 4232] munmap(0xb7f8f000, 15871) = 0
[pid 4232] brk(0) = 0x804e000
[pid 4232] brk(0x806f000) = 0x806f000
[pid 4232] write(2, "Autolaunch error: X11 initializa"..., 45) = 45
[pid 4232] exit_group(1) = ?
Process 4232 detached
<... read resumed> "", 1024) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn() = ? (mask now [])
waitpid(4232, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 4232
time(NULL) = 1181048565
write(4, "D [05/Jun/
after that, fd 15 stays open. ( 15 -> pipe:[60116] )
I think this is rather a libdbus bug not a cups bug.
on my 'good' machine i see an initinal connect to /var/run/
I have no idea why it works for some machines and for some not. dbus itself is up and running on all machines.
can somebody also experiencing fd eating verify this issue by doing following:
/etc/init.d/cupsd stop
strace -f cupsd 2>strace.log
lp /etc/hosts (on other terminal)
and then have a look into the strace.log if there are dbus-launch calls or not?
thanks,
chris
Frank (fdelin) wrote : | #65 |
I only found out about this bug last night as we were putting the new Fiesty print server into production. I ran the strace and also see execve(
maxschulz (max-schulz-deactivatedaccount) wrote : | #66 |
I have documented the same some time ago in another bug report, see
https:/
But for some reason I don't see this problem anymore on my system. My
cupsd now has 5 open files while it is idle. Something must have changed
in the configuration but I'm not able to track this back.
Joachim Schwender (jschwender) wrote : | #67 |
I am running here clustered X-terminal servers with cups on it as print service. I have the problem with feisty version as well as with the 1.2.11 (compiled as recommended above). I can contribute this: when i have a stalled print job, i see one additional pipe handle each time cups tries to reprint or reconnect to the printer. This way i the open file number is exceeded within minutes, you can watch it online. A cupsys force-reload brings the number of pipes back to two. Until the bug is fixed i have a small script driven by cron which does this reload when the number of pipes exceeds 50. That is not nice, but it prevents cups from getting quickly unusable. With Debian Etch file servers i do not see a similar problem. I desperately hope that someone can fix this...soon.
Joachim Schwender (jschwender) wrote : | #68 |
I should mention that the two debian etch boxes on which cups is ok, uses version 1.2.12 with a reduced set of debian patches:
02_configure.dpatch
03_clean.dpatch
06_disable_
08_cupsd.
09_runasuser.dpatch
11_pam.dpatch
12_quiesce_
19_cupsaccept.
47_pid.dpatch
53_usr_
54_cups-
60_device_
64_driverfolder
67_printcap.dpatch
68_edit-
I did not test the debian package. When i find the time, i will try to compile same version on kubuntu to see if that works.
schweini (schweini) wrote : | #69 |
I tried Blades workaound (installing Edgys package), but i just get a bunch of build-errors.<br>
<br>
Can anybody confirm or deny that this will soon be fixed in the regular (K)Ubunto repos? Im deploying a couple of small buisiness servers, and was planing on using Kubuntu, but iĺl have to wait til at least printing is working fine. And its quite a drag to restart cups via cron every couple of minutes, just in case.
So, anyone have a rough date on when this will get deployed? according to the debian ticket, it seems rather easy to resolve...
hugortega (hugortega) wrote : | #70 |
Just in case, meanwhile the fix is released, an ugly but effective script to restart the cupsd when the number of pipes is high:
-------------------
#! /bin/bash
pipes=$(sudo lsof -p `pidof cupsd` | grep pipe | wc -l)
maxpipes=30
if [[ $pipes -gt $maxpipes ]] ; then
echo "Reiniciando servidor CUPS"
date >> /var/log/
/etc/
fi
-------------------
Of course, you can drive the file with cron... this script logs the date and time of the events.
Any news about the fix?... I'm trying to introduce ubuntu server as the default server in my company, but those things are not exactly the best publicity :D ... anyway, thanks for ubuntu people...
Martin Pitt (pitti) wrote : Re: [Bug 112803] Re: MASTER [Feisty] cupsd leaking file descriptors (was: Multiple jobs are not printed) | #71 |
hi,
schweini [2007-07-24 22:14 -0000]:
> So, anyone have a rough date on when this will get deployed? according
> to the debian ticket, it seems rather easy to resolve...
So far I was unable to reproduce the bug, and the Debian ticket
suspected the pam helper as the culprit, which was not confirmed.
So until a developer can actually reproduce this, there is no firm
schedule. As soon as we have a solution, we will deploy it for Feisty
as well, of course.
Christian Niessner (ubuntu-christian-niessner) wrote : | #72 |
- list of installed packages Edit (9.1 KiB, application/octet-stream)
Hi Martin,
Hi all,
I investigated a bit more, and (at least for my setups) it seems that libdbus is the culprit.
In my setup, there are several cups servers up and running. The on running on my Workstation works fine - and my workstation is a 'full grown installation' with X-Servers, Gnome and all that stuff.
But the stripped down printservers suffer from this problem. I think it depends on what is installed and what not.
I recompiled cups packages (the original feisty ones and 1.2.12 from gusty) with --disable-dbus and the file descriptor leak was gone for all my systems.
On one system that was previously working with the original feisty packages, the fd leaking started after installing additional printer drivers (cups-driver-
i attach a list of installed packages of one of my servers. don't get confused - the installed cups packages are mine, taken from gusty and compiled with dbus disabled on feisty. But the fd leak starts as soon as i install the original feisty packages.
Hope this helps reproducing the bug. I also could do some further debugging / investigation if needed. Shall we involve dbus people?
have a nice day,
chris
Joachim Schwender (jschwender) wrote : | #73 |
I have also compiled a package from 1.2.12 and added those patches from 1.2.11 (gusty) that patched successfully, but compiled with --enable-dbus, and it works! The number of file descriptors is back to 2 after each print job. I have installed cups-driver-
cubells (cubells) wrote : | #74 |
- cups_bug.tar.gz Edit (1.6 MiB, application/x-tar)
==> So until a developer can actually reproduce this, there is no firm schedule. (Martin said)
See the file I've attached, please.
To reproduce the bug in my work computer I've just:
1) opened the file document.odt with OpenOffice.org writer.
2) clicked in "Print directly" icon
3) closed the Openoffice.org writer
4) opened the file document.odt with OpenOffice.org writer.
5) clicked in "Print directly" icon
6) closed the Openoffice.org writer
7) ...
and so on about ten times.
So, the bug "works" on my home and on my work computer, that is, I can reproduce the bug in a <b>different computer</b>, in <a>a different lan</b>, in <b>a different printer</b>, and with <b>a very different sotware installed</b>.
My printer at work is a usb printer: Epson stylus D78. So, I can reproduce the bug in a serial and in a usb printer.
I've attached 3 different files: lsof.before and error_log.before,
files that I can logged <b>before</b> uninstalling cups (exactly the following packages: cupsys, bluez-cups, cups-pdf, cupsys-
lsof.after and error_log.after, files that I can logged <b>after</b> reinstalling cups (exactly the following packages: hpijs-ppds, python-imaging, python-qt3, python-reportlab, python-sip4, bluez-cups, cupsys, cupsys-
And finally: lsof.bug and error_log.bug, files that I can logged after restart my computer.
At lsof_error_bug I've reproduced the bug twice: from the time 11:54 to 12:26 aprox., and from the time 12:26 to the end of the file.
Both times, cups stops printing after 6-9 jobs printed.
Both times, I've obtained the same cups error: Unable to create job filter pipes - Too many open files.
Both times, I've had to restart cups to be able to print again.
In any moment, I've obtained any message error about dbus.
I've attached my dpkg-selections to compare with Christian logs...
Something more?
Changed in cupsys: | |
assignee: | nobody → pitti |
importance: | Undecided → High |
Martin Pitt (pitti) wrote : | #75 |
I still could not determine how to trigger that problem with a normal system, however, with some incredible hideous hacks in dbus I was able to force this condition (calling dbus-launch).
I verified that the problem is indeed that _dbus_get_
This has been fixed in gutsy recently with dbus 1.1.1. The patch for Feisty is trivial, will prepare an SRU now.
Changed in cupsys: | |
status: | New → Unknown |
status: | Incomplete → Fix Released |
Changed in dbus: | |
status: | New → Fix Committed |
Martin Pitt (pitti) wrote : | #76 |
- SRU debdiff Edit (1.7 KiB, text/plain)
Thanks a lot to everyone for your help with debugging this!
I uploaded a fixed dbus to feisty-proposed, it should be available in about two hours. Can you please test the packages from feisty-proposed and confirm that they fix this issue? If we get some confirmations, the package can go to feisty-updates next Thursday.
I attach the debdiff used for this stable release update.
Martin Pitt (pitti) wrote : | #77 |
dbus (1.0.2-1ubuntu4) feisty-proposed; urgency=low
* Add debian/
- _dbus_get_
close the reading end of the pipe.
- This caused a serious fd leak in programs like cups when they repeatedly
try to send dbus messages, dbus is not running, and dbus-launch is not
available or otherwise fails to execute.
- LP: #112803
-- Martin Pitt <email address hidden> Thu, 26 Jul 2007 11:08:35 +0200
Changed in dbus: | |
status: | Fix Committed → Fix Released |
Roberto (roberto-colnaghi) wrote : | #78 |
Hi folks, I'm new around here.
I have the same problem, but I noticed that cupsys doesn't depend on dbus, in fact I don't even have it installed on my server. So, I'm wondering how a dbus update can solve the problem. Am I missing something?
Roberto
Martin Pitt (pitti) wrote : | #79 |
Hi Roberto,
Roberto Colnaghi [2007-07-26 11:28 -0000]:
> Hi folks, I'm new around here. I have the same problem, but I
> noticed that cupsys doesn't depend on dbus, in fact I don't even
> have it installed on my server. So, I'm wondering how a dbus update
> can solve the problem. Am I missing something?
It depends on libdbus-1-3, which is at fault here. It tries to start a
dbus instance, fails (because dbus itself is not installed), and
forgets to clean up the pipes.
Roberto (roberto-colnaghi) wrote : | #80 |
Thank you Martin. So, either the problem lies in libdbus-1-3, and this is the package that should be updated, or cupsys requires dbus, but the dependency is not present, so a cupsys package update (to include the dependency) is needed.
Roberto
Martin Pitt (pitti) wrote : | #81 |
Hi Roberto,
Roberto Colnaghi [2007-07-26 13:26 -0000]:
> Thank you Martin. So, either the problem lies in libdbus-1-3, and this
> is the package that should be updated, or cupsys requires dbus, but the
> dependency is not present, so a cupsys package update (to include the
> dependency) is needed.
The problem *is* in libdbus-1-3. Sorry for the confusion if I was
unclear. I was speaking about the source package 'dbus' sometimes
(which produces the library, too).
cupsys should not depend on dbus at all. It should just provide the
notification service if dbus is installed.
Frank (fdelin) wrote : | #82 |
Thanks Martin. Will this patch result in a new package being released or do I need to manually compile this?
Thanks,
Frank
cubells (cubells) wrote : | #83 |
Hi all,
I've tested the packages from feisty-proposed twice and i can confirm that the bug is fixed!!
My cups server works correctly and I can print all my jobs without having to restart cupsys.
Thanks a lot!!
Frank (fdelin) wrote : | #84 |
Hi all,
I also got the libdbus-
Everything looks ok, a wc -l of my lsof -p stayed steady at 43 as I shot a dozen or so jobs at it.
Thanks so much.
Changed in cupsys: | |
status: | Unknown → Fix Released |
Michael Vogt (mvo) wrote : | #85 |
I installed the update today for SRU verficiation, it installs/works fine for me. I can not reproduce the original bug, but I'm happy to set it to verification-done on the grounds that two community people already reported that it fixes the bug and that Martin was able to reproduce the bug and verify the fix.
Changed in dbus: | |
status: | Fix Released → Fix Committed |
Roberto (roberto-colnaghi) wrote : | #86 |
I've installed the package on Friday the 27th of July , and this seems to have solved the problem on our server too.
Roberto
Martin Pitt (pitti) wrote : | #87 |
Closing invalid cupsys task (whoever added it).
Changed in cupsys: | |
status: | New → Invalid |
status: | New → Invalid |
Martin Pitt (pitti) wrote : | #88 |
Copied dbus to feisty-updates.
Changed in dbus: | |
status: | Fix Committed → Fix Released |
hugortega (hugortega) wrote : | #89 |
I installed the patch in 2 servers (ubuntu server 7.04) and everything is OK now... thank you very much to all people who contributed to the fix.
EOF
Li Tong (li-airotech) wrote : | #90 |
Hi, I am new here, can someone tell me where I can find the patch talked about in this thread? Thanks!!
I'm seeing a similar bug after upgrade to Feisty. Seems like quite nasty regression.