Server crash for multi-engine transaction with binlog disabled

Bug #544173 reported by Kristian Nielsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Medium
Sergei Golubchik
5.1
Fix Released
Undecided
Unassigned

Bug Description

If using both PBXT and XtraDB in the same transaction, and log_bin is
disabled, the server crashes:

CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=pbxt;
BEGIN;
SELECT @@log_bin;
@@log_bin
0
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
COMMIT;

2013: Lost connection to MySQL server during query

Note, the crash only happens when log_bin is disabled.

Here is a gdb backtrace from the crash. The problem is that
TC_LOG_MMAP::active->ptr accessed by TC_LOG_MMAP::log_xid() is NULL:

(gdb) bt
#0 0x000000000074bde3 in TC_LOG_MMAP::log_xid (this=0x11d8c60,
    thd=0x7ffec81ab720, xid=14) at log.cc:5551
#1 0x00000000007c9f45 in ha_commit_trans (thd=0x7ffec81ab720, all=true)
    at handler.cc:1179
#2 0x0000000000689311 in end_trans (thd=0x7ffec81ab720, completion=COMMIT)
    at sql_parse.cc:743
#3 0x000000000068ff71 in mysql_execute_command (thd=0x7ffec81ab720)
    at sql_parse.cc:4135
#4 0x0000000000692f80 in mysql_parse (thd=0x7ffec81ab720,
    inBuf=0x333f048 "COMMIT", length=6, found_semicolon=0x40e8dc28)
    at sql_parse.cc:6034
#5 0x0000000000693d92 in dispatch_command (command=COM_QUERY,
    thd=0x7ffec81ab720, packet=0x7ffec828a991 "COMMIT", packet_length=6)
    at sql_parse.cc:1247
#6 0x0000000000695290 in do_command (thd=0x7ffec81ab720) at sql_parse.cc:886
#7 0x000000000068066d in handle_one_connection (arg=0x7ffec81ab720)
    at sql_connect.cc:1132
#8 0x00007ffecfaed3f7 in start_thread () from /lib/libpthread.so.0
#9 0x00007ffeceb69b4d in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()
(gdb) frame 0
#0 0x000000000074bde3 in TC_LOG_MMAP::log_xid (this=0x11d8c60,
    thd=0x7ffec81ab720, xid=14) at log.cc:5551
5551 while (*p->ptr)
(gdb) p p->ptr
$4 = (my_xid *) 0x0

Related branches

Revision history for this message
Kristian Nielsen (knielsen) wrote :
Revision history for this message
Kristian Nielsen (knielsen) wrote :
Changed in maria:
assignee: nobody → Sergei (sergii)
Changed in maria:
status: New → Fix Committed
importance: Undecided → High
importance: High → Medium
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.