Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 5.5.32-galera
-
Fix Version/s: 5.5.33a-galera
-
Component/s: None
-
Labels:None
Description
Server can crash when binlog_annotate_row_events option is set.
Stack trace as follows:
#0 0x00007f497a9ae69c in pthread_kill () from /lib64/libpthread.so.0
#1 0x000000000070750b in handle_fatal_signal (sig=11) at /home/buildbot/buildbot/build/sql/signal_handler.cc:262
#2 <signal handler called>
#3 0x0000000000599a0a in wsrep_apply_rbr (thd=0x7f3ce40009a0, rbr_buf=<value optimized out>, buf_len=2823) at /home/buildbot/buildbot/build/sql/sql_parse.cc:8201
#4 0x0000000000599eab in wsrep_apply_cb (ctx=0x7f3ce40009a0, buf=0x7f3cf4242f0c, buf_len=2893, global_seqno=<value optimized out>) at /home/buildbot/buildbot/build/sql/sql_parse.cc:8252
#5 0x00007f4978744bcd in apply_wscoll (recv_ctx=0x7f3ce40009a0, apply_cb=0x599e30 <wsrep_apply_cb(void*, void const*, size_t, wsrep_seqno_t)>, commit_cb=0x5a5ac0 <wsrep_commit_cb(void*, wsrep_seqno_t, bool)>, trx=...)
at galera/src/replicator_smm.cpp:40
#6 apply_trx_ws (recv_ctx=0x7f3ce40009a0, apply_cb=0x599e30 <wsrep_apply_cb(void*, void const*, size_t, wsrep_seqno_t)>, commit_cb=0x5a5ac0 <wsrep_commit_cb(void*, wsrep_seqno_t, bool)>, trx=...) at galera/src/replicator_smm.cpp:81
#7 0x00007f4978746053 in galera::ReplicatorSMM::apply_trx (this=0x2181e70, recv_ctx=0x7f3ce40009a0, trx=0x7f3ce4127ba0) at galera/src/replicator_smm.cpp:475
#8 0x00007f4978746945 in galera::ReplicatorSMM::process_trx (this=0x2181e70, recv_ctx=0x7f3ce40009a0, trx=0x7f3ce4127ba0) at galera/src/replicator_smm.cpp:1061
#9 0x00007f497872006c in galera::GcsActionSource::dispatch (this=0x21823f8, recv_ctx=0x7f3ce40009a0, act=<value optimized out>) at galera/src/gcs_action_source.cpp:110
#10 0x00007f4978720528 in galera::GcsActionSource::process (this=0x21823f8, recv_ctx=0x7f3ce40009a0) at galera/src/gcs_action_source.cpp:168
#11 0x00007f49787400ed in galera::ReplicatorSMM::async_recv (this=0x2181e70, recv_ctx=0x7f3ce40009a0) at galera/src/replicator_smm.cpp:372
#12 0x00007f4978754ee3 in galera_recv (gh=<value optimized out>, recv_ctx=<value optimized out>) at galera/src/wsrep_provider.cpp:202
#13 0x000000000059945c in wsrep_replication_process (thd=0x7f3ce40009a0) at /home/buildbot/buildbot/build/sql/sql_parse.cc:8414
The probable cause for the issue is generic non safe type cast in wsrep_apply_rbr, but the problem surfaces only in MariaDB version. However, the fix has to go in MySQL version as well.
Problem is tracked in MySQL version in bug tracker: https://bugs.launchpad.net/codership-mysql/+bug/1232890
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Here is a potential way to reproduce this issue. Use annotation and a table with no primary key:
MariaDB(Galera) localhost [skysql]> create table tbl2 (a serial, b char(32));
Query OK, 0 rows affected (0.01 sec)
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) ;
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) ;
Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) ;
Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) ;
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) FROM tbl2 ;
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) FROM tbl2 ;
Query OK, 8 rows affected (0.00 sec)
Records: 8 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) FROM tbl2 ;
Query OK, 16 rows affected (0.01 sec)
Records: 16 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) FROM tbl2 ;
Query OK, 32 rows affected (0.00 sec)
Records: 32 Duplicates: 0 Warnings: 0
MariaDB(Galera) localhost [skysql]> insert into tbl2 (b) SELECT MD5(RAND()) FROM tbl2 ;