Bug #25341 | /etc/init.d/mysql stop may timeout too quickly | ||
---|---|---|---|
Submitted: | 30 Dec 2006 23:08 | Modified: | 15 Feb 2007 5:10 |
Reporter: | Mark Callaghan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
Version: | 5.0.34-BK, 5.0.30 | OS: | Linux (Linux) |
Assigned to: | Chad MILLER | CPU Architecture: | Any |
Tags: | innodb, shutdown, timeout |
[30 Dec 2006 23:08]
Mark Callaghan
[1 Jan 2007 18:28]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described with 5.0.34-BK on Linux. One just have to review the code: wait_for_pid () { i=0 while test $i -lt 35 ; do sleep 1 case "$1" in 'created') test -s $pid_file && i='' && break ;; 'removed') test ! -s $pid_file && i='' && break ;; *) echo "wait_for_pid () usage: wait_for_pid created|removed" exit 1 ;; esac echo $echo_n ".$echo_c" i=`expr $i + 1` done ...
[2 Jan 2007 15:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/17526 ChangeSet@1.2361, 2007-01-02 10:06:12-05:00, cmiller@zippy.cornsilk.net +2 -0 Bug#25341: "init.d/mysql stop" may timeout too quickly Thirty five seconds is entirely too short of a period to wait for a server to exit. Instead, make a valliant effort to make sure it exits, and only give up after a very long period (arbitrarily chosen as 15 minutes). In addition, if we're being asked to restart the server, then don't try to start again if trying to stop the server failed. --- Return zero by default, when the script exits. --- Set return-/exit-value based on whether we successfully dealt with the PID-file.
[31 Jan 2007 20:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/19124 ChangeSet@1.2361, 2007-01-31 15:39:41-05:00, cmiller@zippy.cornsilk.net +2 -0 Bug#25341: "init.d/mysql stop" may timeout too quickly Thirty five seconds is entirely too short of a period to wait for a server to exit. Instead, make a valliant effort to make sure it exits, and only give up after a very long period (arbitrarily chosen as 15 minutes). In addition, if we're being asked to restart the server, then don't try to start again if trying to stop the server failed. --- Return zero by default, when the script exits. --- Set return-/exit-value based on whether we successfully dealt with the PID-file. --- Don't wait that long if the program we're waiting on exits. It should only exit if the server is not going to be started.
[14 Feb 2007 15:10]
Chad MILLER
Available in 5.0.36 and 5.1.16-beta.
[15 Feb 2007 5:10]
Paul DuBois
Noted in 5.0.36, 5.1.16 changelogs.