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

auto-installation of maven fails when many builds trigger at the same time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • core
    • None

      i had updated our maven configuration which is distributed by an autoinstaller, and by coincidence about 15 of our jobs were triggered for rebuilding shortly thereafter. The jobs are distributed to 3 vmware instances with 5 executors each.

      For 4 out of the 5 executors on the same node i got this build exception:

      hudson.util.IOException2: Failed to install http://ci/hudson-install/maven-2.2.1-custom-CI.zip to d:\hudson\tools\maven-2.2.1
      	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:642)
      	at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:82)
      	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
      	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
      	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149)
      	at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:497)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:377)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      	at hudson.model.Run.run(Run.java:1273)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:291)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:129)
      Caused by: hudson.util.IOException2: remote file operation failed: d:\hudson\tools\maven-2.2.1 at hudson.remoting.Channel@7e4042:s-agri-ci-xp2
      	at hudson.FilePath.act(FilePath.java:749)
      	at hudson.FilePath.act(FilePath.java:735)
      	at hudson.FilePath.deleteContents(FilePath.java:831)
      	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:619)
      	... 11 more
      Caused by: java.io.IOException: Unable to delete d:\hudson\tools\maven-2.2.1\lib\maven-2.2.1-uber.jar
      	at hudson.Util.deleteFile(Util.java:260)
      	at hudson.Util.deleteRecursive(Util.java:302)
      	at hudson.Util.deleteContentsRecursive(Util.java:221)
      	at hudson.Util.deleteRecursive(Util.java:301)
      	at hudson.Util.deleteContentsRecursive(Util.java:221)
      	at hudson.FilePath$10.invoke(FilePath.java:833)
      	at hudson.FilePath$10.invoke(FilePath.java:831)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1899)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

      What is going on IMO is that every job detects that there has been a change in the maven configuration and the autoinstaller kicks in to fetch and install the new version. Likely they trample over each other trying to update the maven installation.

      Perhaps the autoinstaller could grab a per-node lock before attempting to auto-install ?

            Unassigned Unassigned
            heymjo Jorg Heymans
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: