[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Devin Nusbaum updated JENKINS-57085 A fix for this issue was just released in Pipeline: Groovy 2.68. Jenkins / JENKINS-57085 Stack Traces with complex file names cannot be deserialized by XStream Change By: Devin Nusbaum Status: In Review Resolved Resolution: Fixed Released As: workflow-cps 2.68, groovy-cps 1.27 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.198828.10886.297.1
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick commented on JENKINS-57085 Re: Stack Traces with complex file names cannot be deserialized by XStream Solved with test in workflow-cps-global-lib, but manually confirmed that the fix also corrects stack traces for the original Declarative example. (I did not bother to go through the full reproduction case involving Blue Ocean.) Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick commented on JENKINS-57085 Re: Stack Traces with complex file names cannot be deserialized by XStream Solved with test in workflow-cps-global-lib, but manually confirmed that the fix also corrects stack traces for the original Declarative example. (I did not bother to go through the full reproduction case involving Blue Ocean.) Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick updated JENKINS-57085 Jenkins / JENKINS-57085 Stack Traces with complex file names cannot be deserialized by XStream Change By: Jesse Glick Status: In Progress Review Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick commented on JENKINS-57085 Re: Stack Traces with complex file names cannot be deserialized by XStream For SourceUnit.name to have this form seems normal: /** * Initializes the SourceUnit from the specified URL. */ public SourceUnit(URL source, CompilerConfiguration configuration, GroovyClassLoader loader, ErrorCollector er) { this(source.toExternalForm(), new URLReaderSource(source, configuration), configuration, loader, er); } CpsTransformer.makeBuilder then compiles it into a runtime construction of a MethodLocation with a URL as its fileName, from which later a StackTraceElement would be constructed. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick commented on JENKINS-57085 Re: Stack Traces with complex file names cannot be deserialized by XStream It is most easily visible with Declarative but not limited to that. Using @Library('github.com/jglick/sample-pipeline-library@JENKINS-57085-diag') _ com.github.jglick.sample.Err.fail(this) which calls package com.github.jglick.sample class Err { static void fail(script) { script.error 'oops' } } you can see "workflow-api@2.33"> "hudson.AbortException"> oops org.jenkinsci.plugins.workflow.steps.ErrorStep$Execution.run(ErrorStep.java:63) org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) com.github.jglick.sample.Err.fail(file:/…/jobs/p/builds/…/libs/github.com/jglick/sample-pipeline-library/src/com/github/jglick/sample/Err.groovy:4) WorkflowScript.run(WorkflowScript:2) ___cps.transform___(Native Method) com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57) Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick started work on JENKINS-57085 Change By: Jesse Glick Status: Open In Progress Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick commented on JENKINS-57085 Re: Stack Traces with complex file names cannot be deserialized by XStream Filed the XStream patch to start with, since it was easy enough. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick assigned an issue to Jesse Glick Jenkins / JENKINS-57085 Stack Traces with complex file names cannot be deserialized by XStream Change By: Jesse Glick Assignee: Jesse Glick Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-57085 Stack Traces with complex file names cannot be deserialized by XStream Offhand it sounds like groovy-cps is creating poor bytecode, and XStream is also behaving poorly. Ideally both would be fixed. Probably best to focus on groovy-cps to start with, since getting fixes into upstream XStream could take a while. (We have a fork anyway, but I would rather not add to the diff.) Change By: Jesse Glick Component/s: workflow-cps-plugin Labels: pipeline xstream Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Devin Nusbaum updated an issue Jenkins / JENKINS-57085 Stack Traces with complex file names cannot be deserialized by XStream Change By: Devin Nusbaum Not sure about component, might be groovy-cps, might be upstream Groovy, might be upstream XStream, but nice to have tracking ticket here anyway. Marked as core for now assuming we'd need to backport a fix from some upstream library.*Problem:*If XStream is used to deserialize a {{StackTraceElement}} containing a complex file name, such as the following one seen in a stack trace in a Declarative Pipeline, the exception will be unable to be deserialized:{noformat}org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(jar:file:/Users/dnusbaum/.m2/repository/org/jenkinsci/plugins/pipeline-model-definition/1.3.7/pipeline-model-definition-1.3.7.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:134){noformat}The file name for this example is:{noformat}jar:file:/Users/dnusbaum/.m2/repository/org/jenkinsci/plugins/pipeline-model-definition/1.3.7/pipeline-model-definition-1.3.7.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy{noformat}Example exception: {noformat}com.thoughtworks.xstream.converters.ConversionException: Could not parse StackTraceElement : org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(jar:file:/Users/dnusbaum/.m2/repository/org/jenkinsci/plugins/pipeline-model-definition/1.3.7/pipeline-model-definition-1.3.7.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:134) Debugging information class : java.lang.StackTraceElementrequired-type : java.lang.StackTraceElementconverter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapperwrapped-converter : com.thoughtworks.xstream.converters.extended.StackTraceElementConverterpath: /Tag/actions/wf.a.ErrorAction/error/stackTrace/trace[26]line number : 46class[1]: [Ljava.lang.StackTraceElement;converter-type[1] : com.thoughtworks.xstream.converters.collections.ArrayConverterclass[2]: hudson.AbortExceptionconverter-type[2] : com.thoughtworks.xstream.converters.extended.ThrowableConverterclass[3]: org.jenkinsci.plugins.workflow.actions.ErrorActionconverter-type[3] : com.thoughtworks.xstream.converters.reflection.ReflectionConverterclass[4]: [Lhudson.model.Action;class[5]: org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage$Tagversion : 1.4.7-jenkins-1--- at com.thoughtworks.xstream.converters.extended.StackTraceElementConverter.fromString(StackTraceElementConverter.java:93) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.fromString(SingleValueConverterWrapper.java:41) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:49){noformat}The reason this happens is that XStre
[JIRA] (JENKINS-57085) Stack Traces with complex file names cannot be deserialized by XStream
Title: Message Title Devin Nusbaum created an issue Jenkins / JENKINS-57085 Stack Traces with complex file names cannot be deserialized by XStream Issue Type: Bug Assignee: Unassigned Components: core Created: 2019-04-17 13:47 Labels: pipeline Priority: Minor Reporter: Devin Nusbaum Not sure about component, might be groovy-cps, might be upstream Groovy, might be upstream XStream, but nice to have tracking ticket here anyway. Marked as core for now assuming we'd need to backport a fix from some upstream library. Problem: If XStream is used to deserialize a StackTraceElement containing a complex file name, such as the following one seen in a stack trace in a Declarative Pipeline, the exception will be unable to be deserialized: org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(jar:file:/Users/dnusbaum/.m2/repository/org/jenkinsci/plugins/pipeline-model-definition/1.3.7/pipeline-model-definition-1.3.7.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:134) The file name for this example is: jar:file:/Users/dnusbaum/.m2/repository/org/jenkinsci/plugins/pipeline-model-definition/1.3.7/pipeline-model-definition-1.3.7.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy