[ https://issues.apache.org/jira/browse/MCHECKSTYLE-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943534#comment-17943534 ]
Michael Osipov commented on MCHECKSTYLE-457: -------------------------------------------- Interesting, we need to see whether we need to invoke some public {{close()}} to have that released. [~romani], can you help from the top of your head? > memory leak in checkstyle plugin > -------------------------------- > > Key: MCHECKSTYLE-457 > URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-457 > Project: Maven Checkstyle Plugin > Issue Type: Bug > Components: checkstyle:check > Affects Versions: 3.6.0 > Reporter: James Nord > Priority: Major > Attachments: image-2025-04-11-12-55-18-038.png > > > memory used by checkstyle:check mojo is not released after the mojo completes > its analysis. > In a build on [Jenkins|https://github.com/jenkinsci/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. > h3. Steps to reproduce > * clone https://github.com/jenkinsci/jenkins/ > * switch to the {{jenkins-2.504}} branch > * edit .mvn/jvm.config so it contains the following (to force running out of > memory and providing a heap dump): > {code:properies} > -Xmx500M > -XX:+HeapDumpOnOutOfMemoryError > -XX:HeapDumpPath=D:\source\github\cloudbees\private-jenkins > {code} > * run {{mvn clean verify -DskipTests}} > h3. 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. > h3. 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 > -- This message was sent by Atlassian Jira (v8.20.10#820010)