Bug #80694 Assertion `!xid->is_null() || !(thd->variables.option_bits & (1ULL<< 18))' faild
Submitted: 10 Mar 2016 16:32 Modified: 11 Mar 2016 8:44
Reporter: Ramesh Sivaraman (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.11 OS:CentOS
Assigned to: CPU Architecture:Any
Tags: debug

[10 Mar 2016 16:32] Ramesh Sivaraman
Description:
Error info:

mysqld: /sda/ps57/mysql-server_dbg/sql/binlog.cc:1606: int do_binlog_xa_commit_rollback(THD*, XID*, bool): Assertion `!xid->is_null() || !(thd->variables.option_bits & (1ULL << 18))' failed.
15:55:28 UTC - mysqld got signal 6 ;

GDB info

#0  0x00007f072adb6771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x000000000180fa8c in my_write_core (sig=6) at /sda/ps57/mysql-server_dbg/mysys/stacktrace.c:247
#2  0x0000000000e6af64 in handle_fatal_signal (sig=6) at /sda/ps57/mysql-server_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007f0728f425c9 in raise () from /lib64/libc.so.6
#5  0x00007f0728f43cd8 in abort () from /lib64/libc.so.6
#6  0x00007f0728f3b536 in __assert_fail_base () from /lib64/libc.so.6
#7  0x00007f0728f3b5e2 in __assert_fail () from /lib64/libc.so.6
#8  0x000000000178ef28 in do_binlog_xa_commit_rollback (thd=0x7f06d1019000, xid=0x7f06d1022200, commit=false) at /sda/ps57/mysql-server_dbg/sql/binlog.cc:1605
#9  0x000000000177681c in MYSQL_BIN_LOG::rollback (this=0x2b309c0 <mysql_bin_log>, thd=0x7f06d1019000, all=false) at /sda/ps57/mysql-server_dbg/sql/binlog.cc:2039
#10 0x00000000015e46fd in trans_rollback_stmt (thd=0x7f06d1019000) at /sda/ps57/mysql-server_dbg/sql/transaction.cc:513
#11 0x00000000014ec9e4 in mysql_execute_command (thd=0x7f06d1019000, first_level=true) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:4951
#12 0x00000000014ee081 in mysql_parse (thd=0x7f06d1019000, parser_state=0x7f072b36b560) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:5518
#13 0x00000000014e393b in dispatch_command (thd=0x7f06d1019000, com_data=0x7f072b36bcb0, command=COM_QUERY) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:1428
#14 0x00000000014e2805 in do_command (thd=0x7f06d1019000) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:996
#15 0x000000000160ecc7 in handle_connection (arg=0x7f06f5bff9c0) at /sda/ps57/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:301
#16 0x0000000001845888 in pfs_spawn_thread (arg=0x7f06f67f4220) at /sda/ps57/mysql-server_dbg/storage/perfschema/pfs.cc:2192
#17 0x00007f072adb1df3 in start_thread () from /lib64/libpthread.so.0
#18 0x00007f07290031ad in clone () from /lib64/libc.so.6

How to repeat:
Testcase

startup options : --server-id=100 --log-bin=binlog

DROP DATABASE test;CREATE DATABASE test;USE test;
XA START'';
drop temporary table if exists t1,t2,t3;
CREATE TEMPORARY TABLE `a`(`b` char)DEFAULT CHARSET=utf8 engine=InnoDB;
XA END'';
XA PREPARE'';
BINLOG ' O1ZVRw8BAAAAZgAAAGoAAAAAAAQANS4xLjIzLXJjLWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAA7VlVHEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC ';
xa rollback'';
[11 Mar 2016 8:19] MySQL Verification Team
Hello Ramesh,

Thank you for the report and test case.
Observed that 5.7.11 debug build is affected.

Thanks,
Umesh