ikedam commented on Bug JENKINS-13666

I finally succeeded to reproduce this problem:

Steps: Tested with Jenkins 1.509.2 + build-timeout plugin 1.14

  1. Go to Manage Jenkins > Script Console
  2. Run following script
    hudson.triggers.Trigger.timer.schedule(new java.util.TimerTask() {
      public void run() {
        throw new RuntimeException("Exception from TimerTask with love");
      }
    }, 1000);
  3. Following log is output
    Exception in thread "Jenkins cron thread" java.lang.RuntimeException: Exception from TimerTask with love
            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:526)
            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:190)
            at Script1$1.run(Script1.groovy:3)
            at java.util.TimerThread.mainLoop(Timer.java:555)
            at java.util.TimerThread.run(Timer.java:505)
    
  4. Run a job configured with build-timeout. It always fails with following output:
    FATAL: Timer already cancelled.
    java.lang.IllegalStateException: Timer already cancelled.
    	at java.util.Timer.sched(Timer.java:397)
    	at java.util.Timer.schedule(Timer.java:193)
    	at hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl.reschedule(BuildTimeoutWrapper.java:179)
    	at hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl.<init>(BuildTimeoutWrapper.java:164)
    	at hudson.plugins.build_timeout.BuildTimeoutWrapper.setUp(BuildTimeoutWrapper.java:204)
    	at hudson.model.Build$BuildExecution.doRun(Build.java:154)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:584)
    	at hudson.model.Run.execute(Run.java:1575)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    	at hudson.model.ResourceController.execute(ResourceController.java:88)
    	at hudson.model.Executor.run(Executor.java:237)
    
  5. You need restart Jenkins to recover from this problem.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to