-
Notifications
You must be signed in to change notification settings - Fork 65
Description
James Nord opened MCHECKSTYLE-457 and commented
memory used by checkstyle:check mojo is not released after the mojo completes its analysis.
In a build on Jenkins an analysis of a heapdump shows that there is 180+MB retained by the JavaLanguageParser
!image-2025-04-11-12-55-18-038.png|thumbnail!
After the invocation of the mojo it is expected that memory would be relinquished.
Steps to reproduce
- clone https://github.com/jenkinsci/jenkins/
- switch to the
jenkins-2.504branch - edit
.mvn/jvm.configso it contains the following (to force running out of memory and providing a heap dump):
-Xmx500M
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=D:\source\github\cloudbees\private-jenkins
- run
mvn clean verify -DskipTests
Expected results
500M should be enough to build, or if the build fails due to memory there is no memory held by mojos (for part of their actions) that have completed.
Actual Results
the build fails producing the war in the maven-war-plugin (in the war project).
Inspection of the heap shows 180MB in use by com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser classloaders
Affects: 3.6.0
Attachments:
- image-2025-04-11-12-55-18-038.png (157.49 kB)
- screenshot-1.png (100.34 kB)