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

Last Changes causes the JENKINS-45892

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I've been facing the JENKINS-45892 issue in my logs since November, but as it's not so urgent, I just found time to investigate this issue. After each build with "Publish last changes" post-build step I see the following error:

      JENKINS-45892: reference to hudson.model.FreeStyleProject@14a187[testing/test-last-changes] being saved from unexpected /var/lib/jenkins/jobs/testing/jobs/test-last-changes/builds/2/build.xml
      java.lang.IllegalStateException
      	at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:223)
      	at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)
      	at sun.reflect.GeneratedMethodAccessor471.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
      	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
      	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
      	at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
      	at hudson.XmlFile.write(XmlFile.java:194)
      	at hudson.model.Run.save(Run.java:1923)
      	at hudson.model.Run.execute(Run.java:1784)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      

      Stacktrace is the same in each job, so I paste it only once.

      Steps to reproduce issue*:*

      1. Create a FreeStyle Job
      2. Add GIT repository (tested with bitbucket)
      3. Add some build step (can be just shell step - echo some word)
      4. Add post-build action "Publish Last Changes"
      5. Save and run job
      6. Go to the Jenkins logs after the job is ended.
      7. Find the last log, which should have something like this:
      Feb 05, 2018 10:30:37 AM INFO hudson.model.Run execute
      testing/test-last-changes #2 main build action completed: SUCCESS
      Feb 05, 2018 10:30:37 AM WARNING hudson.XmlFile replaceIfNotAtTopLevel
      JENKINS-45892: reference to hudson.model.FreeStyleProject@14a187[testing/test-last-changes] being saved from unexpected /var/lib/jenkins/jobs/testing/jobs/test-last-changes/builds/2/build.xml
      java.lang.IllegalStateException

      Jenkins version: latest (2.104), but issue has been being existed at least since 2.92
      Last Changes Plugin version: latest (2.6), but issue has been being existed at least since 2.3

        Attachments

          Issue Links

            Activity

            Hide
            rmpestano Rafael Pestano added a comment -

            Just created JENKINS-50116.

            Show
            rmpestano Rafael Pestano added a comment - Just created  JENKINS-50116 .
            Hide
            rmpestano Rafael Pestano added a comment -

            Emil Wypych, can you try with v2.6.1 and share the results?

             

            Show
            rmpestano Rafael Pestano added a comment - Emil Wypych , can you try with v2.6.1 and share the results?  
            Hide
            ewypych Emil Wypych added a comment -

            Rafael Pestano yes, sure, I will do it today, but at evening (~9 P.M. CET). I will give you feedback when I'm done.  Thank you very much for fast release!

            Show
            ewypych Emil Wypych added a comment - Rafael Pestano yes, sure, I will do it today, but at evening (~9 P.M. CET). I will give you feedback when I'm done.  Thank you very much for fast release!
            Hide
            ewypych Emil Wypych added a comment -

            Rafael Pestano I've just updated Last Changes Plugin and made some tests - I confirm that problem was solved. Now I just see SUCCESS:

            main build action completed: SUCCESS
            

            Tested with few different jobs. Do you need something else, or is it enough for confirmation? 

            Also thank you very much for resolving this issue - logs look much better.  

            Show
            ewypych Emil Wypych added a comment - Rafael Pestano I've just updated Last Changes Plugin and made some tests - I confirm that problem was solved. Now I just see SUCCESS: main build action completed: SUCCESS Tested with few different jobs. Do you need something else, or is it enough for confirmation?  Also thank you very much for resolving this issue - logs look much better.  
            Hide
            rmpestano Rafael Pestano added a comment -

            Hi Emil Wypych, that's enough, I'll close the issue.

            Thank you very much for reporting and testing.

            Show
            rmpestano Rafael Pestano added a comment - Hi Emil Wypych , that's enough, I'll close the issue. Thank you very much for reporting and testing.

              People

              • Assignee:
                rmpestano Rafael Pestano
                Reporter:
                ewypych Emil Wypych
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: