[python?] DBus + gtk + thread = problems

René 'Necoro' Neumann lists at necoro.eu
Wed Mar 19 05:08:57 PDT 2008


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

Hi :)

I yesterday discovered a bug in dbus (or dbus-python) when using dbus
inside of a (py)gtk application: As an example, I create a window with a
button. When clicking the button, a new thread is started which runs a
dbus statement. (see attached example)

On a unicore system on of the following things can happen (when
repeatedly clicking the button)
	- it runs normally
	- the app just ends (no segfault or similar):
		+ gdb just says "Program exited with code 01."
	- it segfaults
		+ see attached bt_delete_unicore.txt for a backtrace

On a dualcore system the application segfaults on first click. When
looking at the backtraces I saw 4 different "species". With other words:
Each segfault seems to be one of this 4. I attached the backtraces.

I found out the following facts:
	- if there is no dbus call - it does not fail
	- if there is no gtk environment - it does not fail
	- if the dbus call is not made in the thread - it does not fail

I don't know if this is a dbus or a dbus-python problem...
These are the versions I used:

dbus: 1.1.20 & 1.1.4
dbus-glib: 0.74
dbus-python: 0.82.4

Perhaps one of you can tell me, what's wrong :). If you need some more
info (like debug info - or stuff the gdb tells me), just ask.

Regards,
Necoro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH4QJZ4UOg/zhYFuARAqJmAJ9cYjqFAsMNnoZjIDvfZqgFIQsNrwCbBQWv
3WjLvEBwdKo1ymGRvwiGzyo=
=C2/Y
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bt_delete.txt
Url: http://lists.freedesktop.org/archives/dbus/attachments/20080319/6593893b/attachment-0005.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bt_delete_unicore.txt
Url: http://lists.freedesktop.org/archives/dbus/attachments/20080319/6593893b/attachment-0006.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bt_link_before.txt
Url: http://lists.freedesktop.org/archives/dbus/attachments/20080319/6593893b/attachment-0007.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bt_marshal.txt
Url: http://lists.freedesktop.org/archives/dbus/attachments/20080319/6593893b/attachment-0008.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bt_watch_invalidate.txt
Url: http://lists.freedesktop.org/archives/dbus/attachments/20080319/6593893b/attachment-0009.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus_test.py
Type: text/x-python
Size: 786 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080319/6593893b/attachment-0001.py 


More information about the dbus mailing list