tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: maximum limit of files open with O_EXLOCK



On Sat, 19 Jun 2021, nia wrote:

There seems to be a limit somewhere that causes open() to return ENOMEM
when 1000+ files are opened with O_EXLOCK, this is independent of any
"open file" limits.


Seems tied to ulimit -n:

/tmp# ulimit -n
1024
/tmp# ./t; rm -f XXX[0-9]*
bleh 1021: Too many open files
/tmp# ulimit -n 512; ./t; rm -f XXX[0-9]*
bleh 509: Too many open files
/tmp# ulimit -n 256; ./t; rm -f XXX[0-9]*
bleh 253: Too many open files
/tmp# ulimit -n 703; ./t; rm -f XXX[0-9]*
bleh 700: Too many open files
/tmp#

Always 3 less than `ulimit -n' on:

NetBSD x202e.localdomain 9.99.82 NetBSD 9.99.82 (GENERIC) #0: Sat May 8 19:36:28 UTC 2021 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64

-RVP


Home | Main Index | Thread Index | Old Index