Thursday, December 17, 2015

D-Bus memory leak

My goodness.  This whole week, the whole team have been scrambling around memory leak related to D-Bus.

Some basic references:
http://dbus.freedesktop.org/doc/dbus-tutorial.html
http://sy198704.is-programmer.com/posts/33060.html
http://www.cnblogs.com/chenbin7/archive/2013/03/05/2944895.html

We have a Ubuntu 12.04 LTS.  The D-Bus version is 1.4.18.  There are a good number of leak issues.  What should we do?

Well, desirably, we should go to 1.7.10.


Here is the list of leak issues.

might leak memory in dbus_message_iter_get_args_valist:
report date: 4/17/2009
fixed 1.7.8
https://bugs.freedesktop.org/show_bug.cgi?id=21259


file dicriptor leak in _dbus_connect_tcp_socket_with_nonce
report on 5/16/2011
fixed in 1.5.6
https://bugzilla.freedesktop.org/show_bug.cgi?id=37258


a small memory leak, and a failure to report errors, when updating a service file entry for activation
report on 7/21/2011
fixed in 1.5.8
https://bugzilla.freedesktop.org/show_bug.cgi?id=39230


can crash on failed realloc; cannot be forced to crash on all failed mallocs
report on 9/20/2011
fixed in 1.5.10
https://bugzilla.freedesktop.org/show_bug.cgi?id=41048


Dbus is leaking some fd to /dev/null when it demonize.
report on 11/9/2012
fixed in 1.7.0
https://bugzilla.freedesktop.org/show_bug.cgi?id=56927


File descriptor leak in _dbus_command_for_pid():
report on 9/10/2013
fixed in 1.6.16, 1.7.6
https://bugs.freedesktop.org/show_bug.cgi?id=69182


Memory leak in dbus-daemon:
report on 11/12/2013
fixed in 1.6.20, 1.7.10
https://bugs.freedesktop.org/show_bug.cgi?id=71526


D-Bus 1.8.0 release note (1/20/2014)
• fixed long-standing fd and array leaks when failing to parse a message
• fixed referenced-but-never-freed parent nodes (effectively memory
  leaks) when using certain object-path allocation patterns, notably in
  Avahi

dbus-monitor leak file descriptor
report on 6/27/2014
fixed in 1.9.0
https://bugs.freedesktop.org/show_bug.cgi?id=80603


Missing varargs cleanup
report on 1/6/2015
fixed in 1.9.8
https://bugs.freedesktop.org/show_bug.cgi?id=88087


Memleak when GetConnectionCredentials is successful
report on 6/17/2015
fixed in 1.8.20, 1.9.18
https://bugs.freedesktop.org/show_bug.cgi?id=91008


libcap-ng < 0.7.7 leaks one non-close-on-exec fd during initialization
report on 8/19/2015
fixed in 1.10
https://bugs.freedesktop.org/show_bug.cgi?id=91684

No comments:

Post a Comment