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

Maven version detection fails on same agent with 'java.lang.IllegalStateException: zip file closed' exception

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • maven-plugin
    • Jenkins
      Version - 2.32.3
      OS - Ubuntu 16.04 x64
      Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

      Slave - Windows 7 Enterprise
      Java SE Development Kit 8u121 (Configured in jenkins Global Tool Configuration)

      Have setup 4 jenkins jobs to run on the same node, and a job that triggers all 4 jobs at the same time

      job-parent -> maven-job1
      maven-job2
      maven-job3
      maven-job4

      When Running job-parent almost every time 2-3 jobs out of 4 fail at checking out the code with the following exception:
       

      Started by upstream project "SanityLinux-UBUNTU14.04-D1-EXT4" build number 4
      originally caused by:
       Started by user Administrator
      Building remotely on Sanity-Pool01-AutoSlaveLinux (windows) in workspace c:\jenkins\workspace\SanityLinux-UBUNTU14.04-D1-EXT4-D2-LVM-EXT4
      Fetching changes from the remote Git repository
      Checking out Revision 01b711db99104fcdd4a0946ac1ad5e5ee8d248dc (origin/7.25)
      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.IllegalStateException: zip file closed
      	at java.util.zip.ZipFile.ensureOpen(Unknown Source)
      	at java.util.zip.ZipFile.getEntry(Unknown Source)
      	at java.util.jar.JarFile.getEntry(Unknown Source)
      	at sun.net.www.protocol.jar.URLJarFile.getEntry(Unknown Source)
      	at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
      	at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
      	at hudson.maven.MavenEmbedderUtils.getMavenVersion(MavenEmbedderUtils.java:212)
      	at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:69)
      	at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:41)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Unknown Source)
      	at ......remote call to Channel to /10.11.6.120(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel.call(Channel.java:822)
      	at hudson.FilePath.act(FilePath.java:1080)
      	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:1728)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      project=hudson.maven.MavenModuleSet@44df909[SanityLinux-UBUNTU14.04-D1-EXT4-D2-LVM-EXT4]
      project.getModules()=[hudson.maven.MavenModule@197eae6e[SanityLinux-UBUNTU14.04-D1-EXT4-D2-LVM-EXT4/com.winmagic.qa:automation-tests][SanityLinux-UBUNTU14.04-D1-EXT4-D2-LVM-EXT4/com.winmagic.qa:automation-tests][relativePath:]]
      project.getRootModule()=hudson.maven.MavenModule@197eae6e[SanityLinux-UBUNTU14.04-D1-EXT4-D2-LVM-EXT4/com.winmagic.qa:automation-tests][SanityLinux-UBUNTU14.04-D1-EXT4-D2-LVM-EXT4/com.winmagic.qa:automation-tests][relativePath:]
      FATAL: zip file closed
      java.lang.IllegalStateException: zip file closed
      	at java.util.zip.ZipFile.ensureOpen(Unknown Source)
      	at java.util.zip.ZipFile.getEntry(Unknown Source)
      	at java.util.jar.JarFile.getEntry(Unknown Source)
      	at sun.net.www.protocol.jar.URLJarFile.getEntry(Unknown Source)
      	at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
      	at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
      	at hudson.maven.MavenEmbedderUtils.getMavenVersion(MavenEmbedderUtils.java:212)
      	at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:69)
      	at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:41)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Unknown Source)
      	at ......remote call to Channel to /10.11.6.120(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel.call(Channel.java:822)
      	at hudson.FilePath.act(FilePath.java:1080)
      	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:1728)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Finished: FAILURE
      

          [JENKINS-42549] Maven version detection fails on same agent with 'java.lang.IllegalStateException: zip file closed' exception

          Oleg Nenashev added a comment -

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

          Please confirm the fix

          Oleg Nenashev added a comment - The fix has been released in Maven Plugin 2.17 and Maven Embedder Lib 3.12.1 Please confirm the fix

          oleg_nenashev I just need to update the Maven Plugin to 2.17 for the fix?
          I have Jenkins 2.60.1 version

          Andrei Caragheorghii added a comment - oleg_nenashev I just need to update the Maven Plugin to 2.17 for the fix? I have Jenkins 2.60.1 version

          Oleg Nenashev added a comment -

          andrei_caragheorghii yes. It may take few hours for this version to get to update centers. But I already see it in my one

          Oleg Nenashev added a comment - andrei_caragheorghii yes. It may take few hours for this version to get to update centers. But I already see it in my one

          Mykola Lynnyk added a comment -

          The problem is back with 3.0-rc1, reproduced almost immediately after the upgrade; 2.17 appears to be safe to use, with it the problem wasn't seen for months.

           

          FATAL: zip file closed
          java.lang.IllegalStateException: zip file closed
          	at java.util.zip.ZipFile.ensureOpen(Unknown Source)
          	at java.util.zip.ZipFile.getEntry(Unknown Source)
          	at java.util.jar.JarFile.getEntry(Unknown Source)
          	at sun.net.www.protocol.jar.URLJarFile.getEntry(Unknown Source)
          	at java.util.jar.JarFile.getJarEntry(Unknown Source)
          	at hudson.maven.MavenEmbedderUtils.getMavenVersion(MavenEmbedderUtils.java:213)
          	at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:69)
          	at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:41)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
          	at hudson.remoting.Request$2.run(Request.java:336)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          	at java.util.concurrent.FutureTask.run(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          	at hudson.remoting.Engine$1$1.run(Engine.java:94)
          	at java.lang.Thread.run(Unknown Source)
          	at ......remote call to Channel to /10.90.208.112(Native Method)
          	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
          	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
          	at hudson.remoting.Channel.call(Channel.java:830)
          	at hudson.FilePath.act(FilePath.java:1082)
          	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:641)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
          	at hudson.model.Run.execute(Run.java:1735)
          	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:405)
          

          Mykola Lynnyk added a comment - The problem is back with 3.0-rc1, reproduced almost immediately after the upgrade; 2.17 appears to be safe to use, with it the problem wasn't seen for months.   FATAL: zip file closed java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(Unknown Source) at java.util.zip.ZipFile.getEntry(Unknown Source) at java.util.jar.JarFile.getEntry(Unknown Source) at sun.net.www.protocol.jar.URLJarFile.getEntry(Unknown Source) at java.util.jar.JarFile.getJarEntry(Unknown Source) at hudson.maven.MavenEmbedderUtils.getMavenVersion(MavenEmbedderUtils.java:213) at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:69) at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:41) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang. Thread .run(Unknown Source) at ......remote call to Channel to /10.90.208.112(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:830) at hudson.FilePath.act(FilePath.java:1082) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:641) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490) at hudson.model.Run.execute(Run.java:1735) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405)

          Mykola Lynnyk added a comment -

          The problem is reproducible again with the latest available version of the plugin - 3.0-rc1. It has clearly been fixed in 2.17.

          Mykola Lynnyk added a comment - The problem is reproducible again with the latest available version of the plugin - 3.0-rc1. It has clearly been fixed in 2.17.

          thanks mlynnyk

          oleg_nenashev I think it is better to open a new issue and link to this one ? WDYT ?

          Arnaud Héritier added a comment - thanks mlynnyk oleg_nenashev I think it is better to open a new issue and link to this one ? WDYT ?

          Oleg Nenashev added a comment -

          A new issue would be better

          Oleg Nenashev added a comment - A new issue would be better

          I opened JENKINS-47233 for the issue impacting the 3.0-rc1. This one was fixed in 2.17

          Arnaud Héritier added a comment - I opened  JENKINS-47233 for the issue impacting the 3.0-rc1. This one was fixed in 2.17

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/maven-plugin/8893af0751e819c09e6184103bdf24285747fd7a
          Log:
          JENKINS-47233 - Restore the fix of JENKINS-42549

          The fix has been reverted in 3.0.0-rc1 by https://github.com/jenkinsci/maven-plugin/pull/102.
          It was just a mistake I made when patching the dependencies, but unfortunately nobody noticed it during the code review.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/maven-plugin/8893af0751e819c09e6184103bdf24285747fd7a Log: JENKINS-47233 - Restore the fix of JENKINS-42549 The fix has been reverted in 3.0.0-rc1 by https://github.com/jenkinsci/maven-plugin/pull/102 . It was just a mistake I made when patching the dependencies, but unfortunately nobody noticed it during the code review.

          Code changed in jenkins
          User: Arnaud Heritier
          Path:
          pom.xml
          http://jenkins-ci.org/commit/maven-plugin/a267e66db9aa062251f3ee493cf2431c2c0a1f6d
          Log:
          Merge pull request #104 from oleg-nenashev/JENKINS-47233

          JENKINS-47233 - Restore the fix of JENKINS-42549

          Compare: https://github.com/jenkinsci/maven-plugin/compare/298861e13211...a267e66db9aa

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Arnaud Heritier Path: pom.xml http://jenkins-ci.org/commit/maven-plugin/a267e66db9aa062251f3ee493cf2431c2c0a1f6d Log: Merge pull request #104 from oleg-nenashev/ JENKINS-47233 JENKINS-47233 - Restore the fix of JENKINS-42549 Compare: https://github.com/jenkinsci/maven-plugin/compare/298861e13211...a267e66db9aa

            oleg_nenashev Oleg Nenashev
            andrei_caragheorghii Andrei Caragheorghii
            Votes:
            21 Vote for this issue
            Watchers:
            31 Start watching this issue

              Created:
              Updated:
              Resolved: