Bug #29650 Failure of MySQL to shutdown
Submitted: 9 Jul 2007 14:45 Modified: 25 Dec 2007 16:32
Reporter: John Pearcey Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.41 OS:Linux (Redhat)
Assigned to: CPU Architecture:Any

[9 Jul 2007 14:45] John Pearcey
Description:
When running the script mysql.server to start and stop the server, starting proceeds correctly but the stop command fails to shut down the server. I have traced this down to line 336 in the script where the command 'kill $mysqlmanager_pid' is called. This command kills only one thread at which point another thread is spawned. The script then waits for the pid file to be removed which never happens and the script therefore waits forever. To stop the server, it seems that one has to use kill-9 on the main process as well as at least one other of the threads.

How to repeat:
After compiling and setting up the database on Redhat, copy the script mysql.server into /etc/init.d/ and invoke 'service mysqld start', after the server has started, invoke 'service mysqld stop'. The command will hang.
[9 Jul 2007 15:27] Valeriy Kravchuk
Thank you for a problem report. Please, send the results of:

uname -a
getconf GNU_LIBC_VERSION
getconf GNU_LIBPTHREAD_VERSION

from your RedHat. What exact binaries you had used (give filename or URL used to download)?
[9 Jul 2007 20:21] John Pearcey
[root@bovril ~]# uname -a
Linux bovril 2.6.9-5.0.5.ELsmp #1 SMP Fri Apr 8 14:29:47 EDT 2005 i686 i686 i386 GNU/Linux
[root@bovril ~]# getconf GNU_LIBC_VERSION
glibc 2.3.4
[root@bovril ~]# getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.4

I obtained the tar file from:
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.41.tar.gz/from/http://ftp.heanet.ie...
[10 Jul 2007 10:55] Valeriy Kravchuk
So, you built from sources, it seems. Please, send ./configure command line used then.
[10 Jul 2007 14:47] John Pearcey
I had to look at the command history to find out:

./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static

I had also set some vars:
export CFLAGS="-O3"
export CXX=gcc
export CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti"
[29 Sep 2007 12:50] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.0.45. In case of the same failure, please, send your entire error log.
[30 Oct 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 Oct 2007 8:19] John Pearcey
Due to commercial pressure, I set up a new machine using the default mysql distribution that came with the OS (Fedora core 5). I have been unable to test with 5.0.45.
[25 Nov 2007 16:32] Valeriy Kravchuk
Can anybody repeat the behavour described here with 5.0.45 or newer version?
[26 Dec 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[8 Sep 2010 21:26] Marc ALFF
See possibly related bug#56666