|
David Reiss created JENKINS-13202:
------------------------------------- Summary: Artifact archiving from an ssh slave fails if symlinks are present Key: JENKINS-13202 URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 Project: Jenkins Issue Type: Bug Components: core Affects Versions: current Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. Reporter: David Reiss When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: {noformat} rm -rf stuff mkdir stuff cd stuff touch zzfile ln -s zzfile aafile ln -s zzfile bbfile {noformat} Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. {noformat} Archiving artifacts ERROR: Failed to archive artifacts: stuff/* hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* at hudson.FilePath.readFromTar(FilePath.java:1817) at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) at hudson.model.Run.run(Run.java:1435) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory at hudson.FilePath._chmod(FilePath.java:1248) at hudson.FilePath.readFromTar(FilePath.java:1813) ... 12 more {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160685#comment-160685 ] Leander Hasty commented on JENKINS-13202: ----------------------------------------- We've seen this issue here, also coincident with upgrading from 1.455 to 1.456: {noformat} ERROR: Failed to archive artifacts: Engineering/iphone/build/** hudson.util.IOException2: hudson.util.IOException2: Failed to extract /hudson/workspace/project-ios/Engineering/iphone/build/** at hudson.FilePath.readFromTar(FilePath.java:1817) at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) at hudson.model.Run.run(Run.java:1435) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Caused by: java.io.IOException: Failed to chmod /var/empty/.hudson/jobs/project-ios/builds/2012-03-23_11-12-38/archive/Engineering/iphone/build/Debug-iphoneos/Payload/Project.app/CodeResources : No such file or directory at hudson.FilePath._chmod(FilePath.java:1248) at hudson.FilePath.readFromTar(FilePath.java:1813) ... 12 more at hudson.FilePath.copyRecursiveTo(FilePath.java:1736) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) at hudson.model.Run.run(Run.java:1435) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) {noformat} > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161535#comment-161535 ] Nick Parrish commented on JENKINS-13202: ---------------------------------------- We have seen this too when we upgraded to 1.456. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161537#comment-161537 ] Nick Parrish commented on JENKINS-13202: ---------------------------------------- This might be related to JENKINS-13280. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161540#comment-161540 ] Brian Morris commented on JENKINS-13202: ---------------------------------------- I would agree. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161540#comment-161540 ] Brian Morris edited comment on JENKINS-13202 at 4/12/12 6:48 PM: ----------------------------------------------------------------- I would agree. Please see my suggested patch in JENKINS-13280. was (Author: bsm_ghs): I would agree. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162453#comment-162453 ] brenuart commented on JENKINS-13202: ------------------------------------ The same problem appears during installation of tools like JDK or Maven packaged as tar.gz on a remote Unix slave. The deployment process fails with the same exception. I tend to agree with the above description: - the symlink is extracted from the tarball before its target; - exception is thrown when deployment process tries to chmod the symlink; I also agree with the proposed solution: there is no point in trying to chmod a symlink. The root of the issue seems to be indeed located in the FilePath class and, as the number of linked issue suggest, tend to affect many plugins or different areas of Jenkins. Are there any plans to fix this issue in the near future? Is someone working on it? Can we help somehow ? > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162503#comment-162503 ] David Reiss commented on JENKINS-13202: --------------------------------------- I created a pull request for this, including a trivial change to the original JENKINS-9118 test to expose the bug. https://github.com/jenkinsci/jenkins/pull/469 > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162566#comment-162566 ] SCM/JIRA link daemon commented on JENKINS-13202: ------------------------------------------------ Code changed in jenkins User: David Reiss Path: changelog.html core/src/main/java/hudson/FilePath.java core/src/test/java/hudson/FilePathTest.java http://jenkins-ci.org/commit/jenkins/e15b2e19e394f5d63183f01a2e72a14115a0c370 Log: [FIXED JENKINS-13202] Don't set mtime or mode on symlinks Previously, the untar code tries to set the last modified time and mode on every untarred file. However, if the tar contains a broken symlink, or a symlink that points to a file that has not been untarred yet, the time/mode setting would fail on the broken symlink. Symlinks don't have meaningful modified times or modes of their own, so only set these values on non-symlinks. Rename the file "a" in the test to expose the bug. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] SCM/JIRA link daemon resolved JENKINS-13202. -------------------------------------------- Resolution: Fixed > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162574#comment-162574 ] dogfood commented on JENKINS-13202: ----------------------------------- Integrated in !http://ci.jenkins-ci.org/images/16x16/blue.png! [jenkins_main_trunk #1710|http://ci.jenkins-ci.org/job/jenkins_main_trunk/1710/] [FIXED JENKINS-13202] Don't set mtime or mode on symlinks (Revision e15b2e19e394f5d63183f01a2e72a14115a0c370) Result = SUCCESS Kohsuke Kawaguchi : [e15b2e19e394f5d63183f01a2e72a14115a0c370|https://github.com/jenkinsci/jenkins/commit/e15b2e19e394f5d63183f01a2e72a14115a0c370] Files : * changelog.html * core/src/main/java/hudson/FilePath.java * core/src/test/java/hudson/FilePathTest.java > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163025#comment-163025 ] erwan_q commented on JENKINS-13202: ----------------------------------- We have a regression on 1.464 version and don't know if it's related to this commit. It's recent. We try to archive a tar file in a matrix project. We have today an issue on AIX platform with the following message [tar] Building tar: /database/products/ci/workspace/ida_trunk/label/aix/repository/ida.tar.gz BUILD SUCCESSFUL Total time: 11 minutes 56 seconds [WARNINGS] Parsing warnings in console log with parser GNU compiler 4 (gcc) [WARNINGS] Computing warning deltas based on reference build #227 Archiving artifacts ERROR: Failed to archive artifacts: repository/ida.tar.gz hudson.util.IOException2: java.lang.UnsupportedOperationException at hudson.FilePath.copyRecursiveTo(FilePath.java:1752) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632) at hudson.model.Run.run(Run.java:1459) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:239) Caused by: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException at hudson.remoting.Channel$3.adapt(Channel.java:679) at hudson.remoting.Channel$3.adapt(Channel.java:674) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at hudson.FilePath.copyRecursiveTo(FilePath.java:1750) ... 10 more Caused by: java.lang.UnsupportedOperationException at hudson.os.PosixAPI$1.getCurrentWorkingDirectory(PosixAPI.java:59) at org.jruby.ext.posix.util.ExecIt.run(ExecIt.java:59) at org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:51) at org.jruby.ext.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:196) at org.jruby.ext.posix.JavaPOSIX.readlink(JavaPOSIX.java:160) at hudson.Util.resolveSymlink(Util.java:1067) at hudson.Util.resolveSymlink(Util.java:1030) at hudson.util.DirScanner$Glob.scan(DirScanner.java:115) at hudson.FilePath.writeToTar(FilePath.java:1788) at hudson.FilePath.access$1000(FilePath.java:166) at hudson.FilePath$36.invoke(FilePath.java:1729) at hudson.FilePath$36.invoke(FilePath.java:1726) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2161) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:736) > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163032#comment-163032 ] erwan_q commented on JENKINS-13202: ----------------------------------- Ok this bug is in the 1.465 version who will be released soon. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] erwan_q reopened JENKINS-13202: ------------------------------- Sorry I still reproduce this issue with 1.465 Something is broken in the artifact archiving since few releases now. My case to reproduce: matrix project Simple artifact to archive (1 tgz file) multi platform matrix: solaris, linux, aix And it's broken ONLY for aix. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163057#comment-163057 ] erwan_q commented on JENKINS-13202: ----------------------------------- My issue is related to the duplicate JENKINS-13241 And the complete stack is: [tar] Building tar: /database/products/ci/workspace/ida_trunk/label/aix/repository/ida.tar.gz BUILD SUCCESSFUL Total time: 11 minutes 9 seconds [WARNINGS] Parsing warnings in console log with parser GNU compiler 4 (gcc) [WARNINGS] Computing warning deltas based on reference build #154 Archiving artifacts ERROR: Failed to archive artifacts: repository/ida.tar.gz hudson.util.IOException2: java.lang.UnsupportedOperationException at hudson.FilePath.copyRecursiveTo(FilePath.java:1768) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632) at hudson.model.Run.run(Run.java:1459) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:239) Caused by: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException at hudson.remoting.Channel$3.adapt(Channel.java:679) at hudson.remoting.Channel$3.adapt(Channel.java:674) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at hudson.FilePath.copyRecursiveTo(FilePath.java:1766) ... 10 more Caused by: java.lang.UnsupportedOperationException at hudson.os.PosixAPI$1.getCurrentWorkingDirectory(PosixAPI.java:59) at org.jruby.ext.posix.util.ExecIt.run(ExecIt.java:59) at org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:51) at org.jruby.ext.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:196) at org.jruby.ext.posix.JavaPOSIX.readlink(JavaPOSIX.java:160) at hudson.Util.resolveSymlink(Util.java:1067) at hudson.Util.resolveSymlink(Util.java:1030) at hudson.util.DirScanner$Glob.scan(DirScanner.java:115) at hudson.FilePath.writeToTar(FilePath.java:1804) at hudson.FilePath.access$1000(FilePath.java:166) at hudson.FilePath$36.invoke(FilePath.java:1745) at hudson.FilePath$36.invoke(FilePath.java:1742) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2177) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:736) > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163058#comment-163058 ] Stephen Morrison commented on JENKINS-13202: -------------------------------------------- I see the same thing on AIX, and also on HP. I also run a matrix job, and the Linux and Sun part of that matrix is fine, but the HP and AIX axises fail with that exact same stack trace. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163081#comment-163081 ] David Reiss commented on JENKINS-13202: --------------------------------------- It looks like 00cf9f43 added a stub implementation of POSIX that doesn't implement getCurrentWorkingDirectory. This is only used on platforms where JNA isn't working (see Util.resolveSymlink). > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163101#comment-163101 ] SCM/JIRA link daemon commented on JENKINS-13202: ------------------------------------------------ Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/os/PosixAPI.java core/src/main/java/hudson/util/DirScanner.java http://jenkins-ci.org/commit/jenkins/95c1728c05b11a55e72c8ed8240d2852528ea1db Log: [FIXED JENKINS-13202] fixed a regression in untar on exotic platforms. Fall back in non-JNA case wasn't working. > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] SCM/JIRA link daemon resolved JENKINS-13202. -------------------------------------------- Resolution: Fixed > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163493#comment-163493 ] Stephen Morrison commented on JENKINS-13202: -------------------------------------------- I took the 1.468 snapshot jar (Jenkins ver. 1.468-SNAPSHOT (private-05/31/2012 01:16 GMT-jenkins)), and this appears to be broken still, just a bit further on. Still just on AIX and HP: hudson.util.IOException2: java.io.IOException: Cannot run program "readlink" (in directory "/u01/svxx/cbxxxn/jenkins/."): readlink: not found at hudson.FilePath.copyRecursiveTo(FilePath.java:1771) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:709) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:684) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:631) at hudson.model.Run.execute(Run.java:1481) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:239) Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Cannot run program "readlink" (in directory "/u01/svxx/cbxxxn/jenkins/."): readlink: not found at hudson.remoting.Channel$3.adapt(Channel.java:679) at hudson.remoting.Channel$3.adapt(Channel.java:674) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at hudson.FilePath.copyRecursiveTo(FilePath.java:1769) ... 10 more Caused by: java.io.IOException: Cannot run program "readlink" (in directory "/u01/svxx/cbxxxn/jenkins/."): readlink: not found at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at java.lang.Runtime.exec(Runtime.java:593) at org.jruby.ext.posix.util.ExecIt.run(ExecIt.java:61) at org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:51) at org.jruby.ext.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:196) at org.jruby.ext.posix.JavaPOSIX.readlink(JavaPOSIX.java:160) at hudson.Util.resolveSymlink(Util.java:1067) at hudson.util.DirScanner$Glob.scan(DirScanner.java:115) at hudson.FilePath.writeToTar(FilePath.java:1807) at hudson.FilePath.access$1000(FilePath.java:166) at hudson.FilePath$36.invoke(FilePath.java:1748) at hudson.FilePath$36.invoke(FilePath.java:1745) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2180) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.IOException: readlink: not found at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:102) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 21 more > Artifact archiving from an ssh slave fails if symlinks are present > ------------------------------------------------------------------ > > Key: JENKINS-13202 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13202 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux. > Reporter: David Reiss > Labels: artifact > > When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause. > To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script: > {noformat} > rm -rf stuff > mkdir stuff > cd stuff > touch zzfile > ln -s zzfile aafile > ln -s zzfile bbfile > {noformat} > Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console. > {noformat} > Archiving artifacts > ERROR: Failed to archive artifacts: stuff/* > hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* > at hudson.FilePath.readFromTar(FilePath.java:1817) > at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) > at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) > at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) > at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) > at hudson.model.Build$RunnerImpl.post2(Build.java:162) > at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) > at hudson.model.Run.run(Run.java:1435) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:238) > Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory > at hudson.FilePath._chmod(FilePath.java:1248) > at hudson.FilePath.readFromTar(FilePath.java:1813) > ... 12 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Powered by Nabble | Edit this page |
