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

FileAlreadyExistsException on parallel builds

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • build-flow-plugin, core
    • None
    • Linux

      Affects Version: 1.557

      If "use parallel builds" option is checked, and multiple builds finish at the same time, this error occurs:

      08:02:09 ln builds/lastSuccessfulBuild /var/lib/jenkins/jobs/MyProject/modules/mypackage$module1/lastSuccessful failed
      08:02:09 java.nio.file.FileAlreadyExistsException: /var/lib/jenkins/jobs/MyProject/modules/mypackage$module1/lastSuccessful
      08:02:09 	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88)
      08:02:09 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      08:02:09 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      08:02:09 	at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:456)
      08:02:09 	at java.nio.file.Files.createSymbolicLink(Files.java:994)
      08:02:09 	at sun.reflect.GeneratedMethodAccessor496.invoke(Unknown Source)
      08:02:09 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      08:02:09 	at java.lang.reflect.Method.invoke(Method.java:606)
      08:02:09 	at hudson.Util.createSymlinkJava7(Util.java:1148)
      08:02:09 	at hudson.Util.createSymlink(Util.java:1064)
      08:02:09 	at hudson.model.Run.createSymlink(Run.java:1793)
      08:02:09 	at hudson.model.Run.updateSymlinks(Run.java:1774)
      08:02:09 	at hudson.maven.MavenBuild$ProxyImpl2.end(MavenBuild.java:570)
      08:02:09 	at sun.reflect.GeneratedMethodAccessor508.invoke(Unknown Source)
      08:02:09 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      08:02:09 	at java.lang.reflect.Method.invoke(Method.java:606)
      08:02:09 	at hudson.model.Executor$1.call(Executor.java:559)
      08:02:09 	at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
      08:02:09 	at com.sun.proxy.$Proxy68.end(Unknown Source)
      08:02:09 	at sun.reflect.GeneratedMethodAccessor507.invoke(Unknown Source)
      08:02:09 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      08:02:09 	at java.lang.reflect.Method.invoke(Method.java:606)
      08:02:09 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
      08:02:09 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
      08:02:09 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
      08:02:09 	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      08:02:09 	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      08:02:09 	at hudson.remoting.Request$2.run(Request.java:328)
      08:02:09 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      08:02:09 	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      08:02:09 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      08:02:09 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      08:02:09 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      08:02:09 	at java.lang.Thread.run(Thread.java:744)
      

          [JENKINS-22516] FileAlreadyExistsException on parallel builds

          Leo Gallucci added a comment -

          Any updates on this? I'm experiencing the same issue

          Leo Gallucci added a comment - Any updates on this? I'm experiencing the same issue

          Jenkins ver. 1.609.2 is also affected.
          Is there a workaround for this problem ?

          Jakub Czaplicki added a comment - Jenkins ver. 1.609.2 is also affected. Is there a workaround for this problem ?

          Seeing it on 1.609.1 as well.

          Kenneth Baltrinic added a comment - Seeing it on 1.609.1 as well.

          Kenneth Baltrinic added a comment - - edited

          In looking into the issue further, it does not seem to me that this issue has anything to do with the Build Publisher Plugin and has probably been incorrectly assigned to its maintainer. We do not have the Hudson Build Publisher plugin installed on our system. Moreover our stack trace is a bit different (mostly I think due to the fact that we are using a free form job and the original poster appears to be using a maven job.)

          Given that the issue is in attempting to create a lastSuccessfulBuild link, it would seem to me that this is a core issue, not something with a plugin. On commonality with the original post however is that this occurs when performing parallel builds of the same type so perhaps it could be considered to be related to the build-flow plugin?

          Our stack trace.

          ln builds/lastSuccessfulBuild /var/lib/jenkins/jobs/module-silo-deploy/lastSuccessful failed
          java.nio.file.FileAlreadyExistsException: /var/lib/jenkins/jobs/module-silo-deploy/lastSuccessful
          	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88)
          	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
          	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
          	at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:457)
          	at java.nio.file.Files.createSymbolicLink(Files.java:1043)
          	at sun.reflect.GeneratedMethodAccessor6797.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:483)
          	at hudson.Util.createSymlinkJava7(Util.java:1226)
          	at hudson.Util.createSymlink(Util.java:1142)
          	at hudson.model.Run.createSymlink(Run.java:1845)
          	at hudson.model.Run.updateSymlinks(Run.java:1826)
          	at hudson.model.Run.execute(Run.java:1739)
          	at com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:155)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:374)  
          

          Kenneth Baltrinic added a comment - - edited In looking into the issue further, it does not seem to me that this issue has anything to do with the Build Publisher Plugin and has probably been incorrectly assigned to its maintainer. We do not have the Hudson Build Publisher plugin installed on our system. Moreover our stack trace is a bit different (mostly I think due to the fact that we are using a free form job and the original poster appears to be using a maven job.) Given that the issue is in attempting to create a lastSuccessfulBuild link, it would seem to me that this is a core issue, not something with a plugin. On commonality with the original post however is that this occurs when performing parallel builds of the same type so perhaps it could be considered to be related to the build-flow plugin? Our stack trace. ln builds/lastSuccessfulBuild / var /lib/jenkins/jobs/module-silo-deploy/lastSuccessful failed java.nio.file.FileAlreadyExistsException: / var /lib/jenkins/jobs/module-silo-deploy/lastSuccessful at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:457) at java.nio.file.Files.createSymbolicLink(Files.java:1043) at sun.reflect.GeneratedMethodAccessor6797.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at hudson.Util.createSymlinkJava7(Util.java:1226) at hudson.Util.createSymlink(Util.java:1142) at hudson.model.Run.createSymlink(Run.java:1845) at hudson.model.Run.updateSymlinks(Run.java:1826) at hudson.model.Run.execute(Run.java:1739) at com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:155) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)

          Possibly duped by JENKINS-25930.

          Aaron D. Marasco added a comment - Possibly duped by JENKINS-25930 .

          mark mann added a comment -

          i recently upgraded to Jenkins 1.651.1 (on windows)
          we make a lot of use of the parallel builds function... running 15 jobs in parallel.

          the error message seems to be a common and annoying occurance... sometimes trashing a job.

          16:32:41 ln builds\lastSuccessfulBuild C:\.jenkins\jobs\XXXXX\lastSuccessful failed
          16:32:41 java.nio.file.FileAlreadyExistsException: C:\.jenkins\jobs\XXXXX\lastSuccessful
          16:32:41 at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
          16:32:41 at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
          16:32:41 at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
          16:32:41 at sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(Unknown Source)
          16:32:41 at java.nio.file.Files.createSymbolicLink(Unknown Source)
          16:32:41 at sun.reflect.GeneratedMethodAccessor1459.invoke(Unknown Source)
          16:32:41 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          16:32:41 at java.lang.reflect.Method.invoke(Unknown Source)
          16:32:41 at hudson.Util.createSymlinkJava7(Util.java:1235)
          16:32:41 at hudson.Util.createSymlink(Util.java:1151)
          16:32:41 at hudson.model.Run.createSymlink(Run.java:1840)
          16:32:41 at hudson.model.Run.updateSymlinks(Run.java:1821)
          16:32:41 at hudson.model.Run.execute(Run.java:1736)
          16:32:41 at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
          16:32:41 at hudson.model.ResourceController.execute(ResourceController.java:98)
          16:32:41 at hudson.model.Executor.run(Executor.java:410)

          mark mann added a comment - i recently upgraded to Jenkins 1.651.1 (on windows) we make a lot of use of the parallel builds function... running 15 jobs in parallel. the error message seems to be a common and annoying occurance... sometimes trashing a job. 16:32:41 ln builds\lastSuccessfulBuild C:\.jenkins\jobs\XXXXX\lastSuccessful failed 16:32:41 java.nio.file.FileAlreadyExistsException: C:\.jenkins\jobs\XXXXX\lastSuccessful 16:32:41 at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) 16:32:41 at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) 16:32:41 at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) 16:32:41 at sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(Unknown Source) 16:32:41 at java.nio.file.Files.createSymbolicLink(Unknown Source) 16:32:41 at sun.reflect.GeneratedMethodAccessor1459.invoke(Unknown Source) 16:32:41 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 16:32:41 at java.lang.reflect.Method.invoke(Unknown Source) 16:32:41 at hudson.Util.createSymlinkJava7(Util.java:1235) 16:32:41 at hudson.Util.createSymlink(Util.java:1151) 16:32:41 at hudson.model.Run.createSymlink(Run.java:1840) 16:32:41 at hudson.model.Run.updateSymlinks(Run.java:1821) 16:32:41 at hudson.model.Run.execute(Run.java:1736) 16:32:41 at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) 16:32:41 at hudson.model.ResourceController.execute(ResourceController.java:98) 16:32:41 at hudson.model.Executor.run(Executor.java:410)

            vjuranek vjuranek
            ew Eduard Wirch
            Votes:
            8 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: