[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: dbus_connection_send_with_reply_and_block eats 100% CPU then eventually times out
From:       Ralf Habacker <ralf () habacker ! de>
Date:       2015-01-31 13:49:02
Message-ID: 54CCDD4E.9060505 () habacker ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Am 31.01.2015 um 13:08 schrieb Alex Brooks:
>
> Hi Ralf,
>
> Do you have a wlan0 on that computer?
>
no, wlp3s0 .. need to use -i i wlps3so
>
> (also note that the method in question (signalpoll)  is new in
> wpa_supplicant v2.3).
>
-> updated
+ need to run as root

> On 31 Jan 2015 19:27, "Ralf Habacker" <ralf@habacker.de
> <mailto:ralf@habacker.de>> wrote:
>
>
>     Am 31.01.2015 um 05:04 schrieb Alex Brooks:
>     > Hi,
>     >
>     > I've been fighting for a long time with what now looks like a
>     libdbus
>     > bug.
>     > I have a cut-down test program which calls a dbus method of
>     > wpa_supplicant at 100Hz, it does this happily for several hours then
>     > at some point the behaviour changes: any future calls sit at
>     100% CPU
>     > for 25sec then time out.
>
who eat's the cpu
- dbus-daemon
- wpa_supplicant
- your client app
>
>     > I don't think the problem is on the wpa_supplicant side: other
>     clients
>     > can simultaneously make this call without any problems, and
>     restarting
>     > the client fixes it.
>
you did a strace of the related processes ?
>
>     > [I'm running at 100Hz because the faster I run this loop, the
>     faster> it reproduces the problem.  CPU load sits below 20% before
>     I hit the
>     > bug].
>
the test case contains

    while ( true )  {
...
      usleep(0.1 * 1e6);
   }

which is 10H z

got it running as root

Ralf
>
>     >
>     > I posted details and a sample program as a Qt bug report (I'm using
>     > the QDBus wrapper and thought it might be a Qt bug initially):
>     > https://bugreports.qt.io/browse/QTBUG-43550
>     >
>     > Does anyone have any thoughts?
>     I compiled the testcase on opensuse 13.1 x86_64 and did run:
>
>     sudo ./signalpoll
>     getNetDevObjectPath(wlan0)
>     getNetDevObjectPath : GetInterface result:  QDBusMessage(type=Error,
>     service="", error name="fi.w1.wpa_supplicant1.InterfaceUnknown", error
>     message="wpa_supplicant knows nothing about this interface.",
>     signature="", contents=([]) )
>     terminate called after throwing an instance of 'std::string'
>
>     Regards
>      Ralf m
>


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">Am 31.01.2015 um 13:08 schrieb Alex
      Brooks:<br>
    </div>
    <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
      type="cite">
      <p dir="ltr">Hi Ralf, </p>
      <p dir="ltr">Do you have a wlan0 on that computer? <br>
      </p>
    </blockquote>
    no, wlp3s0 .. need to use -i i wlps3so
    <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
      type="cite">
      <p dir="ltr">
        (also note that the method in question (signalpoll)  is new in
        wpa_supplicant v2.3).</p>
    </blockquote>
    -&gt; updated<br>
    + need to run as root<br>
    <br>
    <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On 31 Jan 2015 19:27, "Ralf Habacker"
        &lt;<a moz-do-not-send="true" href="mailto:ralf@habacker.de">ralf@habacker.de</a>&gt;
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
          Am 31.01.2015 um 05:04 schrieb Alex Brooks:<br>
          &gt; Hi,<br>
          &gt;<br>
          &gt; I've been fighting for a long time with what now looks
          like a libdbus<br>
          &gt; bug.<br>
          &gt; I have a cut-down test program which calls a dbus method
          of<br>
          &gt; wpa_supplicant at 100Hz, it does this happily for several
          hours then<br>
          &gt; at some point the behaviour changes: any future calls sit
          at 100% CPU<br>
          &gt; for 25sec then time out.<br>
        </blockquote>
      </div>
    </blockquote>
    who eat's the cpu <br>
    - dbus-daemon<br>
    - wpa_supplicant <br>
    - your client app<br>
    <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          &gt; I don't think the problem is on the wpa_supplicant side:
          other clients<br>
          &gt; can simultaneously make this call without any problems,
          and restarting<br>
          &gt; the client fixes it.<br>
        </blockquote>
      </div>
    </blockquote>
    you did a strace of the related processes ? <br>
    <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          &gt; [I'm running at 100Hz because the faster I run this loop,
          the faster&gt; it reproduces the problem.  CPU load sits below
          20% before I hit the<br>
          &gt; bug].<br>
        </blockquote>
      </div>
    </blockquote>
    the test case contains <br>
    <br>
        while ( true )  {<br>
    ...<br>
          usleep(0.1 * 1e6);<br>
       }<br>
    <br>
    which is 10H z<br>
    <br>
    got it running as root<br>
    <br>
    Ralf <br>
    <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          &gt;<br>
          &gt; I posted details and a sample program as a Qt bug report
          (I'm using<br>
          &gt; the QDBus wrapper and thought it might be a Qt bug
          initially):<br>
          &gt; <a moz-do-not-send="true"
            href="https://bugreports.qt.io/browse/QTBUG-43550"
            target="_blank">https://bugreports.qt.io/browse/QTBUG-43550</a><br>
          &gt;<br>
          &gt; Does anyone have any thoughts?<br>
          I compiled the testcase on opensuse 13.1 x86_64 and did run:<br>
          <br>
          sudo ./signalpoll<br>
          getNetDevObjectPath(wlan0)<br>
          getNetDevObjectPath : GetInterface result: 
          QDBusMessage(type=Error,<br>
          service="", error
          name="fi.w1.wpa_supplicant1.InterfaceUnknown", error<br>
          message="wpa_supplicant knows nothing about this interface.",<br>
          signature="", contents=([]) )<br>
          terminate called after throwing an instance of 'std::string'<br>
          <br>
          Regards<br>
           Ralf m<br>
        </blockquote>
      </div>
    </blockquote>
    <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
      type="cite">
    </blockquote>
    <br>
  </body>
</html>

[Attachment #6 (text/plain)]

_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic