Debian Bug report logs - #426412
python-dbus: system_bus.remove_signal_receiver() freezes

version graph

Package: python-dbus; Maintainer for python-dbus is (unknown);

Reported by: Tony Houghton <h@realh.co.uk>

Date: Mon, 28 May 2007 15:48:01 UTC

Severity: normal

Found in version dbus-python/0.81.0-1

Fixed in version dbus-python/0.81.1-1

Done: Simon McVittie <smcv@ianadd.pseudorandom.co.uk>

Bug is archived. No further changes may be made.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#426412; Package python-dbus. (full text, mbox, link).


Acknowledgement sent to Tony Houghton <h@realh.co.uk>:
New Bug report received and forwarded. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Tony Houghton <h@realh.co.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python-dbus: system_bus.remove_signal_receiver() freezes
Date: Mon, 28 May 2007 16:44:47 +0100
Package: python-dbus
Version: 0.81.0-1
Severity: normal


hal-device-manager and an experimental device manager applet for the ROX
desktop called DevTray keep freezing on me when a device is removed or
when I quit DevTray. I tracked it down to this call in DevTray:

system_bus.remove_signal_receiver(item._property_modified,
                                  'PropertyModified',
                                  'org.freedesktop.Hal.Device',
                                  'org.freedesktop.Hal',
                                   udi)

I haven't checked exactly where hal-device-manager is freezing, but I
notice that its code does contain a very similar call.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.21.1
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-dbus depends on:
ii  libc6                         2.5-9      GNU C Library: Shared libraries
ii  libdbus-1-3                   1.0.2-5    simple interprocess messaging syst
ii  libdbus-glib-1-2              0.73-2     simple interprocess messaging syst
ii  libglib2.0-0                  2.12.12-1  The GLib library of C routines
ii  python                        2.4.4-6    An interactive high-level object-o
ii  python-support                0.6.4      automated rebuilding support for p

Versions of packages python-dbus recommends:
ii  python-gobject                2.12.3-2   Python bindings for the GObject li

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#426412; Package python-dbus. (full text, mbox, link).


Acknowledgement sent to Simon McVittie <smcv@ianadd.pseudorandom.co.uk>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (full text, mbox, link).


Message #10 received at 426412@bugs.debian.org (full text, mbox, reply):

From: Simon McVittie <smcv@ianadd.pseudorandom.co.uk>
To: Tony Houghton <h@realh.co.uk>, 426412@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#426412: python-dbus: system_bus.remove_signal_receiver() freezes
Date: Mon, 28 May 2007 18:43:46 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 28 May 2007 at 16:44:47 +0100, Tony Houghton wrote:
> I tracked it down to this call in DevTray:
> 
> system_bus.remove_signal_receiver(item._property_modified,
>                                   'PropertyModified',
>                                   'org.freedesktop.Hal.Device',
>                                   'org.freedesktop.Hal',
>                                    udi)

remove_signal_receiver() takes and releases a lock (which protects the
signal-match tree from concurrent modification when dbus-python is used
multi-threaded). I'll check other places where this lock is used -
there's probably some code path where it's not being released properly.

Regards,
	Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net

iD8DBQFGWxTSWSc8zVUw7HYRArnrAJ9XG531mjaffBujGSxRL5C4OZQm5ACg3O0w
goJx9RmMbhd6t5UIw2I0D8I=
=bBC6
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#426412; Package python-dbus. (full text, mbox, link).


Acknowledgement sent to Tony Houghton <h@realh.co.uk>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (full text, mbox, link).


Message #15 received at 426412@bugs.debian.org (full text, mbox, reply):

From: Tony Houghton <h@realh.co.uk>
To: Simon McVittie <smcv@ianadd.pseudorandom.co.uk>
Cc: 426412@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#426412: python-dbus: system_bus.remove_signal_receiver() freezes
Date: Mon, 28 May 2007 20:22:21 +0100
In <20070528174346.GA30779@celebrin.pseudorandom.co.uk>, you wrote:

> remove_signal_receiver() takes and releases a lock (which protects the
> signal-match tree from concurrent modification when dbus-python is used
> multi-threaded). I'll check other places where this lock is used -
> there's probably some code path where it's not being released properly.

