[MDEV-27536] Seemingly invalid 'BINLOG_BASE64_EVENT: Rolling back unfinished transaction ... Internal MariaDB error code: 0' Error | Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status Created: 2022-01-18  Updated: 2023-05-01  Resolved: 2022-01-27

Status: Closed
Project: MariaDB Server
Component/s: Binary Protocol
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2, 10.8.1

Type: Bug Priority: Critical
Reporter: Roel Van de Paar Assignee: Andrei Elkin
Resolution: Fixed Votes: 0
Labels: affects-tests, alter-replication


 Description   

As discussed with Elkin. This (seemingly invalid) error is often seen during test runs:

10.8.0 347f6d01e3b570dce49aa1ab42cb83021905a14d (Optimized)

2022-01-18 23:23:40 4 [Note]  BINLOG_BASE64_EVENT: Rolling back unfinished transaction (no COMMIT or ROLLBACK in relay log). A probable cause is that the master died while writing the transaction to its binary log, thus rolled back too. Internal MariaDB error code: 0     

However, no replication is active, it is a single server, a single SQL thread, and only a simple testcase is needed to produce either this message and/or a crash on debug:

CREATE TABLE t (c CHAR(1));
XA START 'a';
SELECT dt DIV 1 AS f,id FROM t GROUP BY f;
BINLOG ' O1ZVRw8BAAAAZgAAAGoAAAAAAAQANS4xLjIzLXJjLWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAA7VlVHEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC ';

CREATE TABLE t (c INT KEY,c2 CHAR(1),c3 DATE);
XA START 'b';
SELECT INTc,INTc2,CHARc,CHARc2,CHARc3 FROM t WHERE id=0;
BINLOG ' SOgWTg8CAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=';

Optimized may see the message only, and debug the message and crash. The crash is after the message:

10.8.0 347f6d01e3b570dce49aa1ab42cb83021905a14d (Debug)

2022-01-18 23:23:36 4 [Note]  BINLOG_BASE64_EVENT: Rolling back unfinished transaction (no COMMIT or ROLLBACK in relay log). A probable cause is that the master died while writing the transaction to its binary log, thus rolled back too. Internal MariaDB error code: 0
mysqld: /test/10.8_dbg/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.

As discussed, it would be great to see this one resolved asap as the message shows up all over the test results, and clogs runs up. I have marked it critical as such for the moment. Thank you!



 Comments   
Comment by Roel Van de Paar [ 2022-01-18 ]

With thanks to marko for the added assistance!

Comment by Roel Van de Paar [ 2022-01-18 ]

As for the crash specifically, that is MDEV-22712.

Comment by Andrei Elkin [ 2022-01-18 ]

Sujatha, I hope you will like this one to review !

Comment by Andrei Elkin [ 2022-01-25 ]

bnestere: Just pushed 42ae7659608..8b70b5bb625 HEAD -> bb-10.2-andrei .

Comment by Brandon Nesterenko [ 2022-01-25 ]

Got it. The patch looks good. Feel free to push.

Comment by Andrei Elkin [ 2022-01-27 ]

See bb-10.8-MDEV-27536-andrei branch for how to merge with log_event.cc -> log_event_server.cc hunk migration.

Comment by Roel Van de Paar [ 2022-01-28 ]

Thank you very much team. Appreciated.

Generated at Thu Feb 08 09:53:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.