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

Canceling a parent multi-configuration build produce a build.xml that can't be deserialized

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: matrix-project-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.428
    • Similar Issues:
      Show 5 results

      Description

      Here is the traceback when I restart Jenkins:

      hudson.util.IOException2: Unable to read /Users/olivier/.jenkins/jobs/multi/builds/2011-09-06_09-57-54/build.xml
      [...]
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot deserialize object with new readObject()/writeObject() methods
      ---- Debugging information ----
      class               : hudson.matrix.MatrixBuild
      required-type       : com.google.common.collect.SingletonImmutableList
      path                : /matrix-build/actions/jenkins.model.InterruptedBuildAction/causes
      line number         : 12
      -------------------------------
      

      And here the section in the XML that seems to be problematic:

      <matrix-build>
        <actions>
          [...]
          <jenkins.model.InterruptedBuildAction>
            <causes class="com.google.common.collect.SingletonImmutableList" resolves-to="com.google.common.collect.ImmutableList$SerializedForm">
              <elements>
                <jenkins.model.CauseOfInterruption_-UserInterruption>
                  <user>admin</user>
                </jenkins.model.CauseOfInterruption_-UserInterruption>
              </elements>
            </causes>
          </jenkins.model.InterruptedBuildAction>
        </actions>
        [...]
      </matrix-build>
      

        Attachments

          Activity

          Hide
          oldelvet Richard Mortimer added a comment -

          I am seeing exactly the same problem with the latest git build. Head is commit 15b2a8b6b901734769a28ade1d777cf95c45b1e2

          But I see it going back in my logs as far as 19/August at which time I think I was running 1.426.

          Show
          oldelvet Richard Mortimer added a comment - I am seeing exactly the same problem with the latest git build. Head is commit 15b2a8b6b901734769a28ade1d777cf95c45b1e2 But I see it going back in my logs as far as 19/August at which time I think I was running 1.426.
          Hide
          oldelvet Richard Mortimer added a comment -

          I implemented a testcase for this issue to help someone who is able to fix the problem. See
          https://github.com/jenkinsci/jenkins/pull/234

          Show
          oldelvet Richard Mortimer added a comment - I implemented a testcase for this issue to help someone who is able to fix the problem. See https://github.com/jenkinsci/jenkins/pull/234
          Hide
          oldelvet Richard Mortimer added a comment -

          I have a fix that I have tested locally. I need to cleanup the code and will issue a full github pull request later today.

          Show
          oldelvet Richard Mortimer added a comment - I have a fix that I have tested locally. I need to cleanup the code and will issue a full github pull request later today.
          Hide
          fredg Fred G added a comment -

          I have the same problem with Jenkins 1.428 and aborted Freestyle Jobs (Class: hudson.model.FreeStyleBuild).

          Show
          fredg Fred G added a comment - I have the same problem with Jenkins 1.428 and aborted Freestyle Jobs (Class: hudson.model.FreeStyleBuild).
          Hide
          eedri Eyal Edri added a comment -

          i have the same stack trace when using 1.430

          Show
          eedri Eyal Edri added a comment - i have the same stack trace when using 1.430
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Richard Mortimer
          Path:
          core/src/main/java/hudson/util/XStream2.java
          core/src/main/java/hudson/util/xstream/ImmutableListConverter.java
          core/src/test/java/hudson/util/XStream2Test.java
          http://jenkins-ci.org/commit/jenkins/ebee47bb75d2043988b901f552563b1ca2b9d751
          Log:
          JENKINS-10903 Serialize ImmutableList in the same manner as ImmutableMap.
          This is a partial fix for JENKINS-10903. Any new builds will
          be serialized correctly.

          Based on ImmutableMapConverter.java

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Richard Mortimer Path: core/src/main/java/hudson/util/XStream2.java core/src/main/java/hudson/util/xstream/ImmutableListConverter.java core/src/test/java/hudson/util/XStream2Test.java http://jenkins-ci.org/commit/jenkins/ebee47bb75d2043988b901f552563b1ca2b9d751 Log: JENKINS-10903 Serialize ImmutableList in the same manner as ImmutableMap. This is a partial fix for JENKINS-10903 . Any new builds will be serialized correctly. Based on ImmutableMapConverter.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Richard Mortimer
          Path:
          changelog.html
          core/src/main/java/hudson/util/xstream/ImmutableListConverter.java
          core/src/test/java/hudson/util/XStream2Test.java
          core/src/test/resources/hudson/util/runMatrix.xml
          http://jenkins-ci.org/commit/jenkins/f356b78ea03309517b112bb46442287f81a4531d
          Log:
          [FIXED JENKINS-10903] Canceling a parent multi-configuration build produce a
          build.xml that can't be deserialized

          Handle resolves-to="com.google.common.collect.ImmutableList$SerializedForm"
          manually and construct a suitable list. Any subsequent serialization of the
          class will use the direct form of serialization.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Richard Mortimer Path: changelog.html core/src/main/java/hudson/util/xstream/ImmutableListConverter.java core/src/test/java/hudson/util/XStream2Test.java core/src/test/resources/hudson/util/runMatrix.xml http://jenkins-ci.org/commit/jenkins/f356b78ea03309517b112bb46442287f81a4531d Log: [FIXED JENKINS-10903] Canceling a parent multi-configuration build produce a build.xml that can't be deserialized Handle resolves-to="com.google.common.collect.ImmutableList$SerializedForm" manually and construct a suitable list. Any subsequent serialization of the class will use the direct form of serialization.
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1159
          JENKINS-10903 Serialize ImmutableList in the same manner as ImmutableMap.
          [FIXED JENKINS-10903] Canceling a parent multi-configuration build produce a

          Kohsuke Kawaguchi : ebee47bb75d2043988b901f552563b1ca2b9d751
          Files :

          • core/src/main/java/hudson/util/xstream/ImmutableListConverter.java
          • core/src/test/java/hudson/util/XStream2Test.java
          • core/src/main/java/hudson/util/XStream2.java

          Kohsuke Kawaguchi : f356b78ea03309517b112bb46442287f81a4531d
          Files :

          • changelog.html
          • core/src/test/resources/hudson/util/runMatrix.xml
          • core/src/test/java/hudson/util/XStream2Test.java
          • core/src/main/java/hudson/util/xstream/ImmutableListConverter.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1159 JENKINS-10903 Serialize ImmutableList in the same manner as ImmutableMap. [FIXED JENKINS-10903] Canceling a parent multi-configuration build produce a Kohsuke Kawaguchi : ebee47bb75d2043988b901f552563b1ca2b9d751 Files : core/src/main/java/hudson/util/xstream/ImmutableListConverter.java core/src/test/java/hudson/util/XStream2Test.java core/src/main/java/hudson/util/XStream2.java Kohsuke Kawaguchi : f356b78ea03309517b112bb46442287f81a4531d Files : changelog.html core/src/test/resources/hudson/util/runMatrix.xml core/src/test/java/hudson/util/XStream2Test.java core/src/main/java/hudson/util/xstream/ImmutableListConverter.java

            People

            • Assignee:
              oldelvet Richard Mortimer
              Reporter:
              mansion Olivier Mansion
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: