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
/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

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 amd64


Home | Main Index | Thread Index | Old Index