-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
Jenkins 1.658 with Copy Artifact plugin 1.38.1
Master on 64-bit RHEL6, build slaves on 32-bit RHEL6, MacOS and Solaris.
If an artifact file was created read-only (i.e. with permissions rrr-) when it was archived, the copyartifact plugin installs it as read-only too, which is what I would expect. Unfortunately when the build job runs a second time, the next attempt to copy the same artifact file then fails because it's trying to overwrite a read-only file.
This doesn't seem to cause a problem with builds running on the master node, but it fails on my Linux, macOS and Solaris build slaves (I'm using a multi-config job to build the same code on all 4 OSs). The console output from one such slave job is shown below. If I wipe out the workspaces on the slaves, the next build that runs will succeed.
{{FATAL: Failed to copy /var/lib/jenkins/jobs/extensions-3.14-ezca/configurations/axis-OS/linux32/builds/5/archive/include/ezca.h to /local/jenkins/workspace/extensions-3.14-ezcaScan/OS/linux32/include/ezca.h
hudson.util.IOException2: Failed to copy /var/lib/jenkins/jobs/extensions-3.14-ezca/configurations/axis-OS/linux32/builds/5/archive/include/ezca.h to /local/jenkins/workspace/extensions-3.14-ezcaScan/OS/linux32/include/ezca.h
at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:118)
at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:67)
at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:526)
at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:460)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: remote file operation failed: /local/jenkins/workspace/extensions-3.14-ezcaScan/OS/linux32/include/ezca.h at hudson.remoting.Channel@16e77985:linux32-uranus: java.io.FileNotFoundException: /local/jenkins/workspace/extensions-3.14-ezcaScan/OS/linux32/include/ezca.h (Permission denied)
at hudson.FilePath.act(FilePath.java:986)
at hudson.FilePath.act(FilePath.java:968)
at hudson.FilePath.write(FilePath.java:1882)
at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:82)
... 13 more
Caused by: java.io.FileNotFoundException: /local/jenkins/workspace/extensions-3.14-ezcaScan/OS/linux32/include/ezca.h (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at hudson.FilePath$36.invoke(FilePath.java:1887)
at hudson.FilePath$36.invoke(FilePath.java:1882)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to linux32-uranus(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
at hudson.remoting.Channel.call(Channel.java:781)
at hudson.FilePath.act(FilePath.java:979)
... 16 more
}}
Failing writing non-writeble files doesn't sound a bug, but a correct behavior
(Rather, it sounds strange that it succeeds on the master).
You should consider to use Workspace Cleanup Plugin.