Hi Hans,

Hans de Goede wrote:
> Hi Erik,
>
> On 01/21/2014 10:42 AM, Erik Rull wrote:
>> Hi all,
>>
>> getting a tpriv->urbs NULL pointer causes negative urb_idx and successively 
>> an
>> undefined behavior! This happens when removing a USB device during a transfer
>> with a chance of ~ 20%.
>
> Thanks for looking into this, the big question is why tpriv->urbs becomes 
> NULL,
> that should never happen for a not yet finished trasnfer, it would be great if
> you could debug this further focusing on why tpriv->urbs becomes NULL.
>
> It may be helpful to also print the transfer pointer when this happens, and 
> then
> look in the debugging traces to see what exactly is happening with this 
> transfer
> before the problem.
>
> Regards,
>
> Hans
>

a short update - not yet complete:
when inserting a usleep(1000) in the first line of discard_urbs(...) 
everything works fine! Might it be possible that the kernel does not get 
the time to update all its structures? The process using the libusb is 
running at nice -19 and the kernel is preemptive.

I will proceed with the urbs-NULL-pointer-assignment and let you know my 
results.

Best regards,

Erik


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to