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

hudson.FilePath#copyRecursiveTo() failing if remote and local having different default character sets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • 2.449

      I'm experiencing this problem with pipeline-maven-plugin when it is running 'Generated Artifacts Publisher' when running maven on a z/OS agent (line numbers are as of Jenkins version 2.426.2):

      ERROR: [withMaven] WARNING Exception executing Maven reporter 'Generated Artifacts Publisher' / org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher. Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org 
       java.io.IOException: Exception archiving { map content removed }
       	at org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher.process(GeneratedArtifactsPublisher.java:145)
       	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:172)
       	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution2$WithMavenStepExecutionCallBack.finished(WithMavenStepExecution2.java:1359)
       	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(GeneralNonBlockingStepExecution.java:140)
       	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
       	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
       	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
       	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
       	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
       	at java.base/java.lang.Thread.run(Thread.java:840)
       Caused by: java.io.IOException: Failed to extract /path removed/transfer of 8 files
       	at hudson.FilePath.readFromTar(FilePath.java:3068)
       	at hudson.FilePath.copyRecursiveTo(FilePath.java:2828)
       	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:73)
       	at org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher.process(GeneratedArtifactsPublisher.java:143)
       	... 9 more
       Caused by: java.nio.charset.UnmappableCharacterException: Input length = 1
       	at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:275)
       	at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:820)
       	at org.apache.commons.compress.archivers.zip.NioZipEncoding.decode(NioZipEncoding.java:130)
       	at org.apache.commons.compress.archivers.tar.TarUtils.parseName(TarUtils.java:524)
       	at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeaderUnwrapped(TarArchiveEntry.java:1543)
       	at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1531)
       	at org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:553)
       	at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:464)
       	at hudson.FilePath.readFromTar(FilePath.java:3043)
       	... 12 more
      

       

      Code review turned out that this is most likely a problem in hudson.FilePath#copyRecursiveTo implementation (line numbers are as of Jenkins version 2.440):

       

      I suspect that JENKINS-18558 is related to this issue.

            Unassigned Unassigned
            lne Lutz Neugebauer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: