Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27809

Calling QDBusPendingReply::waitForFinished() on seperate objects from multiple threads causes crash.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.2.0
    • 4.8.3, 5.0.0 Beta 2
    • D-Bus
    • None
    • Confirmed to affect both Windows and Linux
    • 64e3bd481e5d54d555959ceecbd5c4576c571241

    Description

      Given a multi-threaded environment such that:

      a) Multiple threads each create their own instance of a DBus proxy object
      b) Those objects share the same underlying QDBusConnection object

      Performing a blocking call, in multiple threads simultainiously, via means of QDBusPendingReply::waitForFinished(), eventually causes a crash within libdbus-1, producing the following error:

      process 10929: arguments to dbus_pending_call_block() were incorrect, assertion "pending != NULL" failed in file dbus-pending-call.c line 704.

      Backtrace:

      #2 0x0000003a3c630035 in _dbus_abort () at dbus-sysdeps.c:94
      #3 0x0000003a3c6270c5 in _dbus_warn_check_failed (format=
      0x3a3c636290 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus
      library.\n") at dbus-internals.c:289
      #4 0x000000397182144a in q_dbus_pending_call_block (pending=0x0)
      at /home/thiago/src/qt/qt-4.8/src/dbus/qdbus_symbols_p.h:313
      #5 QDBusConnectionPrivate::waitForFinished(QDBusPendingCallPrivate*)
      (this=0x621220, pcall=0x7fffcc002fc0)
      at /home/thiago/src/qt/qt-4.8/src/dbus/qdbusintegrator.cpp:1776

      A reproducible test case is attached.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              p_seiderer Peter Seiderer
              nogden Nick Ogden
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: