Bug 133993

Summary: Service mysqld restart
Product: Red Hat Enterprise Linux 3 Reporter: Ryan Shultz <rshultz>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-20 19:41:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
mysql.init from 3.23.58-10 none

Description Ryan Shultz 2004-09-28 20:53:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 
SV1; .NET CLR 1.1.4322)

Description of problem:
When you attempt to run the command "service mysqld restart" it does 
not restart the server it errors out but comes back with OK.  When I 
check the service it shows the following after a restart "mysqld dead 
but subsys locked".

Version-Release number of selected component (if applicable):
mysql-server-3.23.58-1

How reproducible:
Always

Steps to Reproduce:
1. Key in service mysqld restart
2.
3.
    

Actual Results:  mysqld dead but subsys locked when performing 
a "service mysqld status" and shows that the service is OK.

Expected Results:  The service should have restarted.

Additional info:

Comment 1 Tom Lane 2004-10-05 18:47:12 UTC
I couldn't see any such problem in testing the current FC3 release
(3.23.58-10).  I think this might have been resolved by the updates
made to mysql.init in release -4 and -5.  I will attach the current
version of mysql.init to this bugzilla entry; could you try it and see
if it works for you?

Comment 2 Tom Lane 2004-10-05 18:48:54 UTC
Created attachment 104794 [details]
mysql.init from 3.23.58-10

Comment 3 Ryan Shultz 2004-10-05 19:21:53 UTC
I attempted to put that file in place in the init.d folder and it 
kept giving me a timeout error when trying to start mysqld.  I 
replaced it with the old file to keep the server running.  My box is 
completely up2date and the newest version I can even get (for 
enterprise) is the version I am running.

Comment 4 Tom Lane 2004-10-05 21:17:47 UTC
I think I may have confused you by referring to the file by the wrong
name.  The place to install it is actually /etc/rc.d/init.d/mysqld ...
is that where you put it, or did you call it mysql.init?

Comment 5 Ryan Shultz 2004-10-06 01:28:28 UTC
I put it in the /etc/init.d/ directory with the name mysqld.  I don't 
have the machine available right now but I believe that that is a sym 
link to /etc/rc.d/init.d

This file did not fix the issue.  Again, I am using AS3.

Comment 6 Tom Lane 2004-10-06 16:16:01 UTC
I tried this on a machine running stock RHEL3 U3, with both straight
mysql 3.23.58-1 and the updated version with the new init script. 
Works fine for me ... so there must be some additional contributing
factor that makes it not work for you.  Any idea what?

Comment 7 Ryan Shultz 2004-10-06 16:19:58 UTC
I have no idea.  Apache is installed but other than that, no major 
app server is running.  This is running on the new Sun x86 boxes 
(v60x).  Other than that I have no idea.  Is there any log file that 
will help with the diagnosis?

Comment 8 Tom Lane 2004-10-06 16:30:28 UTC
I dunno what a v60x is --- do we consider that still i386
architecture, or is it ia64 or x86_64?

One theory that comes to mind while looking at the init script is that
stop() doesn't seem to wait for the mysqld daemon to actually shut
down.  It seems possible that the restart fails because safe_mysqld
recognizes that there's an old daemon still running.  If you stick a
"sleep 1" between the stop and start steps in restart(), does it help?

Comment 9 Ryan Shultz 2004-10-06 17:41:10 UTC
I cannot confirm whether or not it actually kills the service or not 
as when I put the sleep 1 it shows FAILED for the stop and OK for the 
start though the service is then running.  I might not have even 
stopped the process.

Comment 10 Tom Lane 2004-10-06 17:43:37 UTC
Um, did you put the sleep into restart() as I suggested, or into
stop()?  If the latter you'd need to be careful about where.

Comment 11 Ryan Shultz 2004-10-11 13:02:46 UTC
I put it in the restart() section but one of our other sysadmins
replaced the my.cnf but did not kill the pid since the pid location
was not the same in his file.  The sleep command fixed the issue.  Thanks.

Comment 12 Tom Lane 2004-10-11 13:52:02 UTC
Great.  I had put the sleep into the latest RPMs (3.23.58-2.2 for
RHEL3), on speculation, but it looks like it was the right thing.
It looks like this can be marked as fixed for RHEL3 U4.

Comment 13 Josh Bressers 2004-10-20 19:41:30 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2004-569.html