From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7 Description of problem: When restarting MySQL daemon using '/etc/init.d/mysqld' or 'service mysqld restart', the message "Timeout error occurred trying to start MySQL daemon" is displayed and restart fails. Version-Release number of selected component (if applicable): mysql-4.1.14-1.FC4.1 How reproducible: Sometimes Steps to Reproduce: 1. service mysqld restart Actual Results: root@localhost ~# service mysqld restart Stopping MySQL: [ OK ] Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED] Expected Results: root@localhost ~# service mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ] Additional info: It appears the 'stop()' function in '/etc/init.d/mysqld' does not wait for MySQL daemon to stop. It sends a SIGTERM to the process and removes the lock file and the socket file immediately, even if the process is still shutting down. Changing the 'stop()' function to: stop(){ MPID=`cat "$mypidfile" 2>/dev/null` /bin/kill `cat "$mypidfile" 2>/dev/null ` >/dev/null 2>&1 ret=$? if [ -n "$MPID" ]; then while kill -0 $MPID 2>/dev/null; do sleep 1 done fi if [ $ret -eq 0 ]; then ... }
I've put a loop similar to this into the latest updates (4.1.15 and 5.0.15). Not sure why the issue hasn't come up before; perhaps recent versions of MySQL take longer to shut down than they used to?
Thanks for this fix. Concerning shutdown/restart speed, the machine was not that powerfull (an old PIII) and somewhat loaded. This might explain this "special" case.
Does this affect FC3 as well?
I think the Fedora Legacy guys already took care of it --- see bug #152531
Fedora Legacy guys have not taken care of this bug. At this moment, Legacy maintains RHL7.3, RHL9, FC1 and FC2. FC3 is not on the Fedora Legacy project's maintanence list yet. I'll open a new bug for this. Thanks, Tom.