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

safeRestart waits forever and does not restart Hudson

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Debian Linux
      java version "1.6.0_18"
      OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-1)
      OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)

      Description

      After change from Hudson ver. 1.358 to 1.359 the /safeRestart command will only bring Hudson to say "Hudson is being shut down", but the restart is not performed, although no jobs seem to be running (updates complete, no builds planned). The /restart command is still working properly.

        Issue Links

          Activity

          Hide
          mindless Alan Harder added a comment -

          I don't see any problem in current svn, running in jetty.. not sure what environment factors are important here.
          Can someone who sees this problem see how many of the log messages added in http://jenkins-ci.org/commit/31484 show up before things lock up?

          Show
          mindless Alan Harder added a comment - I don't see any problem in current svn, running in jetty.. not sure what environment factors are important here. Can someone who sees this problem see how many of the log messages added in http://jenkins-ci.org/commit/31484 show up before things lock up?
          Hide
          emmulator emmulator added a comment -

          Here is a section of our main HUDSON_HOME/stderr.log from the last time we bounced the Master. It was unresponsive to further http requests during this quieting down period.

          Show
          emmulator emmulator added a comment - Here is a section of our main HUDSON_HOME/stderr.log from the last time we bounced the Master. It was unresponsive to further http requests during this quieting down period.
          Hide
          mindless Alan Harder added a comment -

          ah! after some earlier refactor safeRestart started calling doQuietDown.. this method is synchronized, so it has locked out the main Hudson object the entire time it waits for shutdown (ie, exactly the behavior you describe)..

          Show
          mindless Alan Harder added a comment - ah! after some earlier refactor safeRestart started calling doQuietDown.. this method is synchronized, so it has locked out the main Hudson object the entire time it waits for shutdown (ie, exactly the behavior you describe)..
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/32805
          Log:
          [FIXED JENKINS-6649] doQuietDown was sychronized, so safeRestart (calling doQuietDown
          in blocking mode since 1.361) was locking Hudson object until all jobs complete!
          Now synchronize just to set isQuietingDown flag, but not while blocking.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java trunk/www/changelog.html http://jenkins-ci.org/commit/32805 Log: [FIXED JENKINS-6649] doQuietDown was sychronized, so safeRestart (calling doQuietDown in blocking mode since 1.361) was locking Hudson object until all jobs complete! Now synchronize just to set isQuietingDown flag, but not while blocking.
          Hide
          emmulator emmulator added a comment -

          I just upgraded and wanted to post confirmation that indeed this is working as before – thanks!

          Show
          emmulator emmulator added a comment - I just upgraded and wanted to post confirmation that indeed this is working as before – thanks!

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              hendrik_millner hendrik_millner
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: