Open nathan-maves opened 1 week ago
Pinging @elastic/es-core-infra (Team:Core/Infra)
For the second part... maxVirtualMemorySize
certainly looks like a bug. @rjernst - do you agree it should be calling maxFileSize
? The code came from here.
I've changed it to accept both Long.MIN_VALUE
and -1
. A comment in the unit test seems to suggest that this value can be MIN_VALUE
if the size is "not available".
I think you might want to add the -1 to this check as well.
There could be others too.
I believe @rjernst is also looking at this now.
@nathan-maves - what happens if you try to use -1?
You can see in the logs I added to the issue we already have the system set to -1
. So the code is reading in the value of -1
and telling us that it is too low.
max file size [-1] for user [####] is too low
Are there any other log messages like unable to retrieve max size virtual memory
? We translate the RLIMIT_INFINITY value for each system into our own (which is represented by MAX_INT). I suspect what is happening here is the rlimit call failed, which then stores our own UNKNOWN
(-1), but the bootstrap checks aren't currently specializing the error message for that case, so it looks as if -1 was not handled.
The issue description mentiones "Unix" as the OS. Do you mean linux, and if so, what distribution? We do not support any Unix distributions, and I can see how that might be an issue (our rlimit calls are probably not setup right for unix).
That was my bad. I am pretty sure we support RHEL and rocky linux.
The merged PR only fixes one of the reported problems. The "-1 problem" still exists.
Is there anything your team needs from me?
A member of my team tried both "unlimited" and "-1" and ES 8.15 would not start up on debian linux. This might stem from the issue you fixed as the code is not reading the correct setting value. Is there any chance we can get a build with the fix to test things out?
Hey @nathan-maves - I think we have everything we need. I'll try to reproduce today and reach out if I'm unable to do so.
Actually @nathan-maves - can you please confirm that you have no files in /etc/security/limits.d
?
Elasticsearch Version
8.15
Installed Plugins
No response
Java Version
bundled
OS Version
Linux
Problem Description
We have found a few issues with the Bootstrap checks on Linux/Unix machines. The first is that a value of
-1
should be accepted along withunlimited
andinfinity
based on this documentation.The second issue is that this code appears to be incorrect.
It should be checking for the max file size and NOT the max memory size
Steps to Reproduce
Set the
fsize
value to-1
in the/etc/security/limits.conf
file then start up Elastic 8.15.x.Logs (if relevant)