Bug 266213 - File descriptor leak kpackagekiticon <-> dbus
Summary: File descriptor leak kpackagekiticon <-> dbus
Status: RESOLVED DUPLICATE of bug 261180
Alias: None
Product: kpackagekit
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Steven M. Parrish
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-13 18:14 UTC by kdebugreport
Modified: 2011-07-28 15:03 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kdebugreport 2011-02-13 18:14:24 UTC
Version:           unspecified (using KDE 4.5.5) 
OS:                Linux

dbus-daemon hits 1024 file descriptors fairly frequently (and thus wedges up several other things).  Generally I log out and back in to start a new dbus-daemon, but I've discovered that kpackagekiticon also had almost 1000 fds, and killing it reduced dbus-daemon's open fds by about that number, to below 100:

cd /proc; do echo $i `ls $i/fd 2>/dev/null|wc`;done | awk '$2 > 300 { print $0 }'
2886 1024 1024 4010   # dbus-daemon, see below
3960 959 959 3726     # kpackagekiticon, see below

user   3960     1  0 Feb08 ?        00:00:25 /usr/libexec/kde4/kpackagekitsmarticon
user   2886     1 13 Feb08 ?        15:24:39 /bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session

[root@host proc]# kill 3960
[root@host proc]# kill 3960
bash: kill: (3960) - No such process
[root@host proc]# uptime
 08:36:10 up 4 days, 14:27, 10 users,  load average: 0.49, 0.86, 1.29
[root@host proc]# ls /proc/2886/fd | wc   # dbus-daemon now many fewer fds open
     80      80     232

RPM versions are:
dbus-1.4.0-2.fc14.x86_64
kpackagekit-0.6.3.3-1.fc14.x86_64

Reproducible: Always

Steps to Reproduce:
Reproducibility of many-fds in dbus-daemon "happens every time".  This is the first time I've killed kpackagekiticon to fix it, but it was a pretty definite fix.

Actual Results:  
Normal desktop use ~4days, dbus-daemon open fds goes to 1024 (mostly sockets in /tmp/dbus[stuff]), kpackagekiticon open fds goes to nearly 1000.  Kill kpackagekiticon, dbus-daemon back to normal.


I've been a Linux sysadmin for a long time and this is my personal desktop.  You can ask me to try fairly odd things :-) (debug package?  restart kpackagekiticon and strace it?).
Comment 1 Warren Jones 2011-02-18 01:01:45 UTC
I encountered the same bug with KDE 4.5.95 (openSUSE 11.4 milestone 6).
After running normally for about 24 hours, kpackagekitsmarticon starts opening a new socket every 6 minutes.  This is consistent with the observation by the original poster that it takes ~4 days to hit 1024 open file descriptors.
Comment 2 Stephan Diestelhorst 2011-03-01 13:14:39 UTC
I can confirm this bug. After a while the KDE session behaves strangely, screen lock breaks, new apps won't start, etc.

Top shows that Dbus is eating 100% of a core. Killing kpackagekitsmarticon manually resolves the issue.

Thanks for the workaround suggestion, and I can too try out debug packages.
Comment 3 Jisakiel 2011-03-14 09:12:07 UTC
I experienced this as well, after leaving my desktop on through a weekend . Kde 4.6.1 from fedora KDE testing repo, x86_64. Killing kpackagekitsmarticon returned dbus to normal.
Comment 4 Daniel Nicoletti 2011-03-15 01:35:56 UTC
Hmmm this is probably why when I test kpackagekit on fedora it stops working after a while.
To be honest I don't know how to close a DBus connection since this seems to be related to a DBus limit on how many questions should be asked on the bus.
Of course the code to look for a fix is at packagekit-qt and not kpackagekit,
I'm out of time these days but as soon as I get some free time I'll try to investigate.
Comment 5 kdebugreport 2011-06-20 16:17:45 UTC
Bug still occurs in Fedora 15 following upgrade to original reporting system:
dbus-1.4.6-4.fc15.x86_64
kpackagekit-0.6.3.3-2.fc15.x86_64
Comment 6 Daniel Nicoletti 2011-06-20 20:33:40 UTC

*** This bug has been marked as a duplicate of bug 261180 ***
Comment 7 Guillermo Lopez 2011-07-11 18:48:40 UTC
This issue was set as resolved however I cannot find the version in which it is expected to be fixed. I'm currently using kde v4.6.2 and I'm still experiencing this issue. 

Could anyone provide an update?

Thanks!
Comment 8 Daniel Nicoletti 2011-07-28 15:03:46 UTC
I'm not too sure if Aaron backported it to KDE 4.6.x but surelly KDE 4.7 will have the fix