Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible memory leak when running flow tests #6926

Open
diegomrsantos opened this issue Jul 14, 2021 · 1 comment
Open

Possible memory leak when running flow tests #6926

diegomrsantos opened this issue Jul 14, 2021 · 1 comment
Labels

Comments

@diegomrsantos
Copy link

  • 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)

@nargas-ritu
Copy link
Contributor

Logged in the backlog for an internal review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants