Description
- A clear description of the issue
While running flow tests we see that the heap size keeps growing over time. The Garbage Collector does not seem to be able to free used memory.
When setting max heap size to 2048 MB we are able to run all the tests successfully. Heap size grows until the limit and heap usage is around 800 MB. If we set the max heap size to 1024 MB, heap usage also grows to 800 MB, but tests start to fail with java.lang.OutOfMemoryError: Java heap space
after running 46 tests.
- Any logs or stack traces that you can provide (use a site like
for larger logs)
We created a heap dump with VisualVM 1.4.2 and analyzed it with Eclipse Memory Analyzer Version 1.12.0. The leaks suspects report can be found below.
Seems there is a memory leak related to org.hibernate.internal.SessionFactoryImpl
.
heapdump-1626117000482_Leak_Suspects.zip
- Steps to reproduce the issue
We are creating a mock network and calling stopNodes()
at the end of each test. We are running 63 flow tests.
- The version/tag/release or commit hash it occurred on
orda_release_version = '4.6'
corda_gradle_plugins_version = '5.0.12'
kotlin_version = '1.2.71'
junit_version = '4.13'
quasar_version = '0.7.12_r3'
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)