FWIW after I read this I thought perhaps it's a reentrancy problem,
caused by the application trying to call remove_signal_receiver() from a
signal receiver. So I made DevTray defer the calls with
gobject.idle_add() but it still froze. So I was on the wrong track :-(.

-- 
TH * http://www.realh.co.uk



Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#426412; Package python-dbus. (full text, mbox, link).


Acknowledgement sent to Simon McVittie <smcv@ianadd.pseudorandom.co.uk>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (full text, mbox, link).


Message #20 received at 426412@bugs.debian.org (full text, mbox, reply):

From: Simon McVittie <smcv@ianadd.pseudorandom.co.uk>
To: Tony Houghton <h@realh.co.uk>, 426412@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#426412: Bug#426412: python-dbus: system_bus.remove_signal_receiver() freezes
Date: Mon, 28 May 2007 19:53:52 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 28 May 2007 at 20:22:21 +0100, Tony Houghton wrote:
> In <20070528174346.GA30779@celebrin.pseudorandom.co.uk>, you wrote:
> 
> > remove_signal_receiver() takes and releases a lock (which protects the
> > signal-match tree from concurrent modification when dbus-python is used
> > multi-threaded). I'll check other places where this lock is used -
> > there's probably some code path where it's not being released properly.
> 
> FWIW after I read this I thought perhaps it's a reentrancy problem,
> caused by the application trying to call remove_signal_receiver() from a
> signal receiver. So I made DevTray defer the calls with
> gobject.idle_add() but it still froze. So I was on the wrong track :-(.

No, it's a different sort of reentrancy problem - in a proxy that tracks
name-owner changes, remove_signal_receiver() can trigger a recursive call
to itself (internally, a match on NameOwnerChanged is removed too) which
attempts to re-take the lock.

I've sent a patch for review upstream; there should be a 0.81.1 in a day or
so.

	Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net

iD8DBQFGWyVAWSc8zVUw7HYRAtBXAKC58CPnmGWVf6zsagkkCvHCJ7rEzgCg4Tel
J5ERm73xeAPYcfRjXkW0Ya4=
=PIYc
-----END PGP SIGNATURE-----



Reply sent to Simon McVittie <smcv@ianadd.pseudorandom.co.uk>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Tony Houghton <h@realh.co.uk>:
Bug acknowledged by developer. (full text, mbox, link).


Message #25 received at 426412-close@bugs.debian.org (full text, mbox, reply):

From: Simon McVittie <smcv@ianadd.pseudorandom.co.uk>
To: 426412-close@bugs.debian.org
Subject: Bug#426412: fixed in dbus-python 0.81.1-1
Date: Tue, 05 Jun 2007 16:17:02 +0000
Source: dbus-python
Source-Version: 0.81.1-1

We believe that the bug you reported is fixed in the latest version of
dbus-python, which is due to be installed in the Debian FTP archive:

dbus-python_0.81.1-1.diff.gz
  to pool/main/d/dbus-python/dbus-python_0.81.1-1.diff.gz
dbus-python_0.81.1-1.dsc
  to pool/main/d/dbus-python/dbus-python_0.81.1-1.dsc
dbus-python_0.81.1.orig.tar.gz
  to pool/main/d/dbus-python/dbus-python_0.81.1.orig.tar.gz
python-dbus_0.81.1-1_i386.deb
  to pool/main/d/dbus-python/python-dbus_0.81.1-1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 426412@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Simon McVittie <smcv@ianadd.pseudorandom.co.uk> (supplier of updated dbus-python package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 04 Jun 2007 14:27:22 +0100
Source: dbus-python
Binary: python-dbus
Architecture: source i386
Version: 0.81.1-1
Distribution: unstable
Urgency: low
Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Changed-By: Simon McVittie <smcv@ianadd.pseudorandom.co.uk>
Description: 
 python-dbus - simple interprocess messaging system (Python interface)
Closes: 368286 408372 409754 416714 426412
Changes: 
 dbus-python (0.81.1-1) unstable; urgency=low
 .
   * New upstream release.
     - Fixes deadlock in remove_signal_receiver() when following name-owner
       changes (Closes: #426412)
   * Package examples, including those referenced by the tutorial
     (Closes: #416714, #368286)
   * Include the Academic Free License version 2.1, not 2.0, in
     debian/copyright, since that's what the dual license includes.
     Closes: #408372 - the duplicated lines in the GPL header also mentioned
     in that bug have already been fixed upstream.
   * python-defaults now includes 2.5 as a supported version, so this upload
     also Closes: #409754.
Files: 
 1abe5013304b52cbb566d157dd7a0b6b 881 devel optional dbus-python_0.81.1-1.dsc
 fc295fa11fe97f19db4841d9bd6d47ab 477052 devel optional dbus-python_0.81.1.orig.tar.gz
 1e89fe24a0488500670b05abbdeb044d 16505 devel optional dbus-python_0.81.1-1.diff.gz
 e4f8f5b685b65ab53b25d1e1ea788ff8 245296 python optional python-dbus_0.81.1-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGZYk5gTd+SodosdIRAmivAJ9/gnaJmyCiIP2FKNAoqPYOU7J54QCbBJrp
Cg938wYVkGBaeA4utln8Lr0=
=dFFL
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 07 Jul 2007 07:31:41 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Sep 2 17:08:49 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.