Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2019 12:57:47 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        "O'Connor, Daniel" <darius@dons.net.au>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: USB stack getting confused
Message-ID:  <20190311105747.GT2492@kib.kiev.ua>
In-Reply-To: <1692bbc5-02f4-d0e9-a290-219f045ff55b@selasky.org>
References:  <20190309192330.GO2492@kib.kiev.ua> <fd5038a4-406b-6e4b-bb52-b567b1954ad1@selasky.org> <20190310094758.GP2492@kib.kiev.ua> <35f69493-4bbb-4142-b61a-3e90adc8777b@selasky.org> <20190310102629.GQ2492@kib.kiev.ua> <40bf77e0-47a5-6edc-b5d0-58e3c44988ac@selasky.org> <030A0C16-4508-4C7C-A87C-72B69B15EDF5@dons.net.au> <1BBD445B-9A27-4BE7-9B60-04BE0814D7CA@dons.net.au> <CDE6EC29-BCEE-46FD-A2A2-82772304BE46@dons.net.au> <1692bbc5-02f4-d0e9-a290-219f045ff55b@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

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.

> 
> That looks like a bug in your application??
> 
> Which USB API are you using?
> 
> --HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190311105747.GT2492>