Bug 175902 - Timeout error occurred trying to start MySQL daemon
Timeout error occurred trying to start MySQL daemon
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: mysql (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-15 21:12 EST by David Eisenstein
Modified: 2013-07-02 23:07 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-03 21:38:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Eisenstein 2005-12-15 21:12:07 EST
I am creating this bug as a clone of #172426, because the problem that
the Fedora Core 4 version fixes ('/etc/init.d/mysqld' not waiting for MySQL
daemon to stop) exists in previous versions of that script.

This needs to be fixed, then, in FC3's mysql.  Thanks.   -David

+++ This bug was initially created as a clone of Bug #172426 +++

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

-- Additional comment from tgl@redhat.com on 2005-11-14 23:06 EST --
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?

-- Additional comment from rchibois@gmail.com on 2005-11-29 05:01 EST --
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.

-- Additional comment from deisenst@gtw.net on 2005-12-15 02:41 EST --
Does this affect FC3 as well?

-- Additional comment from tgl@redhat.com on 2005-12-15 08:53 EST --
I think the Fedora Legacy guys already took care of it --- see bug #152531

-- Additional comment from deisenst@gtw.net on 2005-12-15 21:00 EST --
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.
Comment 1 Matthew Miller 2006-07-10 19:21:44 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 2 David Eisenstein 2007-09-03 21:38:03 EDT
Fedora Legacy is closed.  This bug will not be fixed by Fedora Legacy.

Note You need to log in before you can comment on or make changes to this bug.