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

QDBusConnection::call eats 100% CPU then eventually times out

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.3.2, 5.4.0
    • D-Bus
    • None
    • Linux (Debian Jessie), wpa_supplicant v2.3. Reproduced on various computers with different hardware.

    Description

      Hi,

      I'm having a difficult-to-reproduce issue:
      My program is talking to wpa_supplicant over dbus, calling wpa_supplicant's signalPoll() method over dbus at 1Hz. If left for a few days, it eventually gets stuck in a state where any further calls to signalPoll() hang for 25sec while hogging 100% CPU, then time out.

      The error message I get on time-out is:
      "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

      The stack-trace during the 25sec hang is:

      ...
      #7  0xb4463a0f in dbus_pending_call_block () from /lib/i386-linux-gnu/libdbus-1.so.3
      #8  0xb4452b95 in dbus_connection_send_with_reply_and_block () from /lib/i386-linux-gnu/libdbus-1.so.3
      #9  0xb5e57dd9 in ?? () from /usr/lib/i386-linux-gnu/libQt5DBus.so.5
      #10 0xb5e44290 in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () from /usr/lib/i386-linux-gnu/libQt5DBus.so.5
      #11 0xb5e636be in QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode, QString const&, QList<QVariant> const&) () from /usr/lib/i386-linux-gnu/libQt5DBus.so.5
      #12 0xb5e64968 in QDBusAbstractInterface::call(QDBus::CallMode, QString const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&) () from /usr/lib/i386-linux-gnu/libQt5DBus.so.5
      #13 0xb5e64b34 in QDBusAbstractInterface::call(QString const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&) () from /usr/lib/i386-linux-gnu/libQt5DBus.so.5
      #14 0xb4dc543b in wpa::WpaSupplicant::signalPoll (this=<optimized out>) 
      ...
      

      Running wpa_supplicant with extra debugging doesn't show up much, just:
      I start wpa_supplicant with '-dd', here's what syslog has to say:

      Dec 21 14:55:24 x17 wpa_supplicant[21763]: dbus: fi.w1.wpa_supplicant1.Interface.SignalPoll (/fi/w1/wpa_supplicant1/Interfaces/1)
      Dec 21 14:55:49 x17 wpa_supplicant[21763]: dbus: fi.w1.wpa_supplicant1.Interface.SignalPoll (/fi/w1/wpa_supplicant1/Interfaces/1)
      Dec 21 14:56:14 x17 wpa_supplicant[21763]: dbus: fi.w1.wpa_supplicant1.Interface.SignalPoll (/fi/w1/wpa_supplicant1/Interfaces/1)
      [ ... repeating at the same rate as the timeout messages in my client process ... ]. 
      

      If I kill and restart my client process (but leave wpa_supplicant running) then everything is back to normal and working again.

      I don't know whether the problem is in Qt, libdbus, or wpa_supplicant – not sure how to narrow it down further. Any hints?

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            alexb Alex Brooks
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes