Bug Description

Simply attaching gdb (then detaching immediately) to a running Percona mysqld instance causes Percona-server to disconnect clients. Same happens if you attach gdb then continue. Clients get "Lost connection to MySQL server during query" but reconnecting works fine and the server seem to be healthy after that. Using telnet to test shows the socket close when gdb attaches. This bug makes using "pstack", "poor man's profilier" or even Aspersa's "connect" tool impossible without disconnecting clients.

DBUG_PRINT("info",("vio_read returned %ld errno: %d", (long) length, vio_errno(net->vio)));
-#if !defined(NO_ALARM) && (!defined(__WIN__) || defined(MYSQL_SERVER))
+#if !defined(__WIN__) || defined(MYSQL_SERVER)
/*
We got an error that there was no data on the socket. We now set up
an alarm to not 'read forever', change the socket to non blocking

This bug concerns with the server not being able to handle SIGSTOP/SIGCONT. The issue of terminal resize is client not handling SIGWINCH correctly and that is bug 925343, fixed in the upcoming release.