I'm using Azul Java 17.0.10 which has default container support for cgroupsv2 and correctly inferences the Pods memory limit which is set to 1 GiB.
We directly run the java process as PID1 inside the container, but still under heavy load wese OOMKill for this container.
My mind model was that the JVM will not use any more memory then the cgroups memory limit.
But this doesn't seem to be true. How to find out what is causing the memory usage? Is there a way to get a stack trace of the offending memory request?