timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-6649] safeRestart waits forever and does not restart Hudson #745

Closed timja closed 14 years ago

timja commented 14 years ago

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.


Originally reported by hendrik_millner, imported from: safeRestart waits forever and does not restart Hudson
  • assignee: mindless
  • status: Closed
  • priority: Major
  • resolution: Fixed
  • resolved: 2010-07-12T15:38:08+00:00
  • imported: 2022/01/10
timja commented 14 years ago

scm_issue_link:

Code changed in hudson
User: : kohsuke
Path:
trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java
http://jenkins-ci.org/commit/31484
Log:
JENKINS-6649 added additional logging so that we can see what's going on during the restart. This will be in 1.361.

timja commented 14 years ago

hendrik_millner:

1.361 resolves this issue on my machine, safeRestart performs a proper restart again, without waiting anymore.

timja commented 14 years ago

hendrik_millner:

Also 1.362 has no problems with the safeRestart, seems fixed.

timja commented 14 years ago

voorth:

Problem seems to have regressed in 1.363.
Restart happens eventually, but web interface is completely unresponsive until all running jobs are completed.

timja commented 14 years ago

emmulator:

Hmmm.. 1.362 here, and /safeRestart causes hudson to not respond to any further http requests. I click the 'Yes' button, and this request itself never returns, and no further requests return. But if I tail HUDSON_HOME/stderr.log, I see it counting down the running jobs until they're all done, at which point it restarts normally and the "Please wait..." page is available as normal.

Running jdk 1.6 64bit Red Hat, bundled container.

timja commented 14 years ago

mindless:

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?

timja commented 14 years ago

emmulator:

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.

timja commented 14 years ago

mindless:

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)..

timja commented 14 years ago

scm_issue_link:

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.

timja commented 14 years ago

emmulator:

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

timja commented 2 years ago

[Originally duplicated by: JENKINS-6978]