USB stack getting confused
O'Connor, Daniel
darius at dons.net.au
Mon Mar 11 13:01:25 UTC 2019
> On 11 Mar 2019, at 21:27, Konstantin Belousov <kostikbel at gmail.com> wrote:
>
> On Mon, Mar 11, 2019 at 09:27:56AM +0100, Hans Petter Selasky 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!
> If I am interpreting the output right, it is only 634 (or close) file
> descriptors opened.
It's 64 descriptors for that particular USB device (/dev/usb/0.5.0) - I am guessing there is some hard limit in the USB stack related to that.
The system definitely isn't out of FDs generally ->
[maarsytest 12:33] ~> sysctl kern.openfiles kern.maxfiles
kern.openfiles: 386
kern.maxfiles: 521571
> Too many fds errors are ENFILE when too many file descriptors in the system
> already exist, limited by kern.maxfiles, and EMFILE when per-process
> lmit is exceeded (resource RLIMIT_NOFILE).
>
> So your ENOMEM must come from something else.
Yes, I think it must be a limit in the USB stack.
--
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