[MDEV-2330] LP:544173 - Server crash for multi-engine transaction with binlog disabled Created: 2010-03-22  Updated: 2012-10-04  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Kristian Nielsen Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug544173.xml     File LPexportBug544173_xa_multi_engine-master.opt     File LPexportBug544173_xa_multi_engine.test    

 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



 Comments   
Comment by Kristian Nielsen [ 2010-03-22 ]

Re: Server crash for multi-engine transaction with binlog disabled

Comment by Kristian Nielsen [ 2010-03-22 ]

mysql-test-run.pl test case
LPexportBug544173_xa_multi_engine.test

Comment by Kristian Nielsen [ 2010-03-22 ]

Re: Server crash for multi-engine transaction with binlog disabled

Comment by Kristian Nielsen [ 2010-03-22 ]

.opt file for test case to ensure binlog disabled
LPexportBug544173_xa_multi_engine-master.opt

Comment by Rasmus Johansson (Inactive) [ 2010-05-27 ]

Launchpad bug id: 544173

Generated at Thu Feb 08 06:41:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.