-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Powered by SuggestiMate
We sometimes face an issue in Jenkins that when an svn update step fails it locks the workspace, so when the next build is run it notices this and decides to wipe out the workspace and check out a new one, which takes enormous amount of time to build it again.
--------------------------------------------------------------------------------------------------------------
[02:38:31] - Update dev
Success build fororg.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder@1cae7e0
Updating http://repos/wss/soseco/dev at revision '2017-03-08T18:35:59.190 +0530'
At revision 311237
Updating http://repos/wss/soseco/dev at revision '2017-03-08T18:35:59.190 +0530'
Workspace appear to be locked, so getting a fresh workspace
Cleaning local Directory ../../../src/dev
Checking out http://repos/wss/soseco/dev at revision '2017-03-08T18:35:59.190 +0530'
--------------------------------------------------------------------------------------------------------------
Instead of getting a fresh workspace, it should simply fail the build. And then the user can check why it happened and do svn cleanup.
[JENKINS-42798] SVN update failure causes fresh checkout
I also have this problem using SVN and jenkins periodically on a Windows node. I can't find a way to disable Jenkins from doing "Workspace appear to be locked, so getting a fresh workspace
Cleaning local Directory" I never want it to do this. It causes an SVN checkout that takes many hours. I just want to stop restart jenkins so the directory becomes unlocked and I can svn cleanup.
ERROR: Failed to update svn:
org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot write to 'C:\Jenkins\workspace\build}}{{ShaderPhong0_p.sb': }}{{C:\Jenkins\workspace\build}}{{ShaderPhong0_p.sb (Access is denied)
{{ at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)}}
{{ at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)}}
{{ at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.driveEditor(SVNEditModeReader.java:248)}}
{{ at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.update(SVNRepositoryImpl.java:1533)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:40)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)}}
{{ at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)}}
{{ at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)}}
{{ at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)}}
{{ at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)}}
{{ at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)}}
{{ at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)}}
{{ at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:159)}}
{{ at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1031)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1007)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:980)}}
{{ at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3122)}}
{{ at hudson.remoting.UserRequest.perform(UserRequest.java:211)}}
{{ at hudson.remoting.UserRequest.perform(UserRequest.java:54)}}
{{ at hudson.remoting.Request$2.run(Request.java:375)}}
{{ at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)}}
{{ 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.lambda$newThread$0(Engine.java:118)}}
ERROR: Subversion update failed
ERROR: Subversion update failed
{{org.tmatesoft.svn.core.SVNException: svn: E204899: }}
{{ at java.lang.Thread.run(Unknown Source)}}
org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot write to 'C:\Jenkins\workspace\build}}{{ShaderPhong0_p.sb': }}{{C:\Jenkins\workspace\build}}{{ShaderPhong0_p.sb (Access is denied)
{{ at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)}}
{{ at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)}}
{{ at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.driveEditor(SVNEditModeReader.java:248)}}
{{ at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.update(SVNRepositoryImpl.java:1533)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:40)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)}}
{{ at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)}}
{{ at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)}}
{{ at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)}}
{{ at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)}}
{{ at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)}}
{{ at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)}}
{{ at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)}}
{{ at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:159)}}
Caused: hudson.scm.subversion.UpdaterException: failed to perform svn update
{{Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from }}
{{ at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)}}
{{ at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)}}
{{ at hudson.remoting.Channel.call(Channel.java:1001)}}
{{ at hudson.FilePath.act(FilePath.java:1070)}}
{{ at hudson.FilePath.act(FilePath.java:1059)}}
{{ at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:927)}}
{{ at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:857)}}
{{ at hudson.scm.SCM.checkout(SCM.java:505)}}
{{ at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)}}
{{ at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)}}
{{ at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)}}
{{ at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)}}
{{ at hudson.model.Run.execute(Run.java:1894)}}
{{ at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)}}
{{ at hudson.model.ResourceController.execute(ResourceController.java:97)}}
{{ at hudson.model.Executor.run(Executor.java:428)}}
Caused: java.io.IOException
{{ at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:214)}}
{{ at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1031)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1007)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:980)}}
{{ at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3122)}}
{{ at hudson.remoting.UserRequest.perform(UserRequest.java:211)}}
{{ at hudson.remoting.UserRequest.perform(UserRequest.java:54)}}
{{ at hudson.remoting.Request$2.run(Request.java:375)}}
{{ at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)}}
{{ 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.lambda$newThread$0(Engine.java:118)}}
{{ at java.lang.Thread.run(Unknown Source)}}
Running as SYSTEM
Building remotely on WindowsBuildComputer (windows) in workspace C:\Jenkins\workspace\build
Updating svn:
Workspace appear to be locked, so getting a fresh workspace
Cleaning local Directory .
Also: Also: java.nio.file.FileSystemException: }}{{C:\Jenkins\workspace\build}}{{.svn\wc.db: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)}}
{{ at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)}}
{{ at java.nio.file.Files.deleteIfExists(Unknown Source)}}
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:237)}}
{{ Also: java.nio.file.FileSystemException: }}C:\Jenkins\workspace\build}}{{.svn\wc.db: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)}}
{{ at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)}}
{{ at java.nio.file.Files.deleteIfExists(Unknown Source)}}
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:241)}}
jenkins.util.io.CompositeIOException: Unable to remove file }}{{C:\Jenkins\workspace\build}}{{.svn\wc.db
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:252)}}
{{ at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:205)}}
{{ at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:216)}}
{{ at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)}}
{{ at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:215)}}
{{ at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)}}
{{ at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:87)}}
Also: Also: java.nio.file.FileSystemException: }}{{C:\Jenkins\workspace\build}}{{.svn\wc.db-journal: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)}}
{{ at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)}}
{{ at java.nio.file.Files.deleteIfExists(Unknown Source)}}
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:237)}}
{{ Also: java.nio.file.FileSystemException: }}C:\Jenkins\workspace\build}}{{.svn\wc.db-journal: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)}}
{{ at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)}}
{{ at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)}}
{{ at java.nio.file.Files.deleteIfExists(Unknown Source)}}
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:241)}}
jenkins.util.io.CompositeIOException: Unable to remove file }}{{C:\Jenkins\workspace\build}}{{.svn\wc.db-journal
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:252)}}
{{ at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:205)}}
{{ at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:216)}}
{{ at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)}}
{{ at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:215)}}
{{ at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)}}
{{ at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:87)}}
Also: Also: java.nio.file.DirectoryNotEmptyException: }}{{C:\Jenkins\workspace\build}}{{.svn
{{ at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)}}
{{ at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)}}
{{ at java.nio.file.Files.deleteIfExists(Unknown Source)}}
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:237)}}
{{ Also: java.nio.file.DirectoryNotEmptyException: }}C:\Jenkins\workspace\build}}{{.svn
{{ at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)}}
{{ at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)}}
{{ at java.nio.file.Files.deleteIfExists(Unknown Source)}}
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:241)}}
jenkins.util.io.CompositeIOException: Unable to remove directory }}{{C:\Jenkins\workspace\build\.svn with directory contents: [}}{{C:\Jenkins\workspace\build}}{{\}}{{.svn\wc.db,}}{{C:\Jenkins\workspace\build}}{{\}}{{.svn\wc.db-journal]
{{ at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:250)}}
{{ at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:205)}}
{{ at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:216)}}
{{ at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)}}
{{ at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:87)}}
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from younghorsesvr/192.168.1.129:49937
{{ at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)}}
{{ at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)}}
{{ at hudson.remoting.Channel.call(Channel.java:1001)}}
{{ at hudson.FilePath.act(FilePath.java:1070)}}
{{ at hudson.FilePath.act(FilePath.java:1059)}}
{{ at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:927)}}
{{ at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:857)}}
{{ at hudson.scm.SCM.checkout(SCM.java:505)}}
{{ at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)}}
{{ at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)}}
{{ at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)}}
{{ at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)}}
{{ at hudson.model.Run.execute(Run.java:1894)}}
{{ at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)}}
{{ at hudson.model.ResourceController.execute(ResourceController.java:97)}}
{{ at hudson.model.Executor.run(Executor.java:428)}}
jenkins.util.io.CompositeIOException: Unable to delete 'C:\Jenkins\workspace\build'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
{{ at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:90)}}
{{ at hudson.Util.deleteContentsRecursive(Util.java:261)}}
{{ at hudson.Util.deleteContentsRecursive(Util.java:250)}}
{{ at hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater.java:90)}}
{{ at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)}}
{{ at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:176)}}
{{ at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:185)}}
{{ at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1031)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1007)}}
{{ at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:980)}}
{{ at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3122)}}
{{ at hudson.remoting.UserRequest.perform(UserRequest.java:211)}}
{{ at hudson.remoting.UserRequest.perform(UserRequest.java:54)}}
{{ at hudson.remoting.Request$2.run(Request.java:375)}}
{{ at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)}}
{{ 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.lambda$newThread$0(Engine.java:118)}}
{{ at java.lang.Thread.run(Unknown Source)}}
Finished: FAILURE
We are also having this issue. It is frustrating as any time a build is canceled and it happens to be during the svn update step, the next build will totally wipe out our workspace. In our team (and probably most 3D-heavy unity games), this results in the build server being down for a full day each time this happens, as it has to sync many gigabytes from SVN, then recreate all its build caches for each target platform.
Reverting C:\JenkinsBuild\da-build\dragonaudit to depth infinity with ignoreExternals: true Workspace appear to be locked, so getting a fresh workspace Cleaning local Directory dragonaudit
In this situation, it would be much preferred to do a svn clean instead and try to gracefully recover the workspace first before giving up and nuking it.