Bug 684027 - kpackagekit leaks DBus connections
kpackagekit leaks DBus connections
Status: CLOSED DUPLICATE of bug 667787
Product: Fedora
Classification: Fedora
Component: kpackagekit (Show other bugs)
15
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Steven M. Parrish
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-10 17:28 EST by Erik van Pienbroek
Modified: 2011-03-10 18:08 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-10 18:08:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Erik van Pienbroek 2011-03-10 17:28:58 EST
For some time I'm having a situation where various DBus related services get stuck after my computer has been up for about 5 days. Examples include starting an application which triggers a DBus notification or trying to execute DBus calls from the console. As more and more applications depend on DBus these days, they will hang on startup.

In this situation I've noticed that the dbus-daemon process (for the session bus) is stuck at 100% CPU usage. A strace of the dbus-daemon revealed this:
$ strace -p 1775
Process 1775 attached - interrupt to quit
accept4(3, 0x7fff0dcdc2b0, [16], SOCK_CLOEXEC) = -1 EMFILE (Too many open files)
fcntl(-1, F_GETFD)                      = -1 EBADF (Bad file descriptor)
poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=13, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=20, events=POLLIN}, {fd=18, events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}, {fd=29, events=POLLIN}, {fd=11, events=POLLIN}, {fd=30, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=35, events=POLLIN}, {fd=37, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=43, events=POLLIN}, {fd=42, events=POLLIN}, {fd=28, events=POLLIN}, {fd=34, events=POLLIN}, {fd=44, events=POLLIN}, ...], 1019, -1) = 1 ([{fd=3, revents=POLLIN}])
accept4(3, 0x7fff0dcdc2b0, [16], SOCK_CLOEXEC) = -1 EMFILE (Too many open files)
fcntl(-1, F_GETFD)                      = -1 EBADF (Bad file descriptor)
poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=13, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=20, events=POLLIN}, {fd=18, events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}, {fd=29, events=POLLIN}, {fd=11, events=POLLIN}, {fd=30, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=35, events=POLLIN}, {fd=37, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=43, events=POLLIN}, {fd=42, events=POLLIN}, {fd=28, events=POLLIN}, {fd=34, events=POLLIN}, {fd=44, events=POLLIN}, ...], 1019, -1) = 1 ([{fd=3, revents=POLLIN}])


A netstat revealed that kpackagekitsmarticon proces is responsible for about 945 DBus connections:
unix  3      [ ]         STREAM     CONNECTED     470307 2426/kpackagekitsma 
unix  3      [ ]         STREAM     CONNECTED     470249 1775/dbus-daemon    @/tmp/dbus-4ZlFE4n4QD
unix  3      [ ]         STREAM     CONNECTED     468280 2426/kpackagekitsma 
unix  3      [ ]         STREAM     CONNECTED     460221 1775/dbus-daemon    @/tmp/dbus-4ZlFE4n4QD
unix  3      [ ]         STREAM     CONNECTED     466857 2426/kpackagekitsma 
unix  3      [ ]         STREAM     CONNECTED     466812 1775/dbus-daemon    @/tmp/dbus-4ZlFE4n4QD
unix  3      [ ]         STREAM     CONNECTED     468243 2426/kpackagekitsma 
unix  3      [ ]         STREAM     CONNECTED     468227 1775/dbus-daemon    @/tmp/dbus-4ZlFE4n4QD
unix  3      [ ]         STREAM     CONNECTED     466741 2426/kpackagekitsma 
unix  3      [ ]         STREAM     CONNECTED     468178 1775/dbus-daemon    @/tmp/dbus-4ZlFE4n4QD
<snip>

This number of DBus connections looks a bit too large to me and I guess that there's a leak somewhere in the kpackagekitsmarticon code (or perhaps in the PackageKit libs themselves)

As soon as I kill kpackagekitsmarticon then the DBus session bus and DBus-dependent apps will work fine again
Comment 1 Kevin Kofler 2011-03-10 18:08:23 EST
Already reported, I adjusted the summary of the original bug to make it clearer what's going on.

*** This bug has been marked as a duplicate of bug 667787 ***

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