Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 157456
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Project Gentopia <gentopia@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Dustin C. Hatch <admiralnemo@pyrocufflink.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 157456 depends on: Show dependency tree
Bug 157456 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-12-07 12:11 0000
When attempting to use pmount-hal to mount an udi string, the following message
is printed and the device is not mounted:

$ pmount-hal '/org/freedesktop/Hal/devices/volume_uuid_453C_D43A'
process 950: Applications must not close shared connections - see
dbus_connection_close() docs. This is a bug in the application.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted

emerge --info
$ emerge --info
Portage 2.1.2_rc2-r5 (default-linux/amd64/2006.1/desktop, gcc-3.4.6,
glibc-2.5-r0, 2.6.19-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.6
Last Sync: Thu, 07 Dec 2006 09:00:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/init.d
/etc/issue /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache confcache distlocks metadata-transfer
parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/
ftp://mirror.datapipe.net/gentoo ftp://mirror.usu.edu/mirrors/gentoo/
http://mirror.usu.edu/mirrors/gentoo/
http://pandemonium.tiscali.de/pub/gentoo/"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/layman/xfce
/usr/local/layman/portage-xgl /usr/local/layman/zugaina"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 acpi alsa alsa_cards_intel8x0 apache2 avi bash-completion
bcmath berkdb bitmap-fonts bzip2 bzlib cairo cdparanoia cdr cli cracklib crypt
cups dbus divx4linux dlloader dri dvd dvdr dvdread elibc_glibc emboss
emul-linux-x86 encode exo fam ffmpeg firefox foomaticdb fortran gcc64 gif glitz
gnome gnutls gpm gtk gtk2 gtkhtml hal iconv imlib input_devices_keyboard
input_devices_mouse ipv6 isdnlog java jpeg kernel_linux libg++ linguas_en
logrotate mad mikmod mng mozilla mozsvg mp3 mpeg ncurses nls nptl nptlonly
nsplugin nvidia offensive ogg oggvorbis opengl panel-plugin pcre pdf perl php
pic png postgres ppds pppd python quicktime readline reflection samba sdl
session sox spell spl ssl startup-notification svg tcltk tcpd theora thunar-vfs
tiff tk truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l
vcd video_cards_nv video_cards_nvidia videos vorbis xcomposite xine xml xml2
xorg xosd xpm xprint xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

sys-apps/dbus-1.0.1-r2
sys-apps/pmount-0.9.13
sys-apps/hal-0.5.7.1-r2

------- Comment #1 From Marcin Gryszkalis 2006-12-10 18:03:04 0000 -------
I can confirm that:
# pmount-hal '/org/freedesktop/Hal/devices/volume_uuid_3B69_1AFD'              
                                                         process 21728:
Applications must not close shared connections - see dbus_connection_close()
docs. This is a bug in the application.
  /usr/lib/libdbus-1.so.3 [0xb7f6d4ad]
  /usr/lib/libdbus-1.so.3 [0xb7f6c867]
  /usr/lib/libdbus-1.so.3 [0xb7f60ea6]
  /usr/lib/libdbus-1.so.3(dbus_connection_close+0x1a1) [0xb7f3e6a1]
  pmount-hal [0x804a59b]

The gdb says:
#6  0xb7f5e885 in _dbus_abort () at dbus-sysdeps.c:84
#7  0xb7f52ea6 in _dbus_warn_check_failed (
    format=0xb7f65c30 "Applications must not close shared connections - see
dbus_connection_close() docs. This is a bug in the application.\n")
    at dbus-internals.c:283
#8  0xb7f306a1 in dbus_connection_close (connection=0x8052700) at
dbus-connection.c:2749
#9  0x0804a59b in main (argc=-1079664988, argv=0x0) at pmount-hal.c:364


pmount-hal.c contains:

dbus_conn = dbus_bus_get( DBUS_BUS_SYSTEM, &error );

and then

dbus_connection_close( dbus_conn );
dbus_connection_unref( dbus_conn );



The doc at 
http://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#ge130c33da29477897d362ab89f068191
says:

You may not close a shared connection. Connections created with
dbus_connection_open() or dbus_bus_get() are shared. These connections are
owned by libdbus, and applications should only unref them, never close them.
Applications can know it is safe to unref these connections because libdbus
will be holding a reference as long as the connection is open. Thus, either the
connection is closed and it is OK to drop the last reference, or the connection
is open and the app knows it does not have the last reference.

Connections created with dbus_connection_open_private() or
dbus_bus_get_private() are not kept track of or referenced by libdbus. The
creator of these connections is responsible for calling dbus_connection_close()
prior to releasing the last reference, if the connection is not already
disconnected.


Same bug was fixed in hal itself:
http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=c85e02d58d6503b494bb4c8584a7c44ac6923208

------- Comment #2 From Marcin Gryszkalis 2006-12-10 18:05:21 0000 -------
I notifed Martin Pitt (pmount author)
http://www.piware.de/

In the meantime you can just comment out offending line:
dbus_connection_close( dbus_conn );

------- Comment #3 From Doug Goldstein 2006-12-10 18:33:00 0000 -------
Martin already knows, as he's basically in my and steev's position for Ubuntu
and Debian.

------- Comment #4 From Steev Klimaszewski 2006-12-10 18:55:22 0000 -------
Added in the patch without a revbump (in hindsight, I probably should have
added one).

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug