-
Bug
-
Resolution: Cannot Reproduce
-
Blocker
-
Windows Server 2008 R2
-
Powered by SuggestiMate
The build history of the whole matrix build is hold as long as I configured. But the build history of the achses (sub builds) is hold only for two days. All older sub builds history is deleted from hdd.
The last version of Jenkins, I know is working, is 1.484 to which I downgraded.
- is duplicated by
-
JENKINS-16014 losing build history in configuration matrix jobs
-
- Resolved
-
-
JENKINS-15979 "forgets" builds, workspace of renamed job
-
- Resolved
-
-
JENKINS-23089 Configuration builds sometimes disappear
-
- Resolved
-
- is related to
-
JENKINS-8754 ROADMAP: Improve Start-up Time
-
- Closed
-
-
JENKINS-16638 child builds going missing from matrix jobs
-
- Open
-
[JENKINS-15799] loosing matrix sub builds
We're using Jenkins v1.59 on a Win7x64 machine.
Same problem.
Even adding logRotator configuration to each axis didn't work
We are still unable to reproduce this problem locally, which is making the fix difficult.
To better understand what's going on, we need help from those who are seeing this problem.
Our current leading hypothesis is that the log rotator is going rogue and deleting build records that it's not supposed to delete. While we don't know how this happens, if this is the case, then we can monitor its behavior by installing additional RunListener into the running system.
To do so, please go to the Groovy script console (from "Manage Jenkins" link) and run the following command:
import java.util.logging.*; class DeletionListener extends hudson.model.listeners.RunListener<Run> { def l = Logger.getLogger("zd-13124"); public void onDeleted(Run r) { l.log(Level.WARNING, "Deleting "+r.fullDisplayName, new Exception()); } } new DeletionListener().register();
With this installed, you should start seeing the stack trace reported on every time Jenkins deletes a build record. Note that this is only effective until you restart Jenkins, so if you restart Jenkins you'll have to run this script again.
Do a new build, and if you observe that the records are gone, please check the Jenkins log and see if you can spot logging output from this listener. Attach the stack trace to this ticket as a comment so that we can udnerstand what's going on.
I have been seeing this problem on a matrix build that has 3 configurations. I don't have any build deletion rule for BuildMultixxx. (I would like to keep all of these). There is a build deletion rule for the job "Installer - Phoenix Sim". The "Installer" build job uses some artifacts from the BuildMultixxx job. Here is a portion of my Jenkins stack trace. This is from Jenkins ver. 1.531
Sep 24, 2013 3:59:21 PM INFO hudson.model.AsyncPeriodicWork$1 run Finished Gravatar periodic lookup. 13175 ms Sep 24, 2013 4:01:06 PM INFO hudson.triggers.SCMTrigger$Runner run SCM changes detected in BuildMultiPhoenix. Triggering #856 Sep 24, 2013 4:04:22 PM INFO hudson.model.Run execute Installer - Phoenix Sim #162 - 855 main build action completed: SUCCESS Sep 24, 2013 4:04:24 PM WARNING java_util_logging_Logger$log call Deleting Installer - Phoenix Sim #132 - 738 java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at DeletionListener.onDeleted(Script1.groovy:7) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244) at hudson.model.Run.delete(Run.java:1363) at hudson.tasks.LogRotator.perform(LogRotator.java:124) at hudson.model.Job.logRotate(Job.java:437) at hudson.model.Run.execute(Run.java:1667) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Sep 24, 2013 4:04:48 PM INFO hudson.model.Run execute BuildMultiPhoenix » SimRelease 9.75.0.856-a main build action completed: SUCCESS Sep 24, 2013 4:04:48 PM INFO hudson.model.Run execute BuildMultiPhoenix » RTRelease 9.75.0.856-a main build action completed: SUCCESS Sep 24, 2013 4:04:57 PM WARNING java_util_logging_Logger$log call Deleting BuildMultiPhoenix » RTRelease 9.75.0.851-a java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at DeletionListener.onDeleted(Script1.groovy:7) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244) at hudson.model.Run.delete(Run.java:1363) at hudson.matrix.LinkedLogRotator.perform(LinkedLogRotator.java:64) at hudson.model.Job.logRotate(Job.java:437) at hudson.model.Run.execute(Run.java:1667) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Sep 24, 2013 4:04:57 PM WARNING java_util_logging_Logger$log call Deleting BuildMultiPhoenix » RTRelease 9.75.0.850-a java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at DeletionListener.onDeleted(Script1.groovy:7) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244) at hudson.model.Run.delete(Run.java:1363) at hudson.matrix.LinkedLogRotator.perform(LinkedLogRotator.java:64) at hudson.model.Job.logRotate(Job.java:437) at hudson.model.Run.execute(Run.java:1667) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Sep 24, 2013 4:05:02 PM WARNING java_util_logging_Logger$log call Deleting BuildMultiPhoenix » SimRelease 9.75.0.851-a java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at DeletionListener.onDeleted(Script1.groovy:7) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244) at hudson.model.Run.delete(Run.java:1363) at hudson.matrix.LinkedLogRotator.perform(LinkedLogRotator.java:64) at hudson.model.Job.logRotate(Job.java:437) at hudson.model.Run.execute(Run.java:1667) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Sep 24, 2013 4:05:02 PM WARNING java_util_logging_Logger$log call Deleting BuildMultiPhoenix » SimRelease 9.75.0.850-a java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at DeletionListener.onDeleted(Script1.groovy:7) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244) at hudson.model.Run.delete(Run.java:1363) at hudson.matrix.LinkedLogRotator.perform(LinkedLogRotator.java:64) at hudson.model.Job.logRotate(Job.java:437) at hudson.model.Run.execute(Run.java:1667) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Sep 24, 2013 4:05:09 PM INFO hudson.model.Run execute BuildMultiPhoenix » Release 9.75.0.856-a main build action completed: SUCCESS Sep 24, 2013 4:05:22 PM WARNING java_util_logging_Logger$log call Deleting BuildMultiPhoenix » Release 9.75.0.851-a java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at DeletionListener.onDeleted(Script1.groovy:7) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244) at hudson.model.Run.delete(Run.java:1363) at hudson.matrix.LinkedLogRotator.perform(LinkedLogRotator.java:64) at hudson.model.Job.logRotate(Job.java:437) at hudson.model.Run.execute(Run.java:1667) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Sep 24, 2013 4:05:22 PM WARNING java_util_logging_Logger$log call Deleting BuildMultiPhoenix » Release 9.75.0.850-a java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at DeletionListener.onDeleted(Script1.groovy:7) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244) at hudson.model.Run.delete(Run.java:1363) at hudson.matrix.LinkedLogRotator.perform(LinkedLogRotator.java:64) at hudson.model.Job.logRotate(Job.java:437) at hudson.model.Run.execute(Run.java:1667) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Sep 24, 2013 4:05:32 PM INFO hudson.model.Run execute BuildMultiPhoenix 9.75.0.856-a main build action completed: SUCCESS Sep 24, 2013 4:07:09 PM INFO hudson.model.Run execute UnitTestPhoenix TEST 600:856 main build action completed: SUCCESS Sep 24, 2013 4:07:10 PM INFO hudson.model.Run execute BuildMultiPhoenix » promotion » Unit Tests Pass #420 main build action completed: SUCCESS Sep 24, 2013 4:10:42 PM INFO hudson.model.Run execute TestPhoenix_9_75_Remote TEST 1111:856 main build action completed: UNSTABLE Sep 24, 2013 4:10:46 PM INFO hudson.model.Run execute TestSimPhoenix_Remote TEST 1359:856 main build action completed: SUCCESS Sep 24, 2013 4:15:43 PM INFO hudson.model.Run execute TestPhoenix_9_75_Remote TEST 1112:856 main build action completed: UNSTABLE Sep 24, 2013 4:20:42 PM INFO hudson.model.Run execute TestPhoenix_9_75_Remote TEST 1113:856 main build action completed: SUCCESS Sep 24, 2013 4:20:45 PM INFO hudson.model.Run execute BuildMultiPhoenix » promotion » Smoke Tests Pass #376 main build action completed: SUCCESS Sep 24, 2013 4:29:07 PM INFO hudson.model.AsyncPeriodicWork$1 run Started Gravatar periodic lookup Sep 24, 2013 4:29:17 PM INFO hudson.model.AsyncPeriodicWork$1 run Finished Gravatar periodic lookup. 9351 ms Sep 24, 2013 4:30:22 PM INFO hudson.model.Run execute TestSimPhoenixSingles #501 main build action completed: SUCCESS Sep 24, 2013 4:30:25 PM INFO hudson.model.Run execute BuildMultiPhoenix » promotion » Automated Functional Regression Passed #165 main build action completed: SUCCESS
Upgraded to Jenkins version 1.539 several days (or months ago).
LogRotation is set to X days and Y builds and another job is set to Y builds only.
Problem does not occur anymore on both machines.
Please can anyone confirm this?
Can someone please confirm whether this problem is still happening on recent Jenkins versions (preferably recent enough for the Matrix Project to have been moved into a plugin)? Possibly even while running Kohsuke's diagnostic script?
Never lost any subbuild again so i suggest to close this ticket and the related one.
If there are still problems, we can reopen this bug or create a new one.
Happened to me few days ago with 1.557 on Windows. Nothing mentioning the job in log. Happened after few months of no problems. I'll try installing the listener.
Assuming this is obsolete given the lack of positive responses to recent comments asking for updates.
If you experience a similar problem in recent Jenkins versions, it's probably best to file a new issue against the matrix project plugin to prevent confusion when trying to determine the cause.
I'm seeing this with freestyle builds after our recent upgrade to 1.513. Note that I initially reported this issue in
JENKINS-15979, which has been marked a duplicate of this ticket. My initial report (although I didn't think to mention it) was about freestyle builds.As with
JENKINS-15979, what we saw on 1.513 was that the build history was missing from the renamed job and builds fired after the rename would be available in history for a while, then disappear. However, the builds were all there on disk. Once again, restarting fixed the problem.Linux (CentOS).