USB stack getting confused

O'Connor, Daniel darius at dons.net.au
Mon Mar 11 13:06:11 UTC 2019



> On 11 Mar 2019, at 18:57, Hans Petter Selasky <hps at selasky.org> wrote:
> 
> On 3/11/19 7:27 AM, O'Connor, Daniel wrote:
>> I just realised I can check procstat for open file, derp.
>> [maarsytest 6:26] ~> procstat -f 2324|grep 0.5.0| wc
>>       64     640    4928
>> So I guess that is why it is giving ENOMEM, I'm leaking FDs!
> 
> That looks like a bug in your application??

Yes, I think it is.
I thought it was something else because usbconfig didn't see the device.

> Which USB API are you using?

The libusb10 interface - I didn't write the code (the vendor supplied a Linux version that was trivially compilable on FreeBSD).

I have the source code and I can see what the issue is so I'll fix that, although I am surprised the limit for USB devices is so much lower than the system limit for file descriptors generally.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum




More information about the freebsd-hackers mailing list