Hi Pete, for me it is fairly easy to reproduce with an ultrasound equipment we 
developed in PUC-Rio university using Opalkelly FPGA cards (which include USB 
ports). I can run our app + libusbx receiving tons of data for days flawless if 
the highvoltage ultrasound power supply is disabled. 

However, if i turn the HV power on, there will be very short +100/-100V pulses 
being produced thousands times per second. This creates a lot of RF noise. With 
HV power on I consistently trigger this infinite loop in a matter of minutes, 
among with other transmissions errors which don't cause the app to freeze.

The software can't tell the difference if the HV power is on or off. I have 
already tried reading/writing to the buffers passed to libusbx to prove they 
are not invalid pointers.

If you want to perform any additional tests or try other theories please let me 
know. But i think the failure is well understood: the kernel can't perform a 
copy_to_user because the size of the transfer somehow got corrupted either in 
outgoing request (most likely) or in incoming transfer, so it won't fit the 
provided buffer that expected a different size. Still (as clearly shown in 
kernel code) even if copy fails, the urb is freed there, so this explains why 
cancel will also fail with this error. Then, by staying in this loop, we will 
be waiting forever for a non-existent event to occur.


---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/pull/167#issuecomment-31984952
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&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