dbus-glib memory leak or ...? without GMainLoop?
kimmo.hamalainen at nokia.com
Tue Feb 23 04:18:59 PST 2010
On Sat, 2010-02-20 at 01:22 +0100, ext Tim Hockin wrote:
> I've built a trivial dbus server and client. To test I am just
> sending a signal in a loop. I'm seeing a memory runaway on the server
> app. The interesting thing I see is that it is ONLY when a client is
> connected that memory runs away. After a few minutes of continuous
> sending it is over 1GB of RSS.
Yes, I noticed this with 0.6 already years ago. It's easy to reproduce
with a trivial client and service. I think the problem is heap
contraction: if you have e.g. new connection when the heap is
"inflated", that new connection is causing a memory allocation from top
of the heap, preventing "deflating" the heap later when the buffered
messages have been handled in the daemon. This happens because memory
allocated for connections is kept allocated from the heap as long as the
> This leads me to believe that there is some sort of response data that
> libdbus is receiving on my behalf that I am not catching.
> Here's where I depart from the example code: I do not use GMainLoop.
> This is overall not a glib application and dbus is a retrofit feature
> not a fundamental aspect. I just want to send a dbus signal when my
> app takes a particular event.
> Is that the problem? Can I run a dbus-glib app without GMainLoop?
> dbus mailing list
> dbus at lists.freedesktop.org
More information about the dbus