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

Script[s] to detect memory leaks in Gradle tests #15935

Open
alex-kuzmin-hg opened this issue Oct 9, 2024 · 2 comments
Open

Script[s] to detect memory leaks in Gradle tests #15935

alex-kuzmin-hg opened this issue Oct 9, 2024 · 2 comments
Assignees

Comments

@alex-kuzmin-hg
Copy link

No description provided.

@alex-kuzmin-hg alex-kuzmin-hg self-assigned this Oct 9, 2024
@alex-kuzmin-hg
Copy link
Author

Problem:

> Task :test-clients:test
 JUnit Jupiter ✘ executionError

  org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to execute tests

  Caused by: org.junit.platform.commons.JUnitException: Error executing tests for engine junit-jupiter

  Caused by: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError

  Caused by: java.lang.OutOfMemoryError

  Caused by: java.lang.OutOfMemoryError: Java heap space



  INFO StatusConsoleListener The nolookups option will be ignored. Message Lookups are no longer supported.
  INFO StatusConsoleListener The nolookups option will be ignored. Message Lookups are no longer supported.
  2024-10-10 02:44:38.538 INFO  84  ConfigProviderBase - Properties file data/config/genesis.properties does not exist and won't be used as configuration source
  2024-10-10 02:44:38.540 INFO  84  ConfigProviderBase - Properties file data/config/application.properties does not exist and won't be used as configuration source


 2330 passing (2h 25m)
 1 pending
 6 failing


2337 tests completed, 6 failed, 1 skipped

> Task :test-clients:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test-clients:test'.
> There were failing tests. See the report at: file:///home/alex.kuzmin/workspaces/hedera-services-anthony-14970/hedera-services/hedera-node/test-clients/build/reports/tests/test/index.html

BUILD FAILED in 2h 25m 47s
182 actionable tasks: 1 executed, 181 up-to-date

@alex-kuzmin-hg
Copy link
Author

Scripted the following:

  1. added to hedera-node/test-clients/build.gradle.kts
    jvmArgs("-XX:ActiveProcessorCount=6","-XX:+ExitOnOutOfMemoryError","-XX:+HeapDumpOnOutOfMemoryError","-XX:OnOutOfMemoryError="/home/alex.kuzmin/heapAndQuit.sh"")
  2. /home/alex.kuzmin/heapAndQuit.sh - to report 'lsof' of this Java process

@alex-kuzmin-hg alex-kuzmin-hg changed the title Script[s] to detect memory leaks in PBJ tests Script[s] to detect memory leaks in Gradle tests Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant