Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40621

MavenEmbedderUtils#getMavenVersion() leaks file descriptors

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Maven Plugin and Artifactory Plugin are affected.

      Such descriptor leaks, for example, prevent change of the Maven tool version on Windows.

      The fix is required here: https://github.com/jenkinsci/lib-jenkins-maven-embedder/blob/master/src/main/java/hudson/maven/MavenEmbedderUtils.java#L186-L213 . This library is included directly into the Maven plugin, hence it should be possible to do it. The only problem is that there are several unreleased changes in libs since 2013s. Should be "safe" after the quick look

      #553 /Users/nenashev/Documents/...
      /hudson.tasks.Maven_MavenInstallation/M3/lib/commons-lang-2.6.jar by thread:Executor #1 for master : executing MyMvnBuild #1 on Thu Dec 22 09:18:49 CET 2016
      at java.util.zip.ZipFile.<init>(ZipFile.java:151)
      at java.util.jar.JarFile.<init>(JarFile.java:166)
      at java.util.jar.JarFile.<init>(JarFile.java:103)
      at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:893)
      at sun.misc.URLClassPath$JarLoader.access$700(URLClassPath.java:756)
      at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:838)
      at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:831)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:830)
      at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:803)
      at sun.misc.URLClassPath$3.run(URLClassPath.java:530)
      at sun.misc.URLClassPath$3.run(URLClassPath.java:520)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.misc.URLClassPath.getLoader(URLClassPath.java:519)
      at sun.misc.URLClassPath.getLoader(URLClassPath.java:492)
      at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:457)
      at sun.misc.URLClassPath.findResource(URLClassPath.java:187)
      at java.net.URLClassLoader$2.run(URLClassLoader.java:569)
      at java.net.URLClassLoader$2.run(URLClassLoader.java:567)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findResource(URLClassLoader.java:566)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.findResource(ClassRealm.java:281)
      at hudson.maven.MavenEmbedderUtils.getMavenVersion(MavenEmbedderUtils.java:196)
      at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:69)
      at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:41)
      at hudson.FilePath.act(FilePath.java:1083)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:642)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      at hudson.model.Run.execute(Run.java:1729)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            pom.xml
            src/main/java/hudson/maven/MavenEmbedderCallable.java
            src/main/java/hudson/maven/MavenEmbedderUtils.java
            src/test/java/hudson/maven/TestMavenEmbedderUtils.java
            http://jenkins-ci.org/commit/lib-jenkins-maven-embedder/9229e4be5d5d3667de6ae97161f09596826c6798
            Log:
            Merge pull request #13 from oleg-nenashev/JENKINS-42549

            [JENKINS-42549, JENKINS-40621] - Handle fallout after #5

            Compare: https://github.com/jenkinsci/lib-jenkins-maven-embedder/compare/bcac0b5bd889...9229e4be5d5d

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: pom.xml src/main/java/hudson/maven/MavenEmbedderCallable.java src/main/java/hudson/maven/MavenEmbedderUtils.java src/test/java/hudson/maven/TestMavenEmbedderUtils.java http://jenkins-ci.org/commit/lib-jenkins-maven-embedder/9229e4be5d5d3667de6ae97161f09596826c6798 Log: Merge pull request #13 from oleg-nenashev/ JENKINS-42549 [JENKINS-42549, JENKINS-40621] - Handle fallout after #5 Compare: https://github.com/jenkinsci/lib-jenkins-maven-embedder/compare/bcac0b5bd889...9229e4be5d5d
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/maven-plugin/8983583f2ed58734da3edd1b72428476bcd1a5a9
            Log:
            [JENKINS-42549, JENKINS-40621] - Update the Maven Embedder Lib to 3.12.1

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/maven-plugin/8983583f2ed58734da3edd1b72428476bcd1a5a9 Log: [JENKINS-42549, JENKINS-40621] - Update the Maven Embedder Lib to 3.12.1
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/maven-plugin/c068c94037bc76172b682175878dbdd4c01f163a
            Log:
            [JENKINS-42549, JENKINS-40621] - Update the Maven Embedder Lib to 3.12.1

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/maven-plugin/c068c94037bc76172b682175878dbdd4c01f163a Log: [JENKINS-42549, JENKINS-40621] - Update the Maven Embedder Lib to 3.12.1
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix has been released in Maven Plugin 2.17 and Maven Embedder Lib 3.12.1

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix has been released in Maven Plugin 2.17 and Maven Embedder Lib 3.12.1
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/main/java/hudson/maven/MavenEmbedderUtils.java
            http://jenkins-ci.org/commit/lib-jenkins-maven-embedder/a1d7a99605ca6b8f7d79498a3d0d4891656a8b0c
            Log:
            Merge pull request #5 from abayer/jenkins-40621

            [FIXED JENKINS-40621] Prevent leaked file descriptors.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/maven/MavenEmbedderUtils.java http://jenkins-ci.org/commit/lib-jenkins-maven-embedder/a1d7a99605ca6b8f7d79498a3d0d4891656a8b0c Log: Merge pull request #5 from abayer/jenkins-40621 [FIXED JENKINS-40621] Prevent leaked file descriptors.

              People

              • Assignee:
                oleg_nenashev Oleg Nenashev
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: