Re: dbus_connection_send_with_reply_and_block eats 100% CPU then eventually times out

Alex Brooks <a.brooks-q5Kw/nu8f7BaUVwZm7wrbVaTQe2KTcn/@public.gmane.org>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
On 01/02/15 00:49, Ralf Habacker wrote:
>
> 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-aVxs2ipq/[email protected] 
>> <mailto:ralf-aVxs2ipq/[email protected]>> 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

The 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 ?

Just of the client app (search for 'strace' on 
https://bugreports.qt.io/browse/QTBUG-43550).

>>     > [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

Yes you're right sorry, the client code I posted was polling at 10Hz.  I 
subsequently increased to 100Hz which doesn't overload my processor, and 
reproduces faster.

>
> 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
>>
>


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

_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.