Comment 64 for bug 112803

Revision history for this message
Christian Niessner (ubuntu-christian-niessner) wrote :

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_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7c0c918) = 4232
[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("/usr/bin/dbus-launch", ["dbus-launch", "--autolaunch", "c240c094f96d50bd8cca400046655800"...,
"--binary-syntax"], [/* 17 vars */]) = 0
[pid 4232] brk(0) = 0x804e000
[removed lots of stuff]
[pid 4232] mprotect(0xb7e98000, 4096, PROT_READ) = 0
[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/2007:15:02:45 +0200] D"..., 70) = 70

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/dbus/system_bus_socket during startup and that's it. no further dbus-launch forks and so on.

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