5.6-beta -- init stop script (centos) does not wait for the server to be fully stopped

Bug #1254153 reported by Jay Janssen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Raghavendra D Prabhu
5.6
Fix Released
Undecided
Raghavendra D Prabhu

Bug Description

This breaks restart because stop exits early and the start action fails because the daemon is still there.

9225 pts/0 S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/node
 9651 pts/0 Sl 0:01 \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64

[root@node1 mysql]# service mysql stop && service mysql start
Shutting down MySQL (Percona XtraDB Cluster)....... SUCCESS!
 ERROR! MySQL (Percona XtraDB Cluster) is running but PID file could not be found

 9225 pts/0 S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/node
 9651 pts/0 S 0:02 \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

This looks like a race condition where the pid file has been
removed by mysqld while shutting down but process is still there
(but would exit in a second or so). This is the only possibility
from the error messages. So, this is more an issue with mysqld
itself than init script (which is similar for stop in PXC
5.5/PS 5.5/MySQL 5.5).

Only way around this would be add to a if kill -0 .... sleep 1; fi

Did the process finally exit (or was another service mysql stop
required?)

Also, can you share my.cnf as well.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1526

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.