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

MavenEmbedderUtils#getMavenVersion() leaks file descriptors

    XMLWordPrintable

Details

    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

            oleg_nenashev Oleg Nenashev created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Description Maven Plugin and Artifactory Plugin are affected.

            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

            {noformat}
            #553 /Users/nenashev/Documents/cloudbees/support/zd41382/work/tools/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)
            {noformat}
            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

            {noformat}
            #553 /Users/nenashev/Documents/cloudbees/support/zd41382/work/tools/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)
            {noformat}
            oleg_nenashev Oleg Nenashev made changes -
            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

            {noformat}
            #553 /Users/nenashev/Documents/cloudbees/support/zd41382/work/tools/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)
            {noformat}
            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

            {noformat}
            #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)
            {noformat}
            abayer Andrew Bayer made changes -
            Assignee Eyal Ben Moshe [ eyalbe ] Andrew Bayer [ abayer ]
            abayer Andrew Bayer made changes -
            Component/s artifactory-plugin [ 15689 ]
            abayer Andrew Bayer made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Component/s artifactory-plugin [ 15689 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #5 (Web Link)" [ 15160 ]
            abayer Andrew Bayer made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            oleg_nenashev Oleg Nenashev made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            aheritier Arnaud Héritier made changes -
            Epic Link JENKINS-41349 [ 178128 ]
            aheritier Arnaud Héritier made changes -
            Status Reopened [ 4 ] In Progress [ 3 ]
            aheritier Arnaud Héritier made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            aheritier Arnaud Héritier made changes -
            Component/s artifactory-plugin [ 15689 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is duplicated by JENKINS-39125 [ JENKINS-39125 ]
            oleg_nenashev Oleg Nenashev made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Andrew Bayer [ abayer ] Oleg Nenashev [ oleg_nenashev ]
            oleg_nenashev Oleg Nenashev made changes -
            Status Reopened [ 4 ] In Progress [ 3 ]
            oleg_nenashev Oleg Nenashev made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            oleg_nenashev Oleg Nenashev made changes -
            Remote Link This issue links to "lib-jenkins-maven-embedder/pull/13 (Web Link)" [ 17204 ]
            oleg_nenashev Oleg Nenashev made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            jamesdumay James Dumay made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2296 (Web Link)" [ 18353 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1569 (Web Link)" [ 18640 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: