Showing posts with label dbus. Show all posts
Showing posts with label dbus. Show all posts

Friday, December 18, 2015

Build Ubuntu Package from Source

TBC...

root# apt-get source dbus
Reading package lists... Done
Building dependency tree    
Reading state information... Done
NOTICE: 'dbus' packaging is maintained in the 'Git' version control system at:
git://anonscm.debian.org/pkg-utopia/dbus.git
Need to get 1,961 kB of source archives.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main dbus 1.4.18-1ubuntu1.7 (dsc) [2,614 B]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main dbus 1.4.18-1ubuntu1.7 (tar) [1,893 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main dbus 1.4.18-1ubuntu1.7 (diff) [64.8 kB]
Fetched 1,961 kB in 1s (1,304 kB/s)
gpgv: Signature made Tue 25 Nov 2014 03:24:17 PM EST using RSA key ID A744BE93
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./dbus_1.4.18-1ubuntu1.7.dsc
dpkg-source: info: extracting dbus in dbus-1.4.18
dpkg-source: info: unpacking dbus_1.4.18.orig.tar.gz
dpkg-source: info: unpacking dbus_1.4.18-1ubuntu1.7.debian.tar.gz
dpkg-source: info: applying 01_no-fatal-warnings.patch
dpkg-source: info: applying 02_obsolete_g_thread_api.patch
dpkg-source: info: applying 20_system_conf_limit.patch
dpkg-source: info: applying 81-session.conf-timeout.patch
dpkg-source: info: applying 0001-activation-allow-for-more-variation-than-just-system.patch
dpkg-source: info: applying 0002-bus-change-systemd-activation-to-activation-systemd.patch
dpkg-source: info: applying 0003-upstart-add-upstart-as-a-possible-activation-type.patch
dpkg-source: info: applying 0004-upstart-add-UpstartJob-to-service-desktop-files.patch
dpkg-source: info: applying 0005-activation-implement-upstart-activation.patch
dpkg-source: info: applying CVE-2012-3524-dbus.patch
dpkg-source: info: applying CVE-2012-3524-regression-fix.patch
dpkg-source: info: applying CVE-2013-2168.patch
dpkg-source: info: applying CVE-2014-3477.patch
dpkg-source: info: applying CVE-2014-3532.patch
dpkg-source: info: applying CVE-2014-3533.patch
dpkg-source: info: applying CVE-2014-3635.patch
dpkg-source: info: applying CVE-2014-3636.patch
dpkg-source: info: applying CVE-2014-3637.patch
dpkg-source: info: applying CVE-2014-3638.patch
dpkg-source: info: applying CVE-2014-3639.patch
dpkg-source: info: applying CVE-2014-7824.patch
dpkg-source: info: applying CVE-2014-3639-regression.patch

# cd dbus-1.4.18
# ./configure --prefix=
# make

Files:
mkdir -p ~/dbus/bin
cp bus/dbus-daemon ~/dbus/bin
cp tools/dbus-cleanup-sockets ~/dbus/bin
cp tools/dbus-uuidgen ~/dbus/bin

mkdir -p ~/dbus/usr/bin
cp tools/dbus-monitor ~/dbus/usr/bin
cp tools/dbus-send ~/dbus/usr/bin

mkdir -p ~/dbus/lib/i386-linux-gnu
cp dbus/.libs/libdbus-1.so.3.5.8 ~/dbus/lib/i386-linux-gnu

mkdir -p ~/dbus/usr/lib/dbus-1.0
cp bus/dbus-daemon-launch-helper ~/dbus/lib/dbus-1.0/

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