[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:       Alex Brooks <a.brooks () marathon-targets ! com>
Date:       2015-02-03 6:51:57
Message-ID: 54D0700D.4090805 () marathon-targets ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Ralf,

I tried with the modifications you suggest (tracking number of 
iterations and time).
There's a magic number: in all cases it starts failing after 300274 
iterations (100% repeatable):

signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=1, relapsed=0.00127s, dt=0.001258s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=2, relapsed=0.012663s, dt=0.001231s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=3, relapsed=0.023954s, dt=0.00118s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=4, relapsed=0.035219s, dt=0.001154s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=5, relapsed=0.046478s, dt=0.001148s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=6, relapsed=0.057801s, dt=0.001208s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=7, relapsed=0.069105s, dt=0.001194s
...
... wait ~55min ...
...
signalInfo rssi=-45
TRACE(signalpoll_onefile.cpp): iter=300268, relapsed=3456.71s, dt=0.001268s
signalInfo rssi=-45
TRACE(signalpoll_onefile.cpp): iter=300269, relapsed=3456.72s, dt=0.001208s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=300270, relapsed=3456.74s, dt=0.001236s
signalInfo rssi=-38
TRACE(signalpoll_onefile.cpp): iter=300271, relapsed=3456.75s, dt=0.001205s
signalInfo rssi=-42
TRACE(signalpoll_onefile.cpp): iter=300272, relapsed=3456.76s, dt=0.001225s
signalInfo rssi=-41
TRACE(signalpoll_onefile.cpp): iter=300273, relapsed=3456.77s, dt=0.001214s
signalInfo rssi=-47
TRACE(signalpoll_onefile.cpp): iter=300274, relapsed=3456.78s, dt=0.001289s
Error: wpa_supplicant DBus error in signalPoll: 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.
TRACE(signalpoll_onefile.cpp): iter=300275, relapsed=3481.79s, dt=24.9997s
Error: wpa_supplicant DBus error in signalPoll: 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.
TRACE(signalpoll_onefile.cpp): iter=300276, relapsed=3506.8s, dt=24.9995s
Error: wpa_supplicant DBus error in signalPoll: 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.
TRACE(signalpoll_onefile.cpp): iter=300277, relapsed=3531.81s, dt=24.9994s



Alex


On 01/02/15 03:12, Ralf Habacker wrote:
>
> Am 31.01.2015 um 16:10 schrieb Ralf Habacker:
>>
>> Am 31.01.2015 um 14:49 schrieb Ralf Habacker:
>>>> 5 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.
>>>>
>> After running about 54 minutes I got:
>>
>>  counts      time (ms)
>> 300272 3245606 signalInfo rssi=-63
>> 300273 3245616 signalInfo rssi=-63
>> Error: wpa_supplicant DBus error in signalPoll: 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.
>>
> second run gave same results:
> ...
>
> 300272 3548324 1 signalInfo rssi=-57
> 300273 3548413 79 signalInfo rssi=-59
> Error: wpa_supplicant DBus error in signalPoll: 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.
>
> Sounds as a kind of limits reached. The counts are collected as shown 
> below:
>
>     while ( true )
>     {
>         try {
>             int a = timer.elapsed();
>             int rssi = signalPoll( *netDevInterfaceInterface_ );
>             int b = timer.elapsed();
>             cout << i++ << " " << b << " " << (b-a) << " signalInfo 
> rssi=" << rssi << endl;
>         }
>
>> Ralf
>>
>>
>> _______________________________________________
>> dbus mailing list
>> dbus@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dbus
>


-- 
------------------------------
Dr Alex Brooks
Marathon Targets Pty Ltd
Ph: +61 2 8090 7202
Web: www.marathon-targets.com
------------------------------


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Ralf,<br>
      <br>
      I tried with the modifications you suggest (tracking number of
      iterations and time).<br>
      There's a magic number: in all cases it starts failing after
      300274 iterations (100% repeatable):<br>
      <br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=1, relapsed=0.00127s,
      dt=0.001258s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=2, relapsed=0.012663s,
      dt=0.001231s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=3, relapsed=0.023954s,
      dt=0.00118s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=4, relapsed=0.035219s,
      dt=0.001154s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=5, relapsed=0.046478s,
      dt=0.001148s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=6, relapsed=0.057801s,
      dt=0.001208s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=7, relapsed=0.069105s,
      dt=0.001194s<br>
      ...<br>
      ... wait ~55min ...<br>
      ...<br>
      signalInfo rssi=-45<br>
      TRACE(signalpoll_onefile.cpp): iter=300268, relapsed=3456.71s,
      dt=0.001268s<br>
      signalInfo rssi=-45<br>
      TRACE(signalpoll_onefile.cpp): iter=300269, relapsed=3456.72s,
      dt=0.001208s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=300270, relapsed=3456.74s,
      dt=0.001236s<br>
      signalInfo rssi=-38<br>
      TRACE(signalpoll_onefile.cpp): iter=300271, relapsed=3456.75s,
      dt=0.001205s<br>
      signalInfo rssi=-42<br>
      TRACE(signalpoll_onefile.cpp): iter=300272, relapsed=3456.76s,
      dt=0.001225s<br>
      signalInfo rssi=-41<br>
      TRACE(signalpoll_onefile.cpp): iter=300273, relapsed=3456.77s,
      dt=0.001214s<br>
      signalInfo rssi=-47<br>
      TRACE(signalpoll_onefile.cpp): iter=300274, relapsed=3456.78s,
      dt=0.001289s<br>
      Error: wpa_supplicant DBus error in signalPoll: 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.<br>
      TRACE(signalpoll_onefile.cpp): iter=300275, relapsed=3481.79s,
      dt=24.9997s<br>
      Error: wpa_supplicant DBus error in signalPoll: 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.<br>
      TRACE(signalpoll_onefile.cpp): iter=300276, relapsed=3506.8s,
      dt=24.9995s<br>
      Error: wpa_supplicant DBus error in signalPoll: 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.<br>
      TRACE(signalpoll_onefile.cpp): iter=300277, relapsed=3531.81s,
      dt=24.9994s<br>
      <br>
      <br>
      <br>
      Alex<br>
      <br>
      <br>
      On 01/02/15 03:12, Ralf Habacker wrote:<br>
    </div>
    <blockquote cite="mid:54CCFEDA.5000703@habacker.de" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <br>
      <div class="moz-cite-prefix">Am 31.01.2015 um 16:10 schrieb Ralf
        Habacker:<br>
      </div>
      <blockquote cite="mid:54CCF07F.5060902@habacker.de" type="cite">
        <meta content="text/html; charset=UTF-8"
          http-equiv="Content-Type">
        <br>
        <div class="moz-cite-prefix">Am 31.01.2015 um 14:49 schrieb Ralf
          Habacker:<br>
        </div>
        <blockquote cite="mid:54CCDD4E.9060505@habacker.de" type="cite">
          <meta content="text/html; charset=UTF-8"
            http-equiv="Content-Type">
           
          <blockquote
cite="mid:CAE8XxP-w5Fjbfd_ENdNh2sY=AOkgbnNfSuJF1N0ACVq+8mf2YA@mail.gmail.com"
            type="cite">
            <div class="gmail_quote">5 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>
        </blockquote>
        After running about 54 minutes I got: <br>
        <br>
         counts      time (ms) <br>
        300272 3245606 signalInfo rssi=-63<br>
        300273 3245616 signalInfo rssi=-63<br>
        Error: wpa_supplicant DBus error in signalPoll: 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.<br>
        <br>
      </blockquote>
      second run gave same results: <br>
      ...<br>
      <br>
      300272 3548324 1 signalInfo rssi=-57<br>
      300273 3548413 79 signalInfo rssi=-59<br>
      Error: wpa_supplicant DBus error in signalPoll: 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.<br>
      <br>
      Sounds as a kind of limits reached. The counts are collected as
      shown below:<br>
      <br>
          while ( true )<br>
          {<br>
              try {<br>
                  int a = timer.elapsed();<br>
                  int rssi = signalPoll( *netDevInterfaceInterface_ );<br>
                  int b = timer.elapsed();<br>
                  cout &lt;&lt; i++ &lt;&lt; " " &lt;&lt; b &lt;&lt; " "
      &lt;&lt; (b-a) &lt;&lt; " signalInfo rssi=" &lt;&lt; rssi &lt;&lt;
      endl;<br>
              }<br>
      <br>
      <blockquote cite="mid:54CCF07F.5060902@habacker.de" type="cite">
        Ralf <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
dbus mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" \
href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a> <a \
moz-do-not-send="true" class="moz-txt-link-freetext" \
href="http://lists.freedesktop.org/mailman/listinfo/dbus">http://lists.freedesktop.org/mailman/listinfo/dbus</a>
 </pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
------------------------------
Dr Alex Brooks
Marathon Targets Pty Ltd
Ph: +61 2 8090 7202
Web: <a class="moz-txt-link-abbreviated" \
                href="http://www.marathon-targets.com">www.marathon-targets.com</a>
------------------------------
</pre>
  </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