【事件描述】
突然之间大量的连接进入数据库、并放开手干,这个使得mysql使用了大量的内存,触发了linux的oom机制。然后mysql就这样
被linux给干掉了。没错MySQL宕机了,要相信我说的话,因为这个事就是我干的,我用sysbench发起了大量连接去压测mysql。
新版本出来了不把它往死里压、我又怎么知道MySQL增强了多少? 但是这个不是重点、重点是MySQL-8.0.11的故障恢复真的是气死我了
【error log 日志】
2018-06-25T14:16:10.002553+08:00 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.11) starting as process 4030 2018-06-25T14:22:46.993105+08:00 0 [System] [MY-010229] [Server] Starting crash recovery... 2018-06-25T14:22:46.993259+08:00 0 [System] [MY-010232] [Server] Crash recovery finished. 2018-06-25T14:22:48.234620+08:00 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2018-06-25T14:22:48.250904+08:00 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.250975+08:00 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.251001+08:00 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.251023+08:00 0 [Warning] [MY-010315] [Server] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.251087+08:00 0 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.251108+08:00 0 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.251133+08:00 0 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.254446+08:00 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.254483+08:00 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. 2018-06-25T14:22:48.261166+08:00 0 [System] [MY-010931] [Server] /usr/local/mysql/bin/mysqld: ready for connections. Version: '8.0.11' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server - GPL.
注意看上面的日志 我启动MySQL时间点是 2018-06-25T14:16:10.002553+08:00 一直到 2018-06-25T14:22:46.993105+08:00
我才看到下一行日志中间我知道它在干什么、也不知道进度、作为一个dba我希望有个进度条呀!
不过有了进度条好像也只能等 ... ...
【希望有牛逼的大佬来分析一下pstack的信息】
Thread 21 (Thread 0x7f5a231f7700 (LWP 4031)): #0 0x00007f5a23e8f0ef in malloc () from /lib64/libc.so.6 #1 0x0000000001b4f9eb in ut_allocator<unsigned char>::allocate (this=0x7f5a231e5f88, n_elements=10, hint=<optimized out>, key=0, set_to_zero=false, throw_on_error=<optimized out>) at ../../../mysql-8.0.11/storage/innobase/include/ut0new.h:599 #2 0x0000000001d1a870 in mem_strdup (str=0x2074522 "LOG_DUMMY") at ../../../mysql-8.0.11/storage/innobase/include/mem0mem.ic:543 #3 dict_mem_table_create (name=name@entry=0x2074522 "LOG_DUMMY", space=space@entry=0, n_cols=n_cols@entry=2, n_v_cols=n_v_cols@entry=0, flags=flags@entry=1, flags2=flags2@entry=0) at ../../../mysql-8.0.11/storage/innobase/dict/mem.cc:188 #4 0x0000000001c03bb1 in mlog_parse_index (ptr=<optimized out>, ptr@entry=0x7f5a20e91adf "", end_ptr=end_ptr@entry=0x7f5a20e99cdb "