Bug #27481 mysql.server stop does not stop mysql server processes
Submitted: 27 Mar 2007 18:49 Modified: 30 Mar 2007 6:30
Reporter: Marilee Niemi Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.37 OS:Linux (Linux - Slackware )
Assigned to: Assigned Account CPU Architecture:Any

[27 Mar 2007 18:49] Marilee Niemi
Description:
I recently installed 5.0.37 from the source distribution.  The install went fine and the 'mysql.server start' command works.  

However the 'mysql.server stop' does not work.  It runs for a long time (>5 min) and then stops, but MySQL is not stopped.  

I also tried using 'mysqladmin shutdown --host=localhost --port=3311 --socket=/usr/local/mysql5/temp/mysql.sock -uroot -p' and that just hangs.  When I do a control+C its says "Warning, Aborted waiting on pid file: 'usr/local/mysql5/data/TestLinux.pid''  I checked and the file does exist, and the mysql owner (mysql5) does have permissions to it.  I did a ps -ef on the pid listed in the file and it is running.

Even using the kill pid# does not work, it does seem to kill the pid but then it spawns a new pid.  So far only running 'killall -9 -u mysql5' as root actually works.  

I put some 'echo' statements in the mysql.server file to spit out the variables, to ensure that it was getting the right locations and everything looks good.  The my.cnf file it is reading is the correct one.  The pid file is correct. The basedir and the datadir are also correct.

I am running MySQL 4.1.22 on the same server also from the source distribution.  It stops and starts just fine.  

How to repeat:
I installed using the source distribution.  Since there was already another mysql installation.

Here are the configure options I used,
./configure --prefix=/usr/local/mysql5 --localstatedir=/usr/local/mysql5/data --enable-local-infile --with-unix-socket-path=/usr/local/mysql5/temp/mysql.sock --with-tcp-port=3311
[28 Mar 2007 4:38] Valeriy Kravchuk
Thank you for a problem report. I've also seen this behaviour several times. Can you, please, give more details about your system. Send the results of:

uname -a
free
getconf GNU_LIBPTHREAD_VERSION
getconf GNU_LIBC_VERSION
[30 Mar 2007 2:37] Marilee Niemi
Sorry for the delay, here is the output of the commands:

root@TestLinux:~# uname -a
Linux TestLinux 2.4.33.3 #1 Fri Sep 1 01:48:52 CDT 2006 i686 pentium4 i386 GNU/Linux

root@TestLinux:~# free
             total       used       free     shared    buffers     cached
Mem:       3104412     103216    3001196          0       3648      60104
-/+ buffers/cache:      39464    3064948
Swap:      1951888          0    1951888

root@TestLinux:~# getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10

root@TestLinux:~# getconf GNU_LIBC_VERSION
glibc 2.3.6
[30 Mar 2007 6:30] Sergei Golubchik
duplicate of bug#27310
[12 Apr 2007 7:32] mark walmsley
uname -a
Linux zabbix 2.4.33.3 #1 Fri Mar 2 14:16:58 EST 2007 i686 athlon-4 i386 GNU/Linux
mysql@zabbix:/usr/local/src/mysql-5.0.37$ free
             total       used       free     shared    buffers     cached
Mem:        256528     126712     129816          0      46048      55492
-/+ buffers/cache:      25172     231356
Swap:       971924         48     971876
mysql@zabbix:/usr/local/src/mysql-5.0.37$ getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10
mysql@zabbix:/usr/local/src/mysql-5.0.37$ getconf GNU_LIBC_VERSION
glibc 2.3.6

Same exact problem
[10 May 2007 23:52] Paul Stepanov
FreeBSD 192.168.1.1 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 08:43:30 UTC 2007     root@portnoy.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  amd64

the same problem.
[22 May 2007 3:42] Fred Tyler
I have the same problem. Seeing it in 5.0.41, so it's not fixed yet.

root@srv$ uname -a
Linux a0 2.6.15.7 #1 SMP Sat Jul 1 06:26:14 GMT 2006 i686 unknown unknown GNU/Linux

root@srv$ free
             total       used       free     shared    buffers     cached
Mem:        239536     222012      17524          0      47732     106336
-/+ buffers/cache:      67944     171592
Swap:       524280      59312     464968

root@srv$ getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10

root@srv$ getconf GNU_LIBC_VERSION
glibc 2.3.5
[18 Feb 2011 15:21] bruno chandia
I also! :/