Commit c7e3807
committed
MDEV-9510 Segmentation fault in binlog thread causes crash
With combination of --log-bin and Galera the server may crash reporting two characteristic stacks: /usr/sbin/mysqld(_ZN13MYSQL_BIN_LOG13mark_xid_doneEmb+0xc7)[0x7f182a8e2cb7] /usr/sbin/mysqld(binlog_background_thread+0x2b5)[0x7f182a8e3275] or /usr/sbin/mysqld(_ZN13MYSQL_BIN_LOG21do_checkpoint_requestEm+0x9d)[0x7ff395b2dafd] /usr/sbin/mysqld(_ZN13MYSQL_BIN_LOG20checkpoint_and_purgeEm+0x11)[0x7ff395b2db91] /usr/sbin/mysqld(_ZN13MYSQL_BIN_LOG16rotate_and_purgeEb+0xc2)[0x7ff395b300b2] The reason of the failure appears to be non-matching decrements for `xid_count_per_binlog::xid_count` which can occur when a transaction is executed having its connection issued `SET @@sql_log_bin=0`. In such case the xid count is not incremented but its decrements still runs to turn `binlog_xid_count_list` into improper state which the following FLUSH BINARY LOGS exposes through the crash. *Note_1*: the regression test reuses an existing galera.sql_log_bin which does not run stably (even in its base form) by mtr with --log-bin. *Note_2*: 10.0-galera branch is free of this issue having missed MDEV-7205 fixes.1 parent aae4932 commit c7e3807
File tree
3 files changed
+33
-2
lines changed- mysql-test/suite/galera
- r
- t
- sql
3 files changed
+33
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
| |||
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
18 | 30 | | |
19 | 31 | | |
20 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7165 | 7165 | | |
7166 | 7166 | | |
7167 | 7167 | | |
7168 | | - | |
| 7168 | + | |
| 7169 | + | |
| 7170 | + | |
| 7171 | + | |
| 7172 | + | |
| 7173 | + | |
| 7174 | + | |
7169 | 7175 | | |
| 7176 | + | |
7170 | 7177 | | |
7171 | 7178 | | |
7172 | 7179 | | |
| |||
9489 | 9496 | | |
9490 | 9497 | | |
9491 | 9498 | | |
| 9499 | + | |
| 9500 | + | |
| 9501 | + | |
| 9502 | + | |
| 9503 | + | |
| 9504 | + | |
| 9505 | + | |
| 9506 | + | |
9492 | 9507 | | |
9493 | 9508 | | |
9494 | 9509 | | |
9495 | 9510 | | |
9496 | | - | |
| 9511 | + | |
9497 | 9512 | | |
9498 | 9513 | | |
9499 | 9514 | | |
| |||
9566 | 9581 | | |
9567 | 9582 | | |
9568 | 9583 | | |
| 9584 | + | |
| 9585 | + | |
| 9586 | + | |
9569 | 9587 | | |
9570 | 9588 | | |
9571 | 9589 | | |
| |||
0 commit comments