[Pkg-utopia-maintainers] Bug#523041: dbus-x11: dbus autostart does not properly go into background, causing hangs etc.

Marc Lehmann debian-reportbug at plan9.de
Wed Apr 8 01:39:08 UTC 2009


Package: dbus-x11
Version: 1.2.1-5
Severity: normal


A number of programs auto-launch dbus when it isn't running already.

Unfortunately, this process is unclean because dbus doesn't properly become a daemon,
even though it doesn't exit when the starting program exits, either.

Specifically, dbus-launch keeps filehandles open.

Two programs where this causes problems are gedit and vmware.

Both open a socket to communicate with the running instance at a later
time. When dbus-launch runs, it inherits the socket(s) and keeps them
open even when the program already exited. The problem is that dbus
automatically starts, so applications cannot take measures around that.

For example, when starting vmware and exiting it, causing dbus-launch to
run and keep running in the background, it is impossible to start vmware
again because dbus-launch keeps the socket open, making vmware think it is
still running:

   cerebro ~# fuser "/tmp/vmware-root/VMware Workstation-:0.0-sp"
   /tmp/vmware-root/VMware Workstation-:0.0-sp: 25103 25107
   cerebro ~# ps 25103
   PID TTY      STAT   TIME COMMAND
   25103 ?        S      0:00 dbus-launch --autolaunch 1fb09f4400ebb4bb0b71c6004637a464 --binary-syntax --close-stderr

killing 25103 and 25107 will make it possible to run vmware again.

With gedit, the symptoms are similar, except gedit hangs when talking to
it's socket, as dbus of course doesn't talk to gedit.

The fix is to properly daemonise (e.g. close all unused fd's), as dbus
starts automatically without the host program being aware of that.

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dbus-x11 depends on:
ii  dbus                          1.2.1-5    simple interprocess messaging syst
hi  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libx11-6                      2:1.2-1    X11 client-side library

dbus-x11 recommends no packages.

dbus-x11 suggests no packages.

-- no debconf information





More information about the Pkg-utopia-maintainers mailing list