Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2330

LP:544173 - Server crash for multi-engine transaction with binlog disabled

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            knielsen Kristian Nielsen added a comment -

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

            Show
            knielsen Kristian Nielsen added a comment - mysql-test-run.pl test case LPexportBug544173_xa_multi_engine.test
            Hide
            knielsen Kristian Nielsen added a comment -

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

            Show
            knielsen Kristian Nielsen added a comment - Re: Server crash for multi-engine transaction with binlog disabled
            Hide
            knielsen Kristian Nielsen added a comment -

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

            Show
            knielsen Kristian Nielsen added a comment - .opt file for test case to ensure binlog disabled LPexportBug544173_xa_multi_engine-master.opt
            Hide
            knielsen Kristian Nielsen added a comment -

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

            Show
            knielsen Kristian Nielsen added a comment - Re: Server crash for multi-engine transaction with binlog disabled
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 544173

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 544173

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                knielsen Kristian Nielsen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: