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

Assertion `(&(&thd->LOCK_thd_data)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&thd->LOCK_thd_data)->m_mutex)->thread)' failed.

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (a DATE);
      SET GLOBAL innodb_thread_concurrency=1;
      SELECT * FROM t;
      

      Leads to:

      10.4.19 73b9da5ca0252906ed69a3ebf81e048dbaee85b9 (Debug)

      mysqld: /test/10.4_dbg/sql/service_wsrep.cc:263: my_bool wsrep_thd_is_aborting(const THD*): Assertion `(&(&thd->LOCK_thd_data)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&thd->LOCK_thd_data)->m_mutex)->thread)' failed.
      

      10.4.19 73b9da5ca0252906ed69a3ebf81e048dbaee85b9 (Debug)

      Core was generated by `/test/GAL_MD050321-mariadb-10.4.19-linux-x86_64-dbg/bin/mysqld --defaults-file='.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x153ef00d7700 (LWP 3480852))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005584a39e340d in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:386
      #2  0x00005584a30f09b4 in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:344
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000153f26c8b859 in __GI_abort () at abort.c:79
      #6  0x0000153f26c8b729 in __assert_fail_base (fmt=0x153f26e21588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5584a3b17070 "(&(&thd->LOCK_thd_data)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&thd->LOCK_thd_data)->m_mutex)->thread)", file=0x5584a3b16de8 "/test/10.4_dbg/sql/service_wsrep.cc", line=263, function=<optimized out>) at assert.c:92
      #7  0x0000153f26c9cf36 in __GI___assert_fail (assertion=assertion@entry=0x5584a3b17070 "(&(&thd->LOCK_thd_data)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&thd->LOCK_thd_data)->m_mutex)->thread)", file=file@entry=0x5584a3b16de8 "/test/10.4_dbg/sql/service_wsrep.cc", line=line@entry=263, function=function@entry=0x5584a3b170f0 "my_bool wsrep_thd_is_aborting(const THD*)") at assert.c:101
      #8  0x00005584a3048abb in wsrep_thd_is_aborting (thd=0x153e98000d90) at /usr/include/pthread.h:1167
      #9  0x00005584a356bb0b in srv_conc_enter_innodb_with_atomics (trx=trx@entry=0x153f15937228) at /test/10.4_dbg/storage/innobase/srv/srv0conc.cc:202
      #10 0x00005584a356bcd3 in srv_conc_enter_innodb (prebuilt=prebuilt@entry=0x153e9802f4f0) at /test/10.4_dbg/storage/innobase/srv/srv0conc.cc:233
      #11 0x00005584a3362703 in innobase_srv_conc_enter_innodb (prebuilt=0x153e9802f4f0) at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:1714
      #12 ha_innobase::index_read (this=this@entry=0x153e9802dde8, buf=buf@entry=0x153e9802d990 "\377", key_ptr=key_ptr@entry=0x0, key_len=key_len@entry=0, find_flag=find_flag@entry=HA_READ_AFTER_KEY) at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:9251
      #13 0x00005584a3362a88 in ha_innobase::index_first (this=this@entry=0x153e9802dde8, buf=buf@entry=0x153e9802d990 "\377") at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:9627
      #14 0x00005584a3362b11 in ha_innobase::rnd_next (this=0x153e9802dde8, buf=0x153e9802d990 "\377") at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:9720
      #15 0x00005584a30f81b4 in handler::ha_rnd_next (this=0x153e9802dde8, buf=0x153e9802d990 "\377") at /test/10.4_dbg/sql/handler.cc:2866
      #16 0x00005584a32bca24 in rr_sequential (info=0x153e98015c90) at /test/10.4_dbg/sql/records.h:71
      #17 0x00005584a2e84719 in READ_RECORD::read_record (this=0x153e98015c90) at /test/10.4_dbg/sql/records.h:70
      #18 join_init_read_record (tab=0x153e98015bc8) at /test/10.4_dbg/sql/sql_select.cc:21348
      #19 0x00005584a2e6b898 in sub_select (join=0x153e98014898, join_tab=0x153e98015bc8, end_of_records=<optimized out>) at /test/10.4_dbg/sql/sql_select.cc:20403
      #20 0x00005584a2ea066b in do_select (procedure=0x0, join=0x153e98014898) at /test/10.4_dbg/sql/sql_select.cc:19944
      #21 JOIN::exec_inner (this=this@entry=0x153e98014898) at /test/10.4_dbg/sql/sql_select.cc:4487
      #22 0x00005584a2ea0ad7 in JOIN::exec (this=this@entry=0x153e98014898) at /test/10.4_dbg/sql/sql_select.cc:4269
      #23 0x00005584a2e9ed84 in mysql_select (thd=thd@entry=0x153e98000d90, tables=0x153e98013840, wild_num=1, fields=@0x153e980133c8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153e980137f8, last = 0x153e980137f8, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x153e98014870, unit=0x153e98004cc0, select_lex=0x153e98013280) at /test/10.4_dbg/sql/sql_select.cc:4704
      #24 0x00005584a2e9f0ae in handle_select (thd=thd@entry=0x153e98000d90, lex=lex@entry=0x153e98004c00, result=result@entry=0x153e98014870, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.4_dbg/sql/sql_select.cc:410
      #25 0x00005584a2e1023a in execute_sqlcom_select (thd=thd@entry=0x153e98000d90, all_tables=0x153e98013840) at /test/10.4_dbg/sql/sql_parse.cc:6418
      #26 0x00005584a2e1b356 in mysql_execute_command (thd=thd@entry=0x153e98000d90) at /test/10.4_dbg/sql/sql_parse.cc:3937
      #27 0x00005584a2e25cad in mysql_parse (thd=thd@entry=0x153e98000d90, rawbuf=rawbuf@entry=0x153e98013208 "SELECT * FROM t", length=length@entry=15, parser_state=parser_state@entry=0x153ef00d6490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7964
      #28 0x00005584a2e26d47 in wsrep_mysql_parse (thd=thd@entry=0x153e98000d90, rawbuf=0x153e98013208 "SELECT * FROM t", length=15, parser_state=parser_state@entry=0x153ef00d6490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7768
      #29 0x00005584a2e2857b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153e98000d90, packet=packet@entry=0x153e9801b641 "", packet_length=packet_length@entry=15, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1170
      #30 0x00005584a2e2bd16 in do_command (thd=0x153e98000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
      #31 0x00005584a2f6604f in do_handle_one_connection (connect=connect@entry=0x5584a7297430) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #32 0x00005584a2f6616e in handle_one_connection (arg=0x5584a7297430) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #33 0x0000153f27248609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #34 0x0000153f26d88293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.19 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg), 10.5.10 (dbg), 10.6.0 (dbg)

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.