On 10/26/2017 12:43 PM, Christophe Ronco wrote:


Seems to be this:

i)  When the modem is first powered on, service discovery takes some time (more than 5 seconds)
ii)  The service discovery timeout fires before the QMI request returns so discover_reply gets called before discover_callback and things get cleaned up
iii)  Then the QMI request returns and discover_callback gets called even though the request has timed out in ii)

...and this is where things go wrong because the userdata pointer to discover_callback is probably no longer valid.

How do we handle the QMI request returning a _late_ response, i.e. after it technically has timed out?  I'll dig a bit more...

/Jonas

Hi Jonas,

When I look at my personal patches, it seems I've already seen that. Please find attached the patch I currently have in my setup on this subject.


Yes, that's exactly what I was just in the process of implementing.  Glad you beat me to it.  :)

I tested your patch and it solves the problem.  Can you submit it to the list?  If not, I will... :)

I think service_create_reply() has the same issue but I don't hit it in my setup..

Eswaran:  try the patch from Christophe... I'm 99% certain it solves your issue.

/Jonas

Christophe






_______________________________________________
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono