-
-
Notifications
You must be signed in to change notification settings - Fork 311
Description
We have a very large Java 11 project, using easymock 4.3, that has tons of illegal accesses. (I.e. many many tests fail when we enable --illegal-access=deny.) Everything works fine right now, we're just looking ahead to the future (i.e. Java 17, when 'deny' becomes the default.)
Building with easymock 5.0.1, the build (gradle 5) OOMs after running the first ~11,000 tests. (There are 20,000+). Watching the CPU, looks like a clear sign of thrashing/memory leak, as the # of tests run increases. Telling our gradle build to fork a new JVM every 100 test classes makes everything work OK, but slower.
I grabbed a heap dump shortly before the OOM -- all 667MB of it -- and I see 1.5M instances of "java.lang.reflect.Method", which seems unusual, to say the least.
I don't know how to diagnose this further, but it certainly smells like a memory leak in/around easymock 5. I can post the heap dump file somewhere public if that is useful. Or happy to perform any other experiments as suggested.
Sorry to be so vague, but I wanted to offer everything we know at the moment. The Gradle "forkEvery" option will work for us, but wanted to post the issue in case it is useful.