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

Assertion `!trx_free || !trx->locked_connections' failed in spider_free_trx_conn on LOCK TABLES

    XMLWordPrintable

Details

    Description

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE USER Spider@localhost IDENTIFIED BY 'PWD123';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE 'test',user 'Spider',PASSWORD 'PWD123');
      CREATE TABLE t (c INT) ENGINE=InnoDB;
      CREATE TABLE t1 (c1 INT) ENGINE=Spider;
      CREATE TABLE t2 (f1 INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
      LOCK TABLES t2 WRITE;
      LOCK TABLES t1 READ,t2 READ;
      

      Leads to:

      10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Debug)

      mysqld: /test/10.11_dbg/storage/spider/spd_trx.cc:101: int spider_free_trx_conn(SPIDER_TRX*, bool): Assertion `!trx_free || !trx->locked_connections' failed.
      

      10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Debug)

      Core was generated by `/test/MD190822-mariadb-10.11.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1470500a0700 (LWP 184539))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000147069c23859 in __GI_abort () at abort.c:79
      #2  0x0000147069c23729 in __assert_fail_base (fmt=0x147069db9588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x1470275bec08 "!trx_free || !trx->locked_connections", file=0x1470275beba8 "/test/10.11_dbg/storage/spider/spd_trx.cc", line=101, function=<optimized out>) at assert.c:92
      #3  0x0000147069c34fd6 in __GI___assert_fail (assertion=assertion@entry=0x1470275bec08 "!trx_free || !trx->locked_connections", file=file@entry=0x1470275beba8 "/test/10.11_dbg/storage/spider/spd_trx.cc", line=line@entry=101, function=function@entry=0x1470275bebd8 "int spider_free_trx_conn(SPIDER_TRX*, bool)") at assert.c:101
      #4  0x00001470274e8d6c in spider_free_trx_conn (trx=trx@entry=0x146fd0061948, trx_free=trx_free@entry=true) at /test/10.11_dbg/storage/spider/spd_trx.cc:101
      #5  0x00001470274efc57 in spider_free_trx_alloc (trx=trx@entry=0x146fd0061948) at /test/10.11_dbg/storage/spider/spd_trx.cc:1138
      #6  0x00001470274efe6b in spider_free_trx (trx=trx@entry=0x146fd0061948, need_lock=need_lock@entry=true, reset_ha_data=reset_ha_data@entry=false) at /test/10.11_dbg/storage/spider/spd_trx.cc:1455
      #7  0x000014702751c2ff in spider_close_connection (hton=<optimized out>, thd=0x146fd0000db8) at /test/10.11_dbg/storage/spider/spd_table.cc:6313
      #8  0x00005654cdcf410e in ha_close_connection (thd=thd@entry=0x146fd0000db8) at /test/10.11_dbg/sql/handler.cc:906
      #9  0x00005654cd99e0a5 in THD::free_connection (this=this@entry=0x146fd0000db8) at /test/10.11_dbg/sql/sql_class.cc:1598
      #10 0x00005654cd8d31bc in unlink_thd (thd=0x146fd0000db8) at /test/10.11_dbg/sql/mysqld.cc:2765
      #11 0x00005654cdb6c3b4 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5654d18394d8, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1429
      #12 0x00005654cdb6c6e3 in handle_one_connection (arg=0x5654d18394d8) at /test/10.11_dbg/sql/sql_connect.cc:1312
      #13 0x000014706a134609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #14 0x0000147069d20133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.18 (dbg), 10.6.10 (dbg), 10.7.6 (dbg), 10.8.5 (dbg), 10.9.2 (dbg), 10.10.2 (dbg), 10.11.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.27 (dbg), 10.4.27 (opt), 10.5.18 (opt), 10.6.10 (opt), 10.7.6 (opt), 10.8.5 (opt), 10.9.2 (opt), 10.10.2 (opt), 10.11.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt), 8.0.29 (dbg), 8.0.29 (opt)

      Attachments

        Issue Links

          Activity

            People

              nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.