Details
-
Task
-
Resolution: Out of scope
-
P2: Important
-
None
-
None
-
None
Description
According to https://bugs.freedesktop.org/show_bug.cgi?id=857 a call to send_with_reply_and_block is not thread-safe;
This frequently causes lockups, crashes and result corruption as in the following testcase (code by Sebastian TrĂ¼g)
class MyThread : public QThread { public: void run() { qDebug() << QDBusConnection::sessionBus().interface()->isServiceRegistered( "org.kde.NepomukStorage" ); } }; int main(int argc, char *argv[]) { QApplication a( argc, argv ); MyThread t1, t2; t1.start(); t2.start(); return a.exec(); }
Sometimes the two threads give different answers, sometimes there is a timeout (~25secs) between the first result and the second
Mutexing the call in QDBusIntegrator.cpp solves the last issue; however, timeouts are still occasionally present.
Attachments
Issue Links
- replaces
-
QTBUG-10751 Concurrent DBus accesses fail sometimes with error message="Not enough memory"
- Closed