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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    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

      Attachments

        1. LPexportBug544173_xa_multi_engine.test
          0.3 kB
          Rasmus Johansson
        2. LPexportBug544173_xa_multi_engine-master.opt
          0.0 kB
          Rasmus Johansson
        3. LPexportBug544173.xml
          8 kB
          Rasmus Johansson

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.