Description:
mysql client running at 100% load after ssh session times out:
#strace -p 5442
...
Process 5442 attached
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
read(0, "", 1) = 0
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7f9bb6fcb740 (LWP 5442) "mysql" 0x00007f9bb6baa6b0 in __read_nocancel () from /lib64/libpthread.so.0
(gdb) info stack
#0 0x00007f9bb6baa6b0 in __read_nocancel () from /lib64/libpthread.so.0
#1 0x00000000004bf0ea in read_char (el=0x194c960, cp=0x7ffd9a40aeec L"") at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/cmd-line-utils/libedit/read.c:315
#2 0x00000000004bea20 in el_wgetc (el=0x194c960, cp=0x7ffd9a40aeec L"") at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/cmd-line-utils/libedit/read.c:433
#3 0x00000000004bebf1 in read_getcmd (ch=0x7ffd9a40aeec L"", cmdnum=<optimized out>, el=0x194c960) at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/cmd-line-utils/libedit/read.c:246
#4 el_wgets (el=0x194c960, nread=0x7ffd9a40af6c) at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/cmd-line-utils/libedit/read.c:578
#5 0x00000000004b7711 in el_gets (el=0x194c960, nread=<optimized out>) at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/cmd-line-utils/libedit/eln.c:74
#6 0x00000000004b175d in readline (p=0x1988e50 "mysql> ") at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/cmd-line-utils/libedit/readline.c:441
#7 0x0000000000416715 in read_and_execute (interactive=true) at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/client/mysql.cc:2322
#8 0x00000000004189f8 in main (argc=7, argv=0x193e170) at /export/home/pb2/build/sb_0-27500212-1520171728.22/mysql-5.7.22/client/mysql.cc:1449
mysql/bin/mysql Ver 14.14 Distrib 5.7.22, for linux-glibc2.12 (x86_64) using EditLine wrapper
How to repeat:
encountered only once:
ssh to server, run
#mysql -u root -p ....
...
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
then do nothing, when ssh session times out, ssh to server again, check that mysql client is still running at 100% load.