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

java.io.NotSerializableException: org.jclouds.http.HttpCommand

    XMLWordPrintable

Details

    Description

      Executing the small-file on the Unarchive step it fails with a seralizarion exception

            stage('Unarchive') {
              dir('unarch') {
                deleteDir()
                unarchive mapping: ["test/": '.']
                sh "ls -laFhR"
              }
            }
      
      Started by user none
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] timestamps
      [Pipeline] {
      [Pipeline] podTemplate
      [Pipeline] {
      [Pipeline] node
      Running on test-s3-small-files-q9bpm-cf24c in /home/jenkins/workspace/smallFiles
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Setup)
      [Pipeline] writeFile
      [Pipeline] writeFile
      
      ...
      [Pipeline] writeFile
      [Pipeline] writeFile
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Archive)
      [Pipeline] sh
      [smallFiles] Running shell script
      [Pipeline] archiveArtifacts
      Archiving artifacts
      Uploaded 100 artifact(s) to https://my-bucket.s3.amazonaws.com/cmm02/artifacts/smallFiles/14/artifacts/
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Unarchive)
      [Pipeline] dir
      Running in /home/jenkins/workspace/smallFiles/unarch
      [Pipeline] {
      [Pipeline] deleteDir
      [Pipeline] unarchive
      [Pipeline] }
      [Pipeline] // dir
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] }
      [Pipeline] // podTemplate
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] End of Pipeline
      an exception which occurred:
      	in field org.jclouds.http.HttpResponseException.command
      	in object org.jclouds.aws.AWSResponseException@16801124
      	in field com.cloudbees.groovy.cps.Outcome.abnormal
      	in object com.cloudbees.groovy.cps.Outcome@2517618a
      	in field org.jenkinsci.plugins.workflow.cps.CpsBodyExecution.outcome
      	in object org.jenkinsci.plugins.workflow.cps.CpsBodyExecution@4aa44b27
      	in field org.jenkinsci.plugins.workflow.steps.PushdStep$Execution.body
      	in object org.jenkinsci.plugins.workflow.steps.PushdStep$Execution@6a894713
      	in field org.jenkinsci.plugins.workflow.cps.CpsThread.step
      	in object org.jenkinsci.plugins.workflow.cps.CpsThread@30bd8de
      	in field org.jenkinsci.plugins.workflow.cps.CpsBodyExecution.thread
      	in object org.jenkinsci.plugins.workflow.cps.CpsBodyExecution@11e49cfd
      	in field org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.this$0
      	in object org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter@42b5910a
      	in field com.cloudbees.groovy.cps.impl.CallEnv.returnAddress
      	in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@360f0b29
      	in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
      	in object com.cloudbees.groovy.cps.impl.TryBlockEnv@abb2736
      	in field com.cloudbees.groovy.cps.impl.CallEnv.caller
      	in object com.cloudbees.groovy.cps.impl.ClosureCallEnv@39aee488
      	in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
      	in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@2f891a78
      	in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
      	in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@616cb42d
      	in field com.cloudbees.groovy.cps.impl.CpsClosureDef.capture
      	in object com.cloudbees.groovy.cps.impl.CpsClosureDef@50858667
      	in field com.cloudbees.groovy.cps.impl.CpsClosure.def
      	in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@4d7ae972
      	in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures
      	in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@3aa0eb97
      	in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@3aa0eb97
      Caused: java.io.NotSerializableException: org.jclouds.http.HttpCommand
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
      	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
      	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
      	at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
      	at java.util.HashMap.internalWriteEntries(HashMap.java:1785)
      	at java.util.HashMap.writeObject(HashMap.java:1362)
      	at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:273)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:976)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
      	at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
      	at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
      	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.lambda$writeObject$0(RiverWriter.java:144)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:467)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:443)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:430)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:367)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:82)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:243)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:231)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	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)
      Finished: FAILURE
      

      Attachments

        Issue Links

          Activity

            ifernandezcalvo Ivan Fernandez Calvo added a comment - https://issues.apache.org/jira/browse/JCLOUDS-1200
            jglick Jesse Glick added a comment -

            While at root this is a bug in jclouds, for robustness either Outcome or some higher layer like CpsBodyExecution.outcome should be using ProxyException to wrap exceptions which might not serialize cleanly. We already do so for ErrorAction etc. for purposes of XStream serialization in Pipeline, and Remoting already does so for UserResponse, so this is just another case: unserializable exceptions (in this case not related to JEP-200) propagated in the program stack.

            jglick Jesse Glick added a comment - While at root this is a bug in jclouds, for robustness either Outcome or some higher layer like CpsBodyExecution.outcome should be using ProxyException to wrap exceptions which might not serialize cleanly. We already do so for ErrorAction etc. for purposes of XStream serialization in Pipeline, and Remoting already does so for UserResponse , so this is just another case: unserializable exceptions (in this case not related to JEP-200) propagated in the program stack.
            jglick Jesse Glick added a comment -

            Do you know if there is a simple way to reproduce this error? I can try to invent one if not.

            jglick Jesse Glick added a comment - Do you know if there is a simple way to reproduce this error? I can try to invent one if not.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java
            src/test/java/io/jenkins/plugins/artifact_manager_s3/JCloudsArtifactManagerTest.java
            http://jenkins-ci.org/commit/artifact-manager-s3-plugin/db58f723750155ca003e0d9d81ae0339badc8e4d
            Log:
            JENKINS-51390 Reproduced error in test by deliberately breaking a session token, unarchiving, and then manipulating the exception.

            Compare: https://github.com/jenkinsci/artifact-manager-s3-plugin/compare/7bed48130b86^...db58f7237501
            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java src/test/java/io/jenkins/plugins/artifact_manager_s3/JCloudsArtifactManagerTest.java http://jenkins-ci.org/commit/artifact-manager-s3-plugin/db58f723750155ca003e0d9d81ae0339badc8e4d Log: JENKINS-51390 Reproduced error in test by deliberately breaking a session token, unarchiving, and then manipulating the exception. Compare: https://github.com/jenkinsci/artifact-manager-s3-plugin/compare/7bed48130b86 ^...db58f7237501 * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
            jglick Jesse Glick added a comment -

            Found a way to fake it.

            jglick Jesse Glick added a comment - Found a way to fake it.
            jglick Jesse Glick added a comment -

            Note that even if you fix program.dat serialization to not blow up, ErrorAction serialization will still issue a JEP-200 warning about the inappropriate fields. There is no further impact because JENKINS-49025 handles that.

            jglick Jesse Glick added a comment - Note that even if you fix program.dat serialization to not blow up, ErrorAction serialization will still issue a JEP-200 warning about the inappropriate fields. There is no further impact because JENKINS-49025 handles that.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickle.java
            src/test/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickleTest.java
            http://jenkins-ci.org/commit/workflow-support-plugin/691fb60f3fa6419ce6801a0d0ec28fac23f3d5a9
            Log:
            JENKINS-51390 If an exception cannot be serialized for program.dat, replace it with a ProxyException.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickle.java src/test/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickleTest.java http://jenkins-ci.org/commit/workflow-support-plugin/691fb60f3fa6419ce6801a0d0ec28fac23f3d5a9 Log: JENKINS-51390 If an exception cannot be serialized for program.dat, replace it with a ProxyException.

            Code changed in jenkins
            User: Sam Van Oort
            Path:
            .mvn/extensions.xml
            .mvn/maven.config
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickle.java
            src/main/java/org/jenkinsci/plugins/workflow/support/visualization/table/StatusColumn.java
            src/test/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickleTest.java
            http://jenkins-ci.org/commit/workflow-support-plugin/37b4617799de27a091a4a085218a64f8099db58d
            Log:
            Merge pull request #61 from jglick/NotSerializableException-JENKINS-51390

            JENKINS-51390 Use ProxyException when necessary for program.dat

            Compare: https://github.com/jenkinsci/workflow-support-plugin/compare/38ff3bdadad3...37b4617799de
            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: .mvn/extensions.xml .mvn/maven.config pom.xml src/main/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickle.java src/main/java/org/jenkinsci/plugins/workflow/support/visualization/table/StatusColumn.java src/test/java/org/jenkinsci/plugins/workflow/support/pickles/ThrowablePickleTest.java http://jenkins-ci.org/commit/workflow-support-plugin/37b4617799de27a091a4a085218a64f8099db58d Log: Merge pull request #61 from jglick/NotSerializableException- JENKINS-51390 JENKINS-51390 Use ProxyException when necessary for program.dat Compare: https://github.com/jenkinsci/workflow-support-plugin/compare/38ff3bdadad3...37b4617799de * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

            People

              jglick Jesse Glick
              ifernandezcalvo Ivan Fernandez Calvo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: