Bug #98285 that is something wrong mysql.gtid_executed
Submitted: 19 Jan 2020 9:54 Modified: 28 Feb 2020 15:49
Reporter: Ben Huang Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server Severity:S1 (Critical)
Version:8.0.18 OS:CentOS (CentOS Linux release 7.7.1908 (Core))
Assigned to: MySQL Verification Team CPU Architecture:x86

[19 Jan 2020 9:54] Ben Huang

Last month,our mysql upgraded from 5.7 to 8.0.18, however, the mysql 8.0.18 output the following logs in mysql error-log and mysql Hang, when dba restarted mysql 8.0.18.

2020-01-15T10:40:06.744153+08:00 0 [ERROR] [MY-011975] [InnoDB] Wait for GTID thread to start timed out
2020-01-15T10:40:06.744839+08:00 0 [Note] [MY-012922] [InnoDB] Waiting for purge to start
2020-01-15T15:10:56.545888+08:00 0 [Note] [MY-011953] [InnoDB] Page cleaner took 5423ms to flush 0 and evict 0 pages
2020-01-15T16:37:37.248257+08:00 0 [Note] [MY-011953] [InnoDB] Page cleaner took 5342ms to flush 0 and evict 0 pages

at the same time,
the gtid_executed table.
SELECT COUNT(1) FROM mysql.gtid_executed;
mysql> select count(1) from mysql.gtid_executed;
| count(1) |
|  4363345 |

when we use pstack command:

[root@al-hz-pro-dw01-mysql logs5.7]# pstack 25300

Thread 1 (Thread 0x7f883d5af840 (LWP 25300)):
#0  Gtid_set::add_gno_interval (this=this@entry=0x3dcf708, ivitp=ivitp@entry=0x7ffcd7656958, start=start@entry=1237294337, end=1237294338, lock=lock@entry=0x7ffcd7656960) at ../../mysql-8.0.18/sql/rpl_gtid_set.cc:333
#1  0x0000000001b64526 in Gtid_set::add_gtid_text(char const*, bool*, bool*) () at ../../mysql-8.0.18/sql/rpl_gtid_set.cc:546
#2  0x0000000001b62a18 in Gtid_table_persistor::fetch_gtids(Gtid_set*) () at /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/basic_string.h:5128
#3  0x0000000000d9de3f in mysqld_main(int, char**) () at ../../mysql-8.0.18/sql/mysqld.cc:6565
#4  0x00007f883b23d505 in __libc_start_main () from /lib64/libc.so.6
#5  0x0000000000d81bb5 in _start () at ../../mysql-8.0.18/include/my_sys.h:872

How to repeat:
we added the following configuration in my.cnf.


the gtid is not serial number.
[19 Jan 2020 9:58] Ben Huang
pstack command output.

Attachment: pstack.log (application/octet-stream, text), 80.60 KiB.

[28 Jan 2020 15:49] MySQL Verification Team

I am sorry but this is not enough data for us to try to reproduce this behavior. Can you add more details, your configuration, setup, what you actually do, what is the status of each node ... so that we can try to reproduce the problem.

[29 Feb 2020 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".