flush tables with read lock getting stuck in command line

Hi,

When I run the command “flush tables with read lock;” in the command line, it just gets “stuck” and does not do anything. It doesn’t produce any messages in the error.log either.

Below is what I have done.

mysql> flush tables with read lock;

^CCtrl-C – sending “KILL QUERY 173” to server …
Ctrl-C – query aborted.
^CCtrl-C – sending “KILL 173” to server …
Ctrl-C – query aborted.
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
mysql> show status like ‘wsrep%’;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect…

I have waited 5-10min to see if the command will eventually go through but it does not any I had to “ctrl + c” to cancel the command.

When I “ctrl + c”, you can see that I get “MySQL server has gone away”.

I am not sure what is causing this and how to fix this.

The server is Ubuntu 14.04 and using percona xtrabackup version 5.6.32-25.17-1.trusty.

Any help/feedback will be appreciated.

Hi,
It would be nice if you included the error log, which may provide additional information.
Also, what is usually worth trying in such case when a command hangs, is to login using second mysql session and checking the show processlist output to see what’s the status of your query.

This incident looks bit similar to https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1370532 but I wonder what commands were executed prior this hanged FTWRL.