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

if an Exception is thrown in a RestartListener Jenkins is left in a zombie state

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.320,2.319.1

      Description

      https://github.com/jenkinsci/jenkins/blob/b9cc9174789036f8049d316898aa76043cdc76df/core/src/main/java/jenkins/model/Jenkins.java#L4466-L4468

      if the RestartListener throws an expcetion then Jenkins never actually calls `lifecycle.restart` and the main app is in a "jenkins is restarting" mode so becomes a zombie.

      https://github.com/jenkinsci/acceptance-test-harness/pull/706#issuecomment-953869658

      master61454|2021-10-28 10:21:52.912+0000 [id=149]	INFO	jenkins.model.Jenkins$19#run: Restarting VM as requested by anonymous
      master61454|2021-10-28 10:21:52.927+0000 [id=149]	SEVERE	h.i.i.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler#uncaughtException: A thread (restart thread/149) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
      master61454|java.lang.NullPointerException
      master61454|	at org.jenkinsci.plugins.mailwatcher.MailWatcherMailer.send(MailWatcherMailer.java:116)
      master61454|	at org.jenkinsci.plugins.mailwatcher.MailWatcherNotification.send(MailWatcherNotification.java:156)
      master61454|	at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener$Notification$Builder.send(WatcherComputerListener.java:181)
      master61454|	at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener.onOffline(WatcherComputerListener.java:91)
      master61454|	at jenkins.model.Jenkins$MasterRestartNotifyier.onRestart(Jenkins.java:4526)
      master61454|	at jenkins.model.Jenkins$19.run(Jenkins.java:4467)
      ... no more logs 
      

       

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              Assignee:
              teilo James Nord
              Reporter:
              teilo James Nord
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: