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

Discard Old Builds with Days to keep builds on year change seems to be broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: core
    • Labels:
    • Environment:
      xbuntu 11.10 64bit
    • Similar Issues:

      Description

      I have setup the config to discard the old builds that are older than 30 days.
      Problem is that old builds are discarded, but in a wrong way.

      See the screenshot for details. I assume that problem might be related to year change.

        Attachments

        1. build.xml
          19 kB
          Peter Butkovic
        2. jenkins.log
          215 kB
          Peter Butkovic
        3. problem.jpg
          53 kB
          Peter Butkovic

          Issue Links

            Activity

            Hide
            kutzi kutzi added a comment -

            Could you be a bit more specific please? How are they discarded 'in a wrong way' - are too old or too new builds being discarded?

            Show
            kutzi kutzi added a comment - Could you be a bit more specific please? How are they discarded 'in a wrong way' - are too old or too new builds being discarded?
            Hide
            typek_pb Peter Butkovic added a comment -

            please see the screenshot:
            builds 3-9 are missing in the "Build History" list, therefor I assume it's discarded due to 30 days configuration

            Show
            typek_pb Peter Butkovic added a comment - please see the screenshot: builds 3-9 are missing in the "Build History" list, therefor I assume it's discarded due to 30 days configuration
            Hide
            kutzi kutzi added a comment -

            There are other reasons why builds could be deleted. The code for deleting old builds is basically unchanged for years, so I would be surprised when a bug should show up now.
            Do you have any more information - e.g. did you have logging enabled in FINE level?

            Show
            kutzi kutzi added a comment - There are other reasons why builds could be deleted. The code for deleting old builds is basically unchanged for years, so I would be surprised when a bug should show up now. Do you have any more information - e.g. did you have logging enabled in FINE level?
            Hide
            typek_pb Peter Butkovic added a comment -

            seems you're right and it's not related to 30 days discard setting.
            As I got some lost builds again (not on year change). Problem seems to be present that whenever I restart my PC some builds get lost.

            See attached log file as well as one of the reffered problematic build.xml files for details:
            /var/log/jenkins/jenkins.log -> jenkins.log
            /var/lib/jenkins/jobs/yourpresenter/builds/2012-01-01_21-39-54/build.xml -> build.xml

            Hope it helps in further analysis.

            I checked the log file and there is exception thrown:
            hudson.util.IOException2: Unable to read /var/lib/jenkins/jobs/yourpresenter/builds/2011-12-31_12-32-47/build.xml
            at hudson.XmlFile.unmarshal(XmlFile.java:160)
            at hudson.model.Run.reload(Run.java:283)
            at hudson.model.Run.<init>(Run.java:272)
            at hudson.model.AbstractBuild.<init>(AbstractBuild.java:162)
            at hudson.maven.AbstractMavenBuild.<init>(AbstractMavenBuild.java:54)
            at hudson.maven.MavenModuleSetBuild.<init>(MavenModuleSetBuild.java:137)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
            at hudson.model.AbstractProject.loadBuild(AbstractProject.java:949)
            at hudson.model.AbstractProject$1.create(AbstractProject.java:256)
            at hudson.model.AbstractProject$1.create(AbstractProject.java:254)
            at hudson.model.RunMap.load(RunMap.java:221)
            at hudson.model.AbstractProject.onLoad(AbstractProject.java:254)
            at hudson.maven.MavenModuleSet.onLoad(MavenModuleSet.java:617)
            at hudson.model.Items.load(Items.java:115)
            at jenkins.model.Jenkins$14.run(Jenkins.java:2360)
            at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
            at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
            at jenkins.model.Jenkins$5.runTask(Jenkins.java:800)
            at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
            at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
            at java.lang.Thread.run(Thread.java:679)
            Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot deserialize object with new readObject()/writeObject() methods
            ---- Debugging information ----
            class : hudson.maven.MavenModuleSetBuild
            required-type : org.eclipse.jgit.lib.ObjectId
            path : /hudson.maven.MavenModuleSetBuild/actions/hudson.plugins.git.util.BuildData/buildsByBranchName/entry/hudson.plugins.git.util.Build/revision/sha1
            line number : 15
            -------------------------------
            at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doUnmarshal(SerializableConverter.java:281)
            at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290)
            at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233)
            at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290)
            at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233)
            at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
            at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:79)
            at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:66)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290)
            at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233)
            at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
            at hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:85)
            at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61)
            at hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290)
            at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233)
            at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
            at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
            at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926)
            at hudson.util.XStream2.unmarshal(XStream2.java:91)
            at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912)
            at hudson.XmlFile.unmarshal(XmlFile.java:156)
            ... 25 more

            Show
            typek_pb Peter Butkovic added a comment - seems you're right and it's not related to 30 days discard setting. As I got some lost builds again (not on year change). Problem seems to be present that whenever I restart my PC some builds get lost. See attached log file as well as one of the reffered problematic build.xml files for details: /var/log/jenkins/jenkins.log -> jenkins.log /var/lib/jenkins/jobs/yourpresenter/builds/2012-01-01_21-39-54/build.xml -> build.xml Hope it helps in further analysis. I checked the log file and there is exception thrown: hudson.util.IOException2: Unable to read /var/lib/jenkins/jobs/yourpresenter/builds/2011-12-31_12-32-47/build.xml at hudson.XmlFile.unmarshal(XmlFile.java:160) at hudson.model.Run.reload(Run.java:283) at hudson.model.Run.<init>(Run.java:272) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:162) at hudson.maven.AbstractMavenBuild.<init>(AbstractMavenBuild.java:54) at hudson.maven.MavenModuleSetBuild.<init>(MavenModuleSetBuild.java:137) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at hudson.model.AbstractProject.loadBuild(AbstractProject.java:949) at hudson.model.AbstractProject$1.create(AbstractProject.java:256) at hudson.model.AbstractProject$1.create(AbstractProject.java:254) at hudson.model.RunMap.load(RunMap.java:221) at hudson.model.AbstractProject.onLoad(AbstractProject.java:254) at hudson.maven.MavenModuleSet.onLoad(MavenModuleSet.java:617) at hudson.model.Items.load(Items.java:115) at jenkins.model.Jenkins$14.run(Jenkins.java:2360) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$5.runTask(Jenkins.java:800) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot deserialize object with new readObject()/writeObject() methods ---- Debugging information ---- class : hudson.maven.MavenModuleSetBuild required-type : org.eclipse.jgit.lib.ObjectId path : /hudson.maven.MavenModuleSetBuild/actions/hudson.plugins.git.util.BuildData/buildsByBranchName/entry/hudson.plugins.git.util.Build/revision/sha1 line number : 15 ------------------------------- at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doUnmarshal(SerializableConverter.java:281) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71) at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:79) at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71) at hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:85) at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61) at hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926) at hudson.util.XStream2.unmarshal(XStream2.java:91) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912) at hudson.XmlFile.unmarshal(XmlFile.java:156) ... 25 more
            Hide
            kutzi kutzi added a comment -

            Looks like a duplicate of JENKINS-12267

            Show
            kutzi kutzi added a comment - Looks like a duplicate of JENKINS-12267

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              typek_pb Peter Butkovic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: