Limit memory consumption in test on overflow#17373
Conversation
…p alive a reference to a 2GB Java String
|
This pull request does not have a backport label. Could you fix it @andsel? 🙏
|
8c7b3f4 to
cff2dba
Compare
Why the test requires 10GB of JVM heap?To explain why the test needs 10GB while it just allocate 2GB string it's needed to see all the allocations that are done. With 4GB the test is not able to allocate space for the RubyString at https://github.com/elastic/logstash/pull/17373/files#diff-6c455e621a523fb4c88050efc394a576e69e0c0ef293b93ced25d8c4b6cadab4R161 Stack trace 4GBWith 6GB the Stack trace 6GBWith 8GB the Stack trace 8GB |
|
💚 Build Succeeded
History
cc @andsel |
Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4)
Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4)
Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4)
Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4)
Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4)
…17415) Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4) Co-authored-by: Andrea Selva <selva.andre@gmail.com>
…#17414) Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4) Co-authored-by: Andrea Selva <selva.andre@gmail.com>
…#17413) Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4) Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4)
…17411) Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4) Co-authored-by: Andrea Selva <selva.andre@gmail.com>
…#17412) Updates only test code to be able to run a test that consumes big memory if: - the physical memory is bigger than the requested Java heap - JDK version is greater than or equal to 21. The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error. (cherry picked from commit 075fdb4) Co-authored-by: Andrea Selva <selva.andre@gmail.com>





Release notes
[rn:skip]
What does this PR do?
Updates only test code to be able to run a test that consumes big memory if:
The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error.
Why is it important/What is the impact to the user?
N/A
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)Author's Checklist
How to test this PR locally
https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/1569https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/1594Related issues