Bug 97439 - how to identify which processing is leaking?
Summary: how to identify which processing is leaking?
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.10
Hardware: Other All
: medium normal
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
Depends on:
Reported: 2016-08-22 18:17 UTC by Joshua Pritikin
Modified: 2018-10-12 21:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Joshua Pritikin 2016-08-22 18:17:06 UTC
I have a bug very similar to https://bugs.kde.org/show_bug.cgi?id=261180

However, I don't know how to identify which dbus client is causing the trouble. Can you point me to instructions to diagnose the issue?
Comment 1 Simon McVittie 2016-08-22 18:57:37 UTC
This is a support request, not a bug: it cannot be written in the form of

* steps to reproduce the bug
* what you expected (expected result)
* what happened instead (actual result)

Please talk to your OS distribution's support channels before reporting "I don't know what's going on, tell me how to find out?" as a bug. Your distribution is very likely to have more volunteers able to help you than individual upstream projects do. Unfortunately, you haven't told me which OS distribution, or which OS, you are using.

You haven't said whether this issue is on the session bus (a process running the dbus-daemon executable as your own user ID) or on the system bus (a process running the same dbus-daemon executable as some system user, usually called dbus or messagebus or something similar).

If it's the session bus, try running dbus-monitor to look at traffic on the bus.

If it's the system bus, and this is dbus 1.10 or later, try running dbus-monitor as root (for example using sudo). In older dbus versions, dbus-monitor was not useful on the system bus.

Either way, a generic D-Bus tool like d-feet is probably rather useful to inspect which connections belong to which processes/executables.

From the KDE bug,

> I looked for other applications that had a lot of open files open

also suggests a way to look for possible culprits.

Another possibility is that if your OS distribution has compiled dbus-daemon with the Stats interface enabled, commands like this might point towards a culprit:

dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.Debug.Stats.GetStats

dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.Debug.Stats.GetConnectionStats string:org.gnome.Shell

(replace org.gnome.Shell with the unique name, such as :1.123, or well-known name, such as org.gnome.Shell, of a connection of interest).

You could also try attaching strace to the dbus-daemon, using something like:

$ pgrep dbus-daemon | xargs ps u
message+  2844  0.0  0.0  44704  5172 ?        Ss   Aug16   0:58 /usr/bin/dbus-d
user      3183  0.0  0.0  44160  4672 ?        Ss   Aug16   0:04 /usr/bin/dbus-d
$ strace -p 3183

(press Ctrl+C to exit from strace, detaching from the dbus-daemon) but that will likely only tell you symptoms, not causes.
Comment 2 Joshua Pritikin 2016-08-22 19:34:40 UTC
Tanglu 4.0 beta. I reported the bug here, https://tracker.tanglu.org/T232

I'm pretty sure that it is the session bus. The problem goes away for 10-20 minutes if I log out and log in again.

I'll try your other suggestions later.

Thank you.
Comment 3 Joshua Pritikin 2016-08-23 13:07:03 UTC
Hm, d-feet shows lots and lots of entries from Google Chrome, http://imgur.com/a/aKRGK

Is that normal? I have Chrome version 52.0.2743.116 (amd64) installed.
Comment 4 Simon McVittie 2016-08-23 15:41:21 UTC
(In reply to Joshua Pritikin from comment #3)
> Hm, d-feet shows lots and lots of entries from Google Chrome,
> http://imgur.com/a/aKRGK

I don't use Chrome myself, but that's certainly suspicious. I would normally expect O(1) connections per process.
Comment 5 Joshua Pritikin 2016-08-23 16:01:12 UTC
OK, I reported the problem to Google. I guess we can close this bug although you're helpful instructions for diagnosing the problem ought to be more prominently documented somewhere.
Comment 6 GitLab Migration User 2018-10-12 21:28:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/154.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.