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

Assertion `thd->killed != 0' failed in ha_maria::enable_indexes

Details

    Description

      USE test;
      SET SESSION aria_sort_buffer_size=1023;
      CREATE TABLE t (c CHAR);
      INSERT INTO t VALUES (''),('');
      CREATE TABLE t2 (c TEXT,INDEX(c)) ENGINE=Aria;
      INSERT INTO t2 SELECT * FROM t;
      

      Leads to:

      10.5.3 64488a6f2dd6aa43462292b757e783cfba11a8c6

      mysqld: /test/10.5_dbg/storage/maria/ha_maria.cc:2020: virtual int ha_maria::enable_indexes(uint): Assertion `thd->killed != 0' failed.
      

      10.5.3 64488a6f2dd6aa43462292b757e783cfba11a8c6

      Core was generated by `/test/MD050520-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x14e72255c700 (LWP 101849))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055b35bf3ce9a in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055b35b6e1289 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000014e720ca0801 in __GI_abort () at abort.c:79
      #6  0x000014e720c9039a in __assert_fail_base (fmt=0x14e720e177d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55b35c2b1d5d "thd->killed != 0", file=file@entry=0x55b35c2b20f8 "/test/10.5_dbg/storage/maria/ha_maria.cc", line=line@entry=2020, function=function@entry=0x55b35c2b41e0 <ha_maria::enable_indexes(unsigned int)::__PRETTY_FUNCTION__> "virtual int ha_maria::enable_indexes(uint)") at assert.c:92
      #7  0x000014e720c90412 in __GI___assert_fail (assertion=assertion@entry=0x55b35c2b1d5d "thd->killed != 0", file=file@entry=0x55b35c2b20f8 "/test/10.5_dbg/storage/maria/ha_maria.cc", line=line@entry=2020, function=function@entry=0x55b35c2b41e0 <ha_maria::enable_indexes(unsigned int)::__PRETTY_FUNCTION__> "virtual int ha_maria::enable_indexes(uint)") at assert.c:101
      #8  0x000055b35b9343d3 in ha_maria::enable_indexes (this=0x14e6ff5596a0, mode=<optimized out>) at /test/10.5_dbg/storage/maria/ha_maria.cc:2020
      #9  0x000055b35b92d05f in ha_maria::end_bulk_insert (this=0x14e6ff5596a0) at /test/10.5_dbg/storage/maria/ha_maria.cc:2248
      #10 0x000055b35b3fc8e9 in handler::ha_end_bulk_insert (this=0x14e6ff5596a0) at /test/10.5_dbg/sql/handler.h:3421
      #11 select_insert::prepare_eof (this=this@entry=0x14e6ff475e60) at /test/10.5_dbg/sql/sql_insert.cc:4117
      #12 0x000055b35b3fcf86 in select_insert::send_eof (this=0x14e6ff475e60) at /test/10.5_dbg/sql/sql_insert.cc:4227
      #13 0x000055b35b4b5925 in do_select (procedure=<optimized out>, join=0x14e6ff475f18) at /test/10.5_dbg/sql/sql_select.cc:20195
      #14 JOIN::exec_inner (this=this@entry=0x14e6ff475f18) at /test/10.5_dbg/sql/sql_select.cc:4464
      #15 0x000055b35b4b5b57 in JOIN::exec (this=this@entry=0x14e6ff475f18) at /test/10.5_dbg/sql/sql_select.cc:4245
      #16 0x000055b35b4b3e6c in mysql_select (thd=thd@entry=0x14e6ff415088, tables=<optimized out>, fields=..., conds=0x0, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2202244745984, result=0x14e6ff475e60, unit=0x14e6ff419098, select_lex=0x14e6ff474860) at /test/10.5_dbg/sql/sql_select.cc:4669
      #17 0x000055b35b4b419b in handle_select (thd=thd@entry=0x14e6ff415088, lex=lex@entry=0x14e6ff418fd0, result=result@entry=0x14e6ff475e60, setup_tables_done_option=setup_tables_done_option@entry=1073741824) at /test/10.5_dbg/sql/sql_select.cc:417
      #18 0x000055b35b439d24 in mysql_execute_command (thd=thd@entry=0x14e6ff415088) at /test/10.5_dbg/sql/sql_parse.cc:4661
      #19 0x000055b35b444b3a in mysql_parse (thd=thd@entry=0x14e6ff415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14e72255b450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
      #20 0x000055b35b43130f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e6ff415088, packet=packet@entry=0x14e6ff467089 "INSERT INTO t2 SELECT * FROM t", packet_length=packet_length@entry=30, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
      #21 0x000055b35b42fbde in do_command (thd=0x14e6ff415088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #22 0x000055b35b589d0d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14e7010433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
      #23 0x000055b35b58a03c in handle_one_connection (arg=arg@entry=0x14e7010433a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #24 0x000055b35b9e9f1a in pfs_spawn_thread (arg=0x14e720045888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #25 0x000014e7219836db in start_thread (arg=0x14e72255c700) at pthread_create.c:463
      #26 0x000014e720d8188f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.2 (dbg), 10.5.3 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Similar to MDEV-17223 but the stack is slightly different, and this testcase is 10.5 only.

      10.4 does not fail:

      10.4.15 de76bebc5798313e3798a35e02468e42254dd608 (Debug)

      10.4.15>SET SESSION aria_sort_buffer_size=1023;
      Query OK, 0 rows affected, 1 warning (0.000 sec)
       
      10.4.15>CREATE TABLE t (c CHAR);
      Query OK, 0 rows affected (0.015 sec)
       
      10.4.15>INSERT INTO t VALUES (''),('');
      Query OK, 2 rows affected (0.007 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      10.4.15>CREATE TABLE t2 (c TEXT,INDEX(c)) ENGINE=Aria;
      Query OK, 0 rows affected, 1 warning (0.008 sec)
       
      10.4.15>INSERT INTO t2 SELECT * FROM t;
      Query OK, 2 rows affected (0.010 sec)
      Records: 2  Duplicates: 0  Warnings: 0
      

      Attachments

        Issue Links

          Activity

            Another testcase to test with a slightly different stack and interesting looking output in CLI

            10.5.3>LOAD DATA INFILE 'o' INTO TABLE t2;
            exite: 2 of 2 'End bulk insert'      0% of stage done
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            

            USE test;
            SET SESSION aria_sort_buffer_size=1023;
            CREATE TABLE t (c CHAR);
            INSERT INTO t VALUES (''),('');
            SELECT * FROM t INTO OUTFILE 'o';
            CREATE TABLE t2 (c TEXT,INDEX(c)) ENGINE=Aria;
            LOAD DATA INFILE 'o' INTO TABLE t2;
            

            Leads to:

            10.5.3 64488a6f2dd6aa43462292b757e783cfba11a8c6

            mysqld: /test/10.5_dbg/storage/maria/ha_maria.cc:2020: virtual int ha_maria::enable_indexes(uint): Assertion `thd->killed != 0' failed.
            

            10.5.3 64488a6f2dd6aa43462292b757e783cfba11a8c6

            Core was generated by `/test/MD050520-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x14d033526700 (LWP 116685))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1  0x00005600b26dfe9a in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2  0x00005600b1e84289 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5  0x000014d031c6a801 in __GI_abort () at abort.c:79
            #6  0x000014d031c5a39a in __assert_fail_base (fmt=0x14d031de17d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5600b2a54d5d "thd->killed != 0", file=file@entry=0x5600b2a550f8 "/test/10.5_dbg/storage/maria/ha_maria.cc", line=line@entry=2020, function=function@entry=0x5600b2a571e0 <ha_maria::enable_indexes(unsigned int)::__PRETTY_FUNCTION__> "virtual int ha_maria::enable_indexes(uint)") at assert.c:92
            #7  0x000014d031c5a412 in __GI___assert_fail (assertion=assertion@entry=0x5600b2a54d5d "thd->killed != 0", file=file@entry=0x5600b2a550f8 "/test/10.5_dbg/storage/maria/ha_maria.cc", line=line@entry=2020, function=function@entry=0x5600b2a571e0 <ha_maria::enable_indexes(unsigned int)::__PRETTY_FUNCTION__> "virtual int ha_maria::enable_indexes(uint)") at assert.c:101
            #8  0x00005600b20d73d3 in ha_maria::enable_indexes (this=0x14d0105596a0, mode=<optimized out>) at /test/10.5_dbg/storage/maria/ha_maria.cc:2020
            #9  0x00005600b20d005f in ha_maria::end_bulk_insert (this=0x14d0105596a0) at /test/10.5_dbg/storage/maria/ha_maria.cc:2248
            #10 0x00005600b1bcf813 in handler::ha_end_bulk_insert (this=0x14d0105596a0) at /test/10.5_dbg/sql/handler.h:3421
            #11 mysql_load (thd=thd@entry=0x14d010415088, ex=0x14d010474168, table_list=table_list@entry=0x14d0104741f0, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_ERROR, ignore=false, read_file_from_client=false) at /test/10.5_dbg/sql/sql_load.cc:688
            #12 0x00005600b1bddab1 in mysql_execute_command (thd=thd@entry=0x14d010415088) at /test/10.5_dbg/sql/sql_parse.cc:4963
            #13 0x00005600b1be7b3a in mysql_parse (thd=thd@entry=0x14d010415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d033525450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
            #14 0x00005600b1bd430f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d010415088, packet=packet@entry=0x14d010467089 "", packet_length=packet_length@entry=34, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
            #15 0x00005600b1bd2bde in do_command (thd=0x14d010415088) at /test/10.5_dbg/sql/sql_parse.cc:1358
            #16 0x00005600b1d2cd0d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14d0120433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
            #17 0x00005600b1d2d03c in handle_one_connection (arg=arg@entry=0x14d0120433a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
            #18 0x00005600b218cf1a in pfs_spawn_thread (arg=0x14d031045888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #19 0x000014d03294d6db in start_thread (arg=0x14d033526700) at pthread_create.c:463
            #20 0x000014d031d4b88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.5.2 (dbg), 10.5.3 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

            Roel Roel Van de Paar added a comment - Another testcase to test with a slightly different stack and interesting looking output in CLI 10.5.3>LOAD DATA INFILE 'o' INTO TABLE t2; exite: 2 of 2 'End bulk insert' 0% of stage done ERROR 2013 (HY000): Lost connection to MySQL server during query USE test; SET SESSION aria_sort_buffer_size=1023; CREATE TABLE t (c CHAR); INSERT INTO t VALUES (''),(''); SELECT * FROM t INTO OUTFILE 'o'; CREATE TABLE t2 (c TEXT,INDEX(c)) ENGINE=Aria; LOAD DATA INFILE 'o' INTO TABLE t2; Leads to: 10.5.3 64488a6f2dd6aa43462292b757e783cfba11a8c6 mysqld: /test/10.5_dbg/storage/maria/ha_maria.cc:2020: virtual int ha_maria::enable_indexes(uint): Assertion `thd->killed != 0' failed. 10.5.3 64488a6f2dd6aa43462292b757e783cfba11a8c6 Core was generated by `/test/MD050520-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 [Current thread is 1 (Thread 0x14d033526700 (LWP 116685))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x00005600b26dfe9a in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518 #2 0x00005600b1e84289 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x000014d031c6a801 in __GI_abort () at abort.c:79 #6 0x000014d031c5a39a in __assert_fail_base (fmt=0x14d031de17d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5600b2a54d5d "thd->killed != 0", file=file@entry=0x5600b2a550f8 "/test/10.5_dbg/storage/maria/ha_maria.cc", line=line@entry=2020, function=function@entry=0x5600b2a571e0 <ha_maria::enable_indexes(unsigned int)::__PRETTY_FUNCTION__> "virtual int ha_maria::enable_indexes(uint)") at assert.c:92 #7 0x000014d031c5a412 in __GI___assert_fail (assertion=assertion@entry=0x5600b2a54d5d "thd->killed != 0", file=file@entry=0x5600b2a550f8 "/test/10.5_dbg/storage/maria/ha_maria.cc", line=line@entry=2020, function=function@entry=0x5600b2a571e0 <ha_maria::enable_indexes(unsigned int)::__PRETTY_FUNCTION__> "virtual int ha_maria::enable_indexes(uint)") at assert.c:101 #8 0x00005600b20d73d3 in ha_maria::enable_indexes (this=0x14d0105596a0, mode=<optimized out>) at /test/10.5_dbg/storage/maria/ha_maria.cc:2020 #9 0x00005600b20d005f in ha_maria::end_bulk_insert (this=0x14d0105596a0) at /test/10.5_dbg/storage/maria/ha_maria.cc:2248 #10 0x00005600b1bcf813 in handler::ha_end_bulk_insert (this=0x14d0105596a0) at /test/10.5_dbg/sql/handler.h:3421 #11 mysql_load (thd=thd@entry=0x14d010415088, ex=0x14d010474168, table_list=table_list@entry=0x14d0104741f0, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_ERROR, ignore=false, read_file_from_client=false) at /test/10.5_dbg/sql/sql_load.cc:688 #12 0x00005600b1bddab1 in mysql_execute_command (thd=thd@entry=0x14d010415088) at /test/10.5_dbg/sql/sql_parse.cc:4963 #13 0x00005600b1be7b3a in mysql_parse (thd=thd@entry=0x14d010415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d033525450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957 #14 0x00005600b1bd430f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d010415088, packet=packet@entry=0x14d010467089 "", packet_length=packet_length@entry=34, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839 #15 0x00005600b1bd2bde in do_command (thd=0x14d010415088) at /test/10.5_dbg/sql/sql_parse.cc:1358 #16 0x00005600b1d2cd0d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14d0120433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422 #17 0x00005600b1d2d03c in handle_one_connection (arg=arg@entry=0x14d0120433a8) at /test/10.5_dbg/sql/sql_connect.cc:1319 #18 0x00005600b218cf1a in pfs_spawn_thread (arg=0x14d031045888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201 #19 0x000014d03294d6db in start_thread (arg=0x14d033526700) at pthread_create.c:463 #20 0x000014d031d4b88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.5.2 (dbg), 10.5.3 (dbg) Bug confirmed not present in: MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

            Additional testcase with slightly different stack

            SET aria_sort_buffer_size=4096;
            SET SESSION tmp_table_size = 65535;
            SELECT COUNT(*) FROM information_schema.tables A WHERE NOT EXISTS (SELECT * FROM information_schema.COLUMNS B WHERE A.table_schema = B.table_schema AND A.table_name = B.table_name);
            

            Leads to:

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

            mysqld: /test/10.6_dbg/storage/maria/ha_maria.cc:2030: virtual int ha_maria::enable_indexes(uint): Assertion `thd->killed != 0' failed.
            

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

            Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            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 0x1537e8f2c700 (LWP 3164938))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x0000563cbe20c0d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2  0x0000563cbd9a0ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x00001537ebaea859 in __GI_abort () at abort.c:79
            #6  0x00001537ebaea729 in __assert_fail_base (fmt=0x1537ebc80588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563cbe55a130 "thd->killed != 0", file=0x563cbe55a530 "/test/10.6_dbg/storage/maria/ha_maria.cc", line=2030, function=<optimized out>) at assert.c:92
            #7  0x00001537ebafbf36 in __GI___assert_fail (assertion=assertion@entry=0x563cbe55a130 "thd->killed != 0", file=file@entry=0x563cbe55a530 "/test/10.6_dbg/storage/maria/ha_maria.cc", line=line@entry=2030, function=function@entry=0x563cbe55b388 "virtual int ha_maria::enable_indexes(uint)") at assert.c:101
            #8  0x0000563cbdc312f7 in ha_maria::enable_indexes (this=this@entry=0x1537983be030, mode=mode@entry=2) at /test/10.6_dbg/storage/maria/ha_maria.cc:2030
            #9  0x0000563cbdc3149f in ha_maria::end_bulk_insert (this=0x1537983be030) at /test/10.6_dbg/storage/maria/ha_maria.cc:2262
            #10 0x0000563cbd9aeac2 in handler::ha_end_bulk_insert (this=0x1537983be030) at /test/10.6_dbg/sql/handler.cc:4647
            #11 0x0000563cbd7303c2 in create_internal_tmp_table_from_heap (thd=0x153798000db8, table=0x15379803d530, start_recinfo=<optimized out>, recinfo=recinfo@entry=0x15379803ab00, error=<optimized out>, ignore_last_dupp_key_error=ignore_last_dupp_key_error@entry=true, is_duplicate=0x1537e8f2a090) at /test/10.6_dbg/sql/sql_select.cc:19839
            #12 0x0000563cbd7c5e1b in select_unit::write_record (this=this@entry=0x15379803aa88) at /test/10.6_dbg/sql/sql_union.cc:420
            #13 0x0000563cbd7c6864 in select_unit::send_data (this=this@entry=0x15379803aa88, values=@0x153798013780: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798013bd8, last = 0x153798018678, elements = 2}, <No data fields>}) at /test/10.6_dbg/sql/sql_union.cc:156
            #14 0x0000563cbd65db27 in select_materialize_with_stats::send_data (this=0x15379803aa88, items=@0x153798013780: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798013bd8, last = 0x153798018678, elements = 2}, <No data fields>}) at /test/10.6_dbg/sql/sql_class.cc:4205
            #15 0x0000563cbd740127 in select_result_sink::send_data_with_check (sent=<optimized out>, u=<optimized out>, items=@0x153798013780: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798013bd8, last = 0x153798018678, elements = 2}, <No data fields>}, this=<optimized out>) at /test/10.6_dbg/sql/sql_class.h:5375
            #16 end_send (join=0x153798017fd0, join_tab=0x153798040870, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:21798
            #17 0x0000563cbd70eb8c in evaluate_join_record (join=join@entry=0x153798017fd0, join_tab=join_tab@entry=0x1537980404c0, error=error@entry=0) at /test/10.6_dbg/sql/sql_select.cc:20821
            #18 0x0000563cbd7254d2 in sub_select (join=0x153798017fd0, join_tab=0x1537980404c0, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:20637
            #19 0x0000563cbd75e33b in do_select (procedure=0x0, join=0x153798017fd0) at /test/10.6_dbg/sql/sql_select.cc:20145
            #20 JOIN::exec_inner (this=this@entry=0x153798017fd0) at /test/10.6_dbg/sql/sql_select.cc:4472
            #21 0x0000563cbd75e7ad in JOIN::exec (this=0x153798017fd0) at /test/10.6_dbg/sql/sql_select.cc:4252
            #22 0x0000563cbdabeb78 in subselect_hash_sj_engine::exec (this=0x15379803a9c0) at /test/10.6_dbg/sql/item_subselect.cc:5552
            #23 0x0000563cbdaadc12 in Item_subselect::exec (this=this@entry=0x1537980350e0) at /test/10.6_dbg/sql/item_subselect.cc:782
            #24 0x0000563cbdab3796 in Item_in_subselect::exec (this=0x1537980350e0) at /test/10.6_dbg/sql/item_subselect.cc:962
            #25 0x0000563cbdaacb5c in Item_in_subselect::val_bool (this=0x1537980350e0) at /test/10.6_dbg/sql/item_subselect.cc:1841
            #26 0x0000563cbd5d3953 in Item::val_bool_result (this=<optimized out>) at /test/10.6_dbg/sql/item.h:1575
            #27 0x0000563cbda01455 in Item_in_optimizer::val_int (this=0x153798034b30) at /test/10.6_dbg/sql/item_cmpfunc.cc:1650
            #28 0x0000563cbd5d3917 in Item::val_int_result (this=<optimized out>) at /test/10.6_dbg/sql/item.h:1571
            #29 0x0000563cbd9c0d1e in Item_cache_int::cache_value (this=0x1537980425b8) at /test/10.6_dbg/sql/item.cc:9834
            #30 0x0000563cbd9df46b in Item_cache_wrapper::cache (this=0x1537980424f0) at /test/10.6_dbg/sql/item.cc:8672
            #31 Item_cache_wrapper::val_bool (this=0x1537980424f0) at /test/10.6_dbg/sql/item.cc:8858
            #32 0x0000563cbd9f0c60 in Item_func_not::val_int (this=0x153798015868) at /test/10.6_dbg/sql/item_cmpfunc.cc:202
            #33 0x0000563cbd70e980 in evaluate_join_record (join=join@entry=0x1537980178a8, join_tab=join_tab@entry=0x153798036c70, error=error@entry=0) at /test/10.6_dbg/sql/sql_select.cc:20696
            #34 0x0000563cbd7253e7 in sub_select (join=0x1537980178a8, join_tab=0x153798036c70, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:20598
            #35 0x0000563cbd75e33b in do_select (procedure=0x0, join=0x1537980178a8) at /test/10.6_dbg/sql/sql_select.cc:20145
            #36 JOIN::exec_inner (this=this@entry=0x1537980178a8) at /test/10.6_dbg/sql/sql_select.cc:4472
            #37 0x0000563cbd75e7ad in JOIN::exec (this=this@entry=0x1537980178a8) at /test/10.6_dbg/sql/sql_select.cc:4252
            #38 0x0000563cbd75ca09 in mysql_select (thd=thd@entry=0x153798000db8, tables=0x153798012f50, fields=@0x1537980129e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798012ed0, last = 0x153798012ed0, elements = 1}, <No data fields>}, conds=0x153798015868, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x153798017880, unit=0x153798004f80, select_lex=0x153798012890) at /test/10.6_dbg/sql/sql_select.cc:4668
            #39 0x0000563cbd75ccd0 in handle_select (thd=thd@entry=0x153798000db8, lex=lex@entry=0x153798004eb8, result=result@entry=0x153798017880, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:417
            #40 0x0000563cbd6cf19d in execute_sqlcom_select (thd=thd@entry=0x153798000db8, all_tables=0x153798012f50) at /test/10.6_dbg/sql/sql_parse.cc:6116
            #41 0x0000563cbd6dbc7c in mysql_execute_command (thd=thd@entry=0x153798000db8) at /test/10.6_dbg/sql/sql_parse.cc:3820
            #42 0x0000563cbd6c8072 in mysql_parse (thd=thd@entry=0x153798000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1537e8f2b3d0) at /test/10.6_dbg/sql/sql_parse.cc:7881
            #43 0x0000563cbd6d61ec in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153798000db8, packet=packet@entry=0x153798008d39 "", packet_length=packet_length@entry=180) at /test/10.6_dbg/sql/sql_class.h:1293
            #44 0x0000563cbd6d952d in do_command (thd=0x153798000db8) at /test/10.6_dbg/sql/sql_parse.cc:1348
            #45 0x0000563cbd8357fc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x563cc026e6f8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
            #46 0x0000563cbd835f03 in handle_one_connection (arg=arg@entry=0x563cc026e6f8) at /test/10.6_dbg/sql/sql_connect.cc:1312
            #47 0x0000563cbdceb88f in pfs_spawn_thread (arg=0x563cc01ba898) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
            #48 0x00001537ebff8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #49 0x00001537ebbe7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.5.9 (dbg), 10.6.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

            Roel Roel Van de Paar added a comment - Additional testcase with slightly different stack SET aria_sort_buffer_size=4096; SET SESSION tmp_table_size = 65535; SELECT COUNT(*) FROM information_schema.tables A WHERE NOT EXISTS (SELECT * FROM information_schema.COLUMNS B WHERE A.table_schema = B.table_schema AND A.table_name = B.table_name); Leads to: 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug) mysqld: /test/10.6_dbg/storage/maria/ha_maria.cc:2030: virtual int ha_maria::enable_indexes(uint): Assertion `thd->killed != 0' failed. 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug) Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. 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 0x1537e8f2c700 (LWP 3164938))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x0000563cbe20c0d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424 #2 0x0000563cbd9a0ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x00001537ebaea859 in __GI_abort () at abort.c:79 #6 0x00001537ebaea729 in __assert_fail_base (fmt=0x1537ebc80588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563cbe55a130 "thd->killed != 0", file=0x563cbe55a530 "/test/10.6_dbg/storage/maria/ha_maria.cc", line=2030, function=<optimized out>) at assert.c:92 #7 0x00001537ebafbf36 in __GI___assert_fail (assertion=assertion@entry=0x563cbe55a130 "thd->killed != 0", file=file@entry=0x563cbe55a530 "/test/10.6_dbg/storage/maria/ha_maria.cc", line=line@entry=2030, function=function@entry=0x563cbe55b388 "virtual int ha_maria::enable_indexes(uint)") at assert.c:101 #8 0x0000563cbdc312f7 in ha_maria::enable_indexes (this=this@entry=0x1537983be030, mode=mode@entry=2) at /test/10.6_dbg/storage/maria/ha_maria.cc:2030 #9 0x0000563cbdc3149f in ha_maria::end_bulk_insert (this=0x1537983be030) at /test/10.6_dbg/storage/maria/ha_maria.cc:2262 #10 0x0000563cbd9aeac2 in handler::ha_end_bulk_insert (this=0x1537983be030) at /test/10.6_dbg/sql/handler.cc:4647 #11 0x0000563cbd7303c2 in create_internal_tmp_table_from_heap (thd=0x153798000db8, table=0x15379803d530, start_recinfo=<optimized out>, recinfo=recinfo@entry=0x15379803ab00, error=<optimized out>, ignore_last_dupp_key_error=ignore_last_dupp_key_error@entry=true, is_duplicate=0x1537e8f2a090) at /test/10.6_dbg/sql/sql_select.cc:19839 #12 0x0000563cbd7c5e1b in select_unit::write_record (this=this@entry=0x15379803aa88) at /test/10.6_dbg/sql/sql_union.cc:420 #13 0x0000563cbd7c6864 in select_unit::send_data (this=this@entry=0x15379803aa88, values=@0x153798013780: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798013bd8, last = 0x153798018678, elements = 2}, <No data fields>}) at /test/10.6_dbg/sql/sql_union.cc:156 #14 0x0000563cbd65db27 in select_materialize_with_stats::send_data (this=0x15379803aa88, items=@0x153798013780: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798013bd8, last = 0x153798018678, elements = 2}, <No data fields>}) at /test/10.6_dbg/sql/sql_class.cc:4205 #15 0x0000563cbd740127 in select_result_sink::send_data_with_check (sent=<optimized out>, u=<optimized out>, items=@0x153798013780: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798013bd8, last = 0x153798018678, elements = 2}, <No data fields>}, this=<optimized out>) at /test/10.6_dbg/sql/sql_class.h:5375 #16 end_send (join=0x153798017fd0, join_tab=0x153798040870, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:21798 #17 0x0000563cbd70eb8c in evaluate_join_record (join=join@entry=0x153798017fd0, join_tab=join_tab@entry=0x1537980404c0, error=error@entry=0) at /test/10.6_dbg/sql/sql_select.cc:20821 #18 0x0000563cbd7254d2 in sub_select (join=0x153798017fd0, join_tab=0x1537980404c0, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:20637 #19 0x0000563cbd75e33b in do_select (procedure=0x0, join=0x153798017fd0) at /test/10.6_dbg/sql/sql_select.cc:20145 #20 JOIN::exec_inner (this=this@entry=0x153798017fd0) at /test/10.6_dbg/sql/sql_select.cc:4472 #21 0x0000563cbd75e7ad in JOIN::exec (this=0x153798017fd0) at /test/10.6_dbg/sql/sql_select.cc:4252 #22 0x0000563cbdabeb78 in subselect_hash_sj_engine::exec (this=0x15379803a9c0) at /test/10.6_dbg/sql/item_subselect.cc:5552 #23 0x0000563cbdaadc12 in Item_subselect::exec (this=this@entry=0x1537980350e0) at /test/10.6_dbg/sql/item_subselect.cc:782 #24 0x0000563cbdab3796 in Item_in_subselect::exec (this=0x1537980350e0) at /test/10.6_dbg/sql/item_subselect.cc:962 #25 0x0000563cbdaacb5c in Item_in_subselect::val_bool (this=0x1537980350e0) at /test/10.6_dbg/sql/item_subselect.cc:1841 #26 0x0000563cbd5d3953 in Item::val_bool_result (this=<optimized out>) at /test/10.6_dbg/sql/item.h:1575 #27 0x0000563cbda01455 in Item_in_optimizer::val_int (this=0x153798034b30) at /test/10.6_dbg/sql/item_cmpfunc.cc:1650 #28 0x0000563cbd5d3917 in Item::val_int_result (this=<optimized out>) at /test/10.6_dbg/sql/item.h:1571 #29 0x0000563cbd9c0d1e in Item_cache_int::cache_value (this=0x1537980425b8) at /test/10.6_dbg/sql/item.cc:9834 #30 0x0000563cbd9df46b in Item_cache_wrapper::cache (this=0x1537980424f0) at /test/10.6_dbg/sql/item.cc:8672 #31 Item_cache_wrapper::val_bool (this=0x1537980424f0) at /test/10.6_dbg/sql/item.cc:8858 #32 0x0000563cbd9f0c60 in Item_func_not::val_int (this=0x153798015868) at /test/10.6_dbg/sql/item_cmpfunc.cc:202 #33 0x0000563cbd70e980 in evaluate_join_record (join=join@entry=0x1537980178a8, join_tab=join_tab@entry=0x153798036c70, error=error@entry=0) at /test/10.6_dbg/sql/sql_select.cc:20696 #34 0x0000563cbd7253e7 in sub_select (join=0x1537980178a8, join_tab=0x153798036c70, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:20598 #35 0x0000563cbd75e33b in do_select (procedure=0x0, join=0x1537980178a8) at /test/10.6_dbg/sql/sql_select.cc:20145 #36 JOIN::exec_inner (this=this@entry=0x1537980178a8) at /test/10.6_dbg/sql/sql_select.cc:4472 #37 0x0000563cbd75e7ad in JOIN::exec (this=this@entry=0x1537980178a8) at /test/10.6_dbg/sql/sql_select.cc:4252 #38 0x0000563cbd75ca09 in mysql_select (thd=thd@entry=0x153798000db8, tables=0x153798012f50, fields=@0x1537980129e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153798012ed0, last = 0x153798012ed0, elements = 1}, <No data fields>}, conds=0x153798015868, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x153798017880, unit=0x153798004f80, select_lex=0x153798012890) at /test/10.6_dbg/sql/sql_select.cc:4668 #39 0x0000563cbd75ccd0 in handle_select (thd=thd@entry=0x153798000db8, lex=lex@entry=0x153798004eb8, result=result@entry=0x153798017880, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:417 #40 0x0000563cbd6cf19d in execute_sqlcom_select (thd=thd@entry=0x153798000db8, all_tables=0x153798012f50) at /test/10.6_dbg/sql/sql_parse.cc:6116 #41 0x0000563cbd6dbc7c in mysql_execute_command (thd=thd@entry=0x153798000db8) at /test/10.6_dbg/sql/sql_parse.cc:3820 #42 0x0000563cbd6c8072 in mysql_parse (thd=thd@entry=0x153798000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1537e8f2b3d0) at /test/10.6_dbg/sql/sql_parse.cc:7881 #43 0x0000563cbd6d61ec in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153798000db8, packet=packet@entry=0x153798008d39 "", packet_length=packet_length@entry=180) at /test/10.6_dbg/sql/sql_class.h:1293 #44 0x0000563cbd6d952d in do_command (thd=0x153798000db8) at /test/10.6_dbg/sql/sql_parse.cc:1348 #45 0x0000563cbd8357fc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x563cc026e6f8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410 #46 0x0000563cbd835f03 in handle_one_connection (arg=arg@entry=0x563cc026e6f8) at /test/10.6_dbg/sql/sql_connect.cc:1312 #47 0x0000563cbdceb88f in pfs_spawn_thread (arg=0x563cc01ba898) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201 #48 0x00001537ebff8609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #49 0x00001537ebbe7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.5.9 (dbg), 10.6.0 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

            Fixed as part of MDEV-17223.
            Test case pushed to 10.3, however it was tested against 10.5 to verify that it causes a crash without the fix for MDEV-17223.

            monty Michael Widenius added a comment - Fixed as part of MDEV-17223 . Test case pushed to 10.3, however it was tested against 10.5 to verify that it causes a crash without the fix for MDEV-17223 .

            People

              monty Michael Widenius
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.