Bug 120575

Summary: databases/mysql50-server 5.0.51a won't restart/stop anymore
Product: Ports & Packages Reporter: Michael Scheidell <scheidell>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Michael Scheidell 2008-02-12 23:10:01 UTC
Ugraded mysql from 5.0.37 to 5.0.51a and can't stop it anymore.
5.0.37 was fine.
using /usr/local/etc/rc.d/mysql-server.sh stop OR restart.  it just hangs.


/var/db/mysql/* shows no abberations:
tail /var/db/mysql/*err
080212 18:00:12  mysqld restarted
080212 18:00:12  InnoDB: Started; log sequence number 0 44044
080212 18:00:12 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.51a'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.51a
080212 18:00:59 [Note] /usr/local/libexec/mysqld: Normal shutdown

080212 18:01:13  mysqld restarted
080212 18:01:13  InnoDB: Started; log sequence number 0 44044
080212 18:01:13 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.51a'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.51a


etc/init.d/mysql-server.sh restart
Stopping mysql.
Waiting for PIDS: 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691, 12691


 ps -auxww | grep mysql
mysql     12667  0.0  0.2  1784  1180  p0  I     5:58PM   0:00.02 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/listserver.hackertrap.net.pid
mysql     12691  0.0 11.0 327968 56944  p0  S     5:58PM   0:00.89 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --pid-file=/var/db/mysql/listserver.hackertrap.net.pid --port=3306 --socket=/tmp/mysql.sock
root      12721  0.0  0.2  1888  1272  p0  T     5:58PM   0:00.02 /bin/sh /etc/init.d/mysql-server.sh restart
root      12730  0.0  0.3  1888  1308  p0  T     5:58PM   0:00.05 /bin/sh /etc/init.d/mysql-server.sh stop

How-To-Repeat: upgrade to mysql50a.

/usr/local/etc/rc.d/mysql-server stop.
only difference I have it a edit to mysql-server to look for extra commands in /etc/my.cnf
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-02-12 23:11:28 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Michael Scheidell 2008-02-13 01:19:55 UTC
Followup:

here is problem (fat fingers: I compiled this with a new 'switch'

BUILD_OPTIMIZED=1 WITH_PROC_SCOPE_PTH=1 WITHOUT_THR_ALARM=1

think about it:
mysqladmin shutdown  or /usr/local/etc/rc.d/mysql-server.sh stop has to 
stop the threads before it can stop server.

the 'without_thr_alarm' should be removed.

the only way to stop the server if you compile it with that is SIGKILL, 
so, normal shutdown or reboot will timeout.
SIGKILL won't flush the database, so, WITHOUT_THR_ALARM switch should be 
removed.

if I compile with BUILD_OPTIMIZED=1 WITH_PROC_SCOPE_PTH=1  everything 
works fine.

-- 
Michael Scheidell, CTO
Main: 561-999-5000, Office: 561-939-7259
 > *| *SECNAP Network Security Corporation
Winner 2008 Technosium hot company award.
www.technosium.com/hotcompanies/ <http://www.technosium.com/hotcompanies/>


_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(tm). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________
Comment 3 Alex Dupre freebsd_committer freebsd_triage 2008-02-13 06:42:13 UTC
State Changed
From-To: open->closed

It's the expected behavior.