Transaction timing out on 586 embedded CPU

Aleksander Morgado aleksander at lanedo.com
Tue Dec 4 03:13:56 PST 2012


Hey Kai,

>>
>>>     > When trying with verbose flag it takes forever, too, but some of the
>>>     > expected output can be seen (however not received on time as it
>>>     > seems):
>>>
>>>     By default all async operations in qmicli are configured with a 10s
>>>     timeout, so it really may be taking longer in your case. You can either
>>>     try to update those 10s to something bigger, e.g. 30s.
>>>
>>>     Or better, modify qmicli to add a new `--command-timeout=N' option which
>>>     would allow us to specify the default number of seconds to wait in each
>>>     async operation... Patches welcome :-)
>>>
>>>     --
>>>     Aleksander
>>>
>>>
>>> Yes, that would easily be possible, but why do the operations take
>>> longer on this board than on other ones in the first place?
>>> It has USB2.0 support and a decent CPU, too.
>>> I dont see big CPU usage, interrupt floods or such.
>>>
>>> How could we debug where the delay comes from?
>>>
>>
>> Does it happen with every command you try? Or only with Get PIN status?
>> If the latter, it may be because the SIM needs time to get initialized?
>>
>> The CID allocation request+response is really instant according to your
>> logs, there's no delay in there. Same for the CID release.
>>
>> If you update the timeout value to e.g. 30s and you still get the same
>> issue, then there may be a problem on how the data is read from the
>> socket and how we actually poll for it. In your logs the reply to Get
>> PIN Status actually arrived *just* after we sent the CID release; so
>> that may not be a coincidence.
>>
>> --
>> Aleksander
> 
> It happens with every command.
> E.g.:
> root at MeshUnit13:~# qmicli -d /dev/cdc-wdm0 --nas-get-system-info
> error: operation failed: Transaction timed out
> root at MeshUnit13:~# qmicli -d /dev/cdc-wdm0 --dms-get-capabilities
> error: operation failed: Transaction timed out
> root at MeshUnit13:~# qmicli -d /dev/cdc-wdm0 --dms-get-power-state
> error: operation failed: Transaction timed out
> root at MeshUnit13:~# qmicli -d /dev/cdc-wdm0 --dms-get-ids
> error: operation failed: Transaction timed out
> 
> I saw the line "read(3, 0xbfdfbd6c, 16)                 = -1 EAGAIN
> (Resource temporarily unavailable)" in strace. Could that be the
> problem?

It may be. Can you try to test with the attached patch?

> 
> Could you give me a hint in which sourcefile(s) I could start to look
> for the timeout?
> 

Check qmicli_dms_run() in cli/qmicli-dms.c. You have there all calls to
the DMS related operations, try to update the timeout to > 10s there.

-- 
Aleksander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-device-directly-retry-to-read-on-EAGAIN.patch
Type: text/x-patch
Size: 1518 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20121204/c70703e8/attachment-0001.bin>


More information about the libqmi-devel mailing list