Public bug reported:

python segfaults if DBusMainLoop is used in multiple threads; e.g.:

#!/usr/bin/python3

import dbus
import sys
import threading

from gi.repository import GLib

from dbus.mainloop.glib import DBusGMainLoop
#DBusGMainLoop(set_as_default=True)                                             
                                                               

if __name__ == "__main__":
    threading.Thread(target=GLib.MainLoop().run).start()

    for r in range(1000):
        print(".", flush=True, end="")
        dbus.SessionBus(private=True, mainloop=DBusGMainLoop())
        #dbus.SessionBus(private=True)                                          
                                                               

    print("")
    sys.exit(0)


$ ./test.py
.............Segmentation fault


It will also segfault if set_as_default is set to True, even without passing it 
to the SessionBus's mainloop parameter.

** Affects: dbus-python (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890753

Title:
  DBusGMainLoop segfaults python if multi-threaded

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbus-python/+bug/1890753/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to