Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
FFI memory leak regression #4625
No additional gems installed or loaded.
I discovered this bug in a production service that uses the
I expect JRuby to not run out of memory when repeatedly allocating and freeing a constant number of
In the test script below there is a single thread that allocates and then immediately frees what it allocated. I've run this for several minutes successfully on JRuby 220.127.116.11 and MRI 2.4.1 but on JRuby 18.104.22.168 and 22.214.171.124 it runs out of memory within a few seconds.
The JVM runs out of memory after a few seconds. It doesn't look like the native memory allocations are ever freed.
The result of running the above script on JRuby 126.96.36.199:
Just before it crashed the heap histogram looked like this:
Seeing this on a large-ish app after ~18 hours of runtime.