Bug #91008 mysql stop for multi-threaded slave gives error code 1756
| Submitted: | 24 May 2018 11:03 | Modified: | 17 Dec 2024 16:33 |
|---|---|---|---|
| Reporter: | Prasad N | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
| Version: | 5.7.21 | OS: | CentOS (CentOS (2.6.32-696.23.1.el6.x86_64 )) |
| Assigned to: | Assigned Account | CPU Architecture: | x86 |
| Tags: | MTS, slave | ||
[24 May 2018 11:03]
Prasad N
[19 Jul 2018 8:24]
MySQL Verification Team
Hi, I don't believe this is a bug. It would be a bug if a start would not solve the issue but since the system will autocorrect when you start it... it's a design choice. If you want consistent data in the slave you should stop replication before you do shutdown. all best Bogdan
[31 Mar 2020 14:48]
Gauravkumar Mishra
I am facing exact same problem, when I am replicating from , Mysql 5.7.23 to mysql 8.0.17. my gtid is stuck, my relay logs keeps on rotating. Slave_IO_State: waiting for handler commit
[19 Feb 2024 16:17]
Online Ops
Just a little color to this. We experienced this error today. Root cause was a mystery to me. I stopped replication and restarted, the server self-healed. Turned out someone on our BI team manually killed a coordinator thread (replication thread) - which probably is what corrupted replication.
[16 Oct 2024 14:17]
Marek Kretkiewicz
Hi.
We have exactly the same issue today.
2024-10-16T10:24:23.319479Z 64 [Warning] [MY-010584] [Repl] Replica SQL for channel '': Worker 1 failed executing transaction 'ANONYMOUS' at source log binlog.000361, end_l
og_pos 401108027; Error in cleaning up after an event preceding the commit; the group log file/position: binlog.000361 401107180, Error_code: MY-000001
2024-10-16T10:24:23.319598Z 64 [ERROR] [MY-010584] [Repl] Replica SQL for channel '': Worker 1 failed executing transaction 'ANONYMOUS' at source log binlog.000361, end_log
_pos 401108027; Error 'Got error 125 - 'Transaction has been rolled back' during COMMIT' on query. Default database: ''. Query: 'COMMIT', Error_code: MY-001180
2024-10-16T10:24:23.319660Z 63 [Warning] [MY-010584] [Repl] Replica SQL for channel '': ... The replica coordinator and worker threads are stopped, possibly leaving data in
inconsistent state. A restart should restore consistency automatically, although using non-transactional storage for data or info tables or DDL queries could lead to probl
ems. In such cases you have to examine your data (see documentation for details). Error_code: MY-001756
we do have ndbd 8.0.34.
Suddenly it stopped with this error.
Slave_IO_State: Waiting for source to send event
Master_Host: master_host
Master_User: repliaction_user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: binlog.000361
Read_Master_Log_Pos: 591918710
Relay_Log_File: relay_file
Relay_Log_Pos: 39318280
Relay_Master_Log_File: binlog.000361
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1180
Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction 'ANONYMOUS' at source log binlog.000361, end_log_pos 401108027. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
Skip_Counter: 0
Exec_Master_Log_Pos: 401107180
Relay_Log_Space: 57718384
and the only action was to execute "start slave;". No skip, nothing, it has reach last position of master binlog.
BUT.
It looks that mysqld has skipped problematic transaction.
I can see in binlog, that value was:
# at 401108471
#241016 12:24:23 server id 41 end_log_pos 401108536 CRC32 0x7dc8061e Write_rows: table id 272
# at 401108536
#241016 12:24:23 server id 31 end_log_pos 401108609 CRC32 0xe20d63df Write_rows: table id 1008
# at 401108609
#241016 12:24:23 server id 41 end_log_pos 401108743 CRC32 0xa759b900 Write_rows: table id 477
# at 401108743
#241016 12:24:23 server id 41 end_log_pos 401108818 CRC32 0xc1e1b813 Write_rows: table id 479 flags: STMT_END_F
### INSERT INTO `mysql`.`ndb_apply_status`
### SET
### @1=41
### @2=77507911831519245
### @3=''
### @4=0
### @5=0
### INSERT INTO `database1`.`table_1`
### SET
### @1='key_1'
### @2=38
### INSERT INTO `database2`.`table_2`
### SET
### @1='val_1'
### @2='val_2'
### @3=''
### @4=1
### @5=1729074263
### @6=1
### @7=1
### @8='longer value'
### INSERT INTO `database2`.`table_2`
I've checked on master
### INSERT INTO `database1`.`table_1`
### SET
### @1='key_1'
### @2=38
val 38 was set for key_1, however when slave was synch to master had value 36 for key_1.
It looks that mysqld has skipped this transaction on slave side.
[15 Nov 2024 19:38]
MySQL Verification Team
Bug #116682 is marked as duplicate of this one
[15 Nov 2024 19:39]
MySQL Verification Team
Hi, > It looks that mysqld has skipped this transaction on slave side. What version are you reproducing this with? I just tried 8.0.40 and I cannot reproduce this. Can you please try to reproduce this with current version of MySQL Thanks
[10 Dec 2024 14:16]
Marek Kretkiewicz
we do have ndbd 8.0.34.
[11 Dec 2024 7:57]
MySQL Verification Team
Hi Marek, I understand, but that is a release more than a year old with 6 releases with bugfixes released after it. Even if I can reproduce the problem with that release the only solution is to upgrade.
[18 Dec 2024 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".
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.067 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.