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

Server crashes when executing OPTIMIZE or REPAIR TABLE for InnoDB temporary tables

Details

    Description

      --source include/have_innodb.inc 
       
      CREATE TEMPORARY TABLE t1 (i INT) ENGINE=INNODB;
      CREATE TABLE t2 (i INT) ENGINE=Aria ;
      OPTIMIZE TABLE t1,t2;
       
      #cleanup
      DROP TABLE t1,t2;
      

      Leads to:

      11.2.4 db06c5dd07e6ffd6a569afe6950fa77c2f02f811 (Debug)

      mariadbd: /test/11.2_dbg/sql/sql_class.cc:4762: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed.
      

      11.2.4 db06c5dd07e6ffd6a569afe6950fa77c2f02f811 (Debug)

      Core was generated by `/test/MD140524-mariadb-11.2.4-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      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 0x14ea240bb700 (LWP 353731))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014ea28121859 in __GI_abort () at abort.c:79
      #2  0x000014ea28121729 in __assert_fail_base (fmt=0x14ea282b7588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561cf76d7990 "thd->stmt_arena != thd->progress.arena", file=0x561cf76d6ce0 "/test/11.2_dbg/sql/sql_class.cc", line=4762, function=<optimized out>) at assert.c:92
      #3  0x000014ea28132fd6 in __GI___assert_fail (assertion=assertion@entry=0x561cf76d7990 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x561cf76d6ce0 "/test/11.2_dbg/sql/sql_class.cc", line=line@entry=4762, function=function@entry=0x561cf76d79b8 "void thd_progress_init(THD*, uint)") at assert.c:101
      #4  0x0000561cf6961022 in thd_progress_init (thd=thd@entry=0x14e9dc000d48, max_stage=max_stage@entry=1) at /test/11.2_dbg/sql/sql_class.cc:4762
      #5  0x0000561cf6f24345 in ha_maria::optimize (this=0x14e9dc020270, thd=0x14e9dc000d48, check_opt=0x14e9dc0065b8) at /test/11.2_dbg/storage/maria/ha_maria.cc:1624
      #6  0x0000561cf6cfbc44 in handler::ha_optimize (this=0x14e9dc020270, thd=0x14e9dc000d48, check_opt=0x14e9dc0065b8) at /test/11.2_dbg/sql/handler.cc:5382
      #7  0x0000561cf6b5ad1f in mysql_admin_table (thd=thd@entry=0x14e9dc000d48, tables=tables@entry=0x14e9dc013628, check_opt=check_opt@entry=0x14e9dc0065b8, operator_name=operator_name@entry=0x561cf7eef5e0 <msg_optimize>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x561cf6cfbba8 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/11.2_dbg/sql/sql_admin.cc:915
      #8  0x0000561cf6b5d4a6 in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x14e9dc000d48) at /test/11.2_dbg/sql/sql_admin.cc:1625
      #9  0x0000561cf69d4780 in mysql_execute_command (thd=thd@entry=0x14e9dc000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.2_dbg/sql/sql_parse.cc:5875
      #10 0x0000561cf69bd119 in mysql_parse (thd=thd@entry=0x14e9dc000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ea240ba2b0) at /test/11.2_dbg/sql/sql_parse.cc:7903
      #11 0x0000561cf69cac3b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e9dc000d48, packet=packet@entry=0x14e9dc00b219 "", packet_length=packet_length@entry=26, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_class.h:1409
      #12 0x0000561cf69cd5a5 in do_command (thd=0x14e9dc000d48, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1406
      #13 0x0000561cf6b48911 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x561cf92b8648, put_in_cache=put_in_cache@entry=true) at /test/11.2_dbg/sql/sql_connect.cc:1437
      #14 0x0000561cf6b48ec6 in handle_one_connection (arg=arg@entry=0x561cf92b8648) at /test/11.2_dbg/sql/sql_connect.cc:1339
      #15 0x0000561cf6fbbc62 in pfs_spawn_thread (arg=0x561cf92f1708) at /test/11.2_dbg/storage/perfschema/pfs.cc:2201
      #16 0x000014ea28632609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x000014ea2821e133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 11.2.4 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.34 (dbg), 10.4.34 (opt), 10.5.25 (dbg), 10.5.25 (opt), 10.6.18 (dbg), 10.6.18 (opt), 10.11.8 (dbg), 10.11.8 (opt), 11.0.6 (dbg), 11.0.6 (opt), 11.1.5 (dbg), 11.1.5 (opt), 11.2.4 (opt), 11.3.3 (dbg), 11.3.3 (opt), 11.4.2 (dbg), 11.4.2 (opt), 11.5.0 (dbg), 11.5.0 (opt)

      Attachments

        Issue Links

          Activity

            The crash also occurs when we run optimize table for two InnoDB temporary tables

            --source include/have_innodb.inc 
             
            CREATE TEMPORARY TABLE t1 (f INT) ENGINE=INNODB;
            CREATE TEMPORARY TABLE t2 (f INT) ENGINE=INNODB;
            OPTIMIZE LOCAL TABLE t1,t2;
            

            Leads to:

            11.2.4 4a35a3b50d32992adc208487e6cba240b2756086 (Debug)

            mariadbd: /test/11.2_dbg/sql/sql_class.cc:4761: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed.
            

            11.2.4 4a35a3b50d32992adc208487e6cba240b2756086 (Debug)

            Core was generated by `/test/MD160424-mariadb-11.2.4-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
            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 0x1492680ad700 (LWP 2965662))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x000014926b313859 in __GI_abort () at abort.c:79
            #2  0x000014926b313729 in __assert_fail_base (fmt=0x14926b4a9588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e8ebb958b0 "thd->stmt_arena != thd->progress.arena", file=0x55e8ebb94c00 "/test/11.2_dbg/sql/sql_class.cc", line=4761, function=<optimized out>) at assert.c:92
            #3  0x000014926b324fd6 in __GI___assert_fail (assertion=assertion@entry=0x55e8ebb958b0 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x55e8ebb94c00 "/test/11.2_dbg/sql/sql_class.cc", line=line@entry=4761, function=function@entry=0x55e8ebb958d8 "void thd_progress_init(THD*, uint)") at assert.c:101
            #4  0x000055e8eae2ddd0 in thd_progress_init (thd=thd@entry=0x149218000d48, max_stage=max_stage@entry=2) at /test/11.2_dbg/sql/sql_class.cc:4761
            #5  0x000055e8eaf932db in mysql_alter_table (thd=thd@entry=0x149218000d48, new_db=<optimized out>, new_name=<optimized out>, create_info=create_info@entry=0x1492680ab0e0, table_list=<optimized out>, table_list@entry=0x149218013d60, recreate_info=recreate_info@entry=0x1492680ab490, alter_info=0x1492680aaf70, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/11.2_dbg/sql/sql_table.cc:11428
            #6  0x000055e8eaf95121 in mysql_recreate_table (thd=thd@entry=0x149218000d48, table_list=table_list@entry=0x149218013d60, recreate_info=recreate_info@entry=0x1492680ab490, table_copy=table_copy@entry=false) at /test/11.2_dbg/sql/sql_table.cc:12536
            #7  0x000055e8eb02503b in admin_recreate_table (thd=thd@entry=0x149218000d48, table_list=table_list@entry=0x149218013d60, recreate_info=recreate_info@entry=0x1492680ab490) at /test/11.2_dbg/sql/sql_class.h:5174
            #8  0x000055e8eb0286e5 in mysql_admin_table (thd=thd@entry=0x149218000d48, tables=tables@entry=0x149218013610, check_opt=check_opt@entry=0x1492180065b8, operator_name=operator_name@entry=0x55e8ec3aa8a0 <msg_optimize>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x55e8eb1c6f74 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/11.2_dbg/sql/sql_admin.cc:1230
            #9  0x000055e8eb029ac0 in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x149218000d48) at /test/11.2_dbg/sql/sql_admin.cc:1625
            #10 0x000055e8eaea129c in mysql_execute_command (thd=thd@entry=0x149218000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.2_dbg/sql/sql_parse.cc:5868
            #11 0x000055e8eae89c05 in mysql_parse (thd=thd@entry=0x149218000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1492680ac2b0) at /test/11.2_dbg/sql/sql_parse.cc:7896
            #12 0x000055e8eae977ba in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x149218000d48, packet=packet@entry=0x14921800b219 "", packet_length=packet_length@entry=20, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_class.h:1410
            #13 0x000055e8eae9a0bc in do_command (thd=0x149218000d48, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1406
            #14 0x000055e8eb014f2b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e8ef744a38, put_in_cache=put_in_cache@entry=true) at /test/11.2_dbg/sql/sql_connect.cc:1437
            #15 0x000055e8eb0154e0 in handle_one_connection (arg=arg@entry=0x55e8ef744a38) at /test/11.2_dbg/sql/sql_connect.cc:1339
            #16 0x000055e8eb484e44 in pfs_spawn_thread (arg=0x55e8ef697cb8) at /test/11.2_dbg/storage/perfschema/pfs.cc:2201
            #17 0x000014926b824609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #18 0x000014926b410133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 11.2.4 (dbg)

            ramesh Ramesh Sivaraman added a comment - The crash also occurs when we run optimize table for two InnoDB temporary tables --source include/have_innodb.inc   CREATE TEMPORARY TABLE t1 (f INT ) ENGINE=INNODB; CREATE TEMPORARY TABLE t2 (f INT ) ENGINE=INNODB; OPTIMIZE LOCAL TABLE t1,t2; Leads to: 11.2.4 4a35a3b50d32992adc208487e6cba240b2756086 (Debug) mariadbd: /test/11.2_dbg/sql/sql_class.cc:4761: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed. 11.2.4 4a35a3b50d32992adc208487e6cba240b2756086 (Debug) Core was generated by `/test/MD160424-mariadb-11.2.4-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'. 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 0x1492680ad700 (LWP 2965662))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x000014926b313859 in __GI_abort () at abort.c:79 #2 0x000014926b313729 in __assert_fail_base (fmt=0x14926b4a9588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e8ebb958b0 "thd->stmt_arena != thd->progress.arena", file=0x55e8ebb94c00 "/test/11.2_dbg/sql/sql_class.cc", line=4761, function=<optimized out>) at assert.c:92 #3 0x000014926b324fd6 in __GI___assert_fail (assertion=assertion@entry=0x55e8ebb958b0 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x55e8ebb94c00 "/test/11.2_dbg/sql/sql_class.cc", line=line@entry=4761, function=function@entry=0x55e8ebb958d8 "void thd_progress_init(THD*, uint)") at assert.c:101 #4 0x000055e8eae2ddd0 in thd_progress_init (thd=thd@entry=0x149218000d48, max_stage=max_stage@entry=2) at /test/11.2_dbg/sql/sql_class.cc:4761 #5 0x000055e8eaf932db in mysql_alter_table (thd=thd@entry=0x149218000d48, new_db=<optimized out>, new_name=<optimized out>, create_info=create_info@entry=0x1492680ab0e0, table_list=<optimized out>, table_list@entry=0x149218013d60, recreate_info=recreate_info@entry=0x1492680ab490, alter_info=0x1492680aaf70, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/11.2_dbg/sql/sql_table.cc:11428 #6 0x000055e8eaf95121 in mysql_recreate_table (thd=thd@entry=0x149218000d48, table_list=table_list@entry=0x149218013d60, recreate_info=recreate_info@entry=0x1492680ab490, table_copy=table_copy@entry=false) at /test/11.2_dbg/sql/sql_table.cc:12536 #7 0x000055e8eb02503b in admin_recreate_table (thd=thd@entry=0x149218000d48, table_list=table_list@entry=0x149218013d60, recreate_info=recreate_info@entry=0x1492680ab490) at /test/11.2_dbg/sql/sql_class.h:5174 #8 0x000055e8eb0286e5 in mysql_admin_table (thd=thd@entry=0x149218000d48, tables=tables@entry=0x149218013610, check_opt=check_opt@entry=0x1492180065b8, operator_name=operator_name@entry=0x55e8ec3aa8a0 <msg_optimize>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x55e8eb1c6f74 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/11.2_dbg/sql/sql_admin.cc:1230 #9 0x000055e8eb029ac0 in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x149218000d48) at /test/11.2_dbg/sql/sql_admin.cc:1625 #10 0x000055e8eaea129c in mysql_execute_command (thd=thd@entry=0x149218000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.2_dbg/sql/sql_parse.cc:5868 #11 0x000055e8eae89c05 in mysql_parse (thd=thd@entry=0x149218000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1492680ac2b0) at /test/11.2_dbg/sql/sql_parse.cc:7896 #12 0x000055e8eae977ba in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x149218000d48, packet=packet@entry=0x14921800b219 "", packet_length=packet_length@entry=20, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_class.h:1410 #13 0x000055e8eae9a0bc in do_command (thd=0x149218000d48, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1406 #14 0x000055e8eb014f2b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e8ef744a38, put_in_cache=put_in_cache@entry=true) at /test/11.2_dbg/sql/sql_connect.cc:1437 #15 0x000055e8eb0154e0 in handle_one_connection (arg=arg@entry=0x55e8ef744a38) at /test/11.2_dbg/sql/sql_connect.cc:1339 #16 0x000055e8eb484e44 in pfs_spawn_thread (arg=0x55e8ef697cb8) at /test/11.2_dbg/storage/perfschema/pfs.cc:2201 #17 0x000014926b824609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #18 0x000014926b410133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 11.2.4 (dbg)

            This bug caused by MDEV-33348. So please reassigning to runtime.

            thiru Thirunarayanan Balathandayuthapani added a comment - - edited This bug caused by MDEV-33348 . So please reassigning to runtime.

            Making it critical since it's a regression

            nikitamalyavin Nikita Malyavin added a comment - Making it critical since it's a regression
            Roel Roel Van de Paar added a comment - - edited

            With REPAIR:

            --source include/have_innodb.inc
            CREATE TABLE t1 (c INT) ENGINE=Aria;
            CREATE TEMPORARY TABLE t2 (c INT) ENGINE=InnoDB;
            REPAIR TABLE t2,t1;
            

            11.6.0 26f01f8be598e77c8d157cc6358508b7193a9187 (Debug)

            mariadbd: /test/11.6_dbg/sql/sql_class.cc:4895: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed.
            

            11.6.0 26f01f8be598e77c8d157cc6358508b7193a9187 (Debug)

            Core was generated by `/test/MD290524-mariadb-11.6.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
            [Current thread is 1 (LWP 1085037)]
            (gdb) bt
            #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3  0x000014c3c5042866 in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4  0x000014c3c50268b7 in __GI_abort () at ./stdlib/abort.c:79
            #5  0x000014c3c50267db in __assert_fail_base (fmt=0x14c3c51c5168 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x56125da475a8 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x56125da467d0 "/test/11.6_dbg/sql/sql_class.cc", line=line@entry=4895, function=function@entry=0x56125da475d0 "void thd_progress_init(THD*, uint)") at ./assert/assert.c:92
            #6  0x000014c3c5039186 in __assert_fail (assertion=0x56125da475a8 "thd->stmt_arena != thd->progress.arena", file=0x56125da467d0 "/test/11.6_dbg/sql/sql_class.cc", line=4895, function=0x56125da475d0 "void thd_progress_init(THD*, uint)")at ./assert/assert.c:101
            #7  0x000056125cc9a561 in thd_progress_init (thd=0x14c378000d58, max_stage=1)at /test/11.6_dbg/sql/sql_class.cc:4895
            #8  0x000056125d24724c in ha_maria::repair (this=0x14c378029690, thd=0x14c378000d58, check_opt=0x14c378006570)at /test/11.6_dbg/storage/maria/ha_maria.cc:1522
            #9  0x000056125d02b057 in handler::ha_repair (this=0x14c378029690, thd=0x14c378000d58, check_opt=0x14c378006570)at /test/11.6_dbg/sql/handler.cc:5351
            #10 0x000056125ce90f5b in mysql_admin_table (thd=thd@entry=0x14c378000d58, tables=tables@entry=0x14c37801aa78, check_opt=check_opt@entry=0x14c378006570, operator_name=operator_name@entry=0x56125e2cda30 <msg_repair>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, no_errors_from_open=<optimized out>, extra_open_options=<optimized out>, prepare_func=<optimized out>, operator_func=<optimized out>, view_operator_func=<optimized out>, is_cmd_replicated=<optimized out>)at /test/11.6_dbg/sql/sql_admin.cc:937
            #11 0x000056125ce9395f in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x14c378000d58) at /test/11.6_dbg/sql/sql_admin.cc:1694
            #12 0x000056125cd08fad in mysql_execute_command (thd=thd@entry=0x14c378000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.6_dbg/sql/sql_parse.cc:5842
            #13 0x000056125cd0a1a9 in mysql_parse (thd=thd@entry=0x14c378000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c3c40952a0)at /test/11.6_dbg/sql/sql_parse.cc:7868
            #14 0x000056125cd0c56c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c378000d58, packet=packet@entry=0x14c37800b319 "", packet_length=packet_length@entry=18, blocking=blocking@entry=true)at /test/11.6_dbg/sql/sql_class.h:255
            #15 0x000056125cd0ea02 in do_command (thd=0x14c378000d58, blocking=blocking@entry=true) at /test/11.6_dbg/sql/sql_parse.cc:1405
            #16 0x000056125ce7e863 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5612604dc8b8, put_in_cache=put_in_cache@entry=true)at /test/11.6_dbg/sql/sql_connect.cc:1447
            #17 0x000056125ce7eb58 in handle_one_connection (arg=arg@entry=0x5612604dc8b8)at /test/11.6_dbg/sql/sql_connect.cc:1349
            #18 0x000056125d2df2ee in pfs_spawn_thread (arg=0x56126044cd18)at /test/11.6_dbg/storage/perfschema/pfs.cc:2201
            #19 0x000014c3c5097ada in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444
            #20 0x000014c3c512847c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            

            Roel Roel Van de Paar added a comment - - edited With REPAIR: --source include/have_innodb.inc CREATE TABLE t1 (c INT ) ENGINE=Aria; CREATE TEMPORARY TABLE t2 (c INT ) ENGINE=InnoDB; REPAIR TABLE t2,t1; 11.6.0 26f01f8be598e77c8d157cc6358508b7193a9187 (Debug) mariadbd: /test/11.6_dbg/sql/sql_class.cc:4895: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed. 11.6.0 26f01f8be598e77c8d157cc6358508b7193a9187 (Debug) Core was generated by `/test/MD290524-mariadb-11.6.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44 Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c. [Current thread is 1 (LWP 1085037)] (gdb) bt #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44 #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78 #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89 #3 0x000014c3c5042866 in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26 #4 0x000014c3c50268b7 in __GI_abort () at ./stdlib/abort.c:79 #5 0x000014c3c50267db in __assert_fail_base (fmt=0x14c3c51c5168 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x56125da475a8 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x56125da467d0 "/test/11.6_dbg/sql/sql_class.cc", line=line@entry=4895, function=function@entry=0x56125da475d0 "void thd_progress_init(THD*, uint)") at ./assert/assert.c:92 #6 0x000014c3c5039186 in __assert_fail (assertion=0x56125da475a8 "thd->stmt_arena != thd->progress.arena", file=0x56125da467d0 "/test/11.6_dbg/sql/sql_class.cc", line=4895, function=0x56125da475d0 "void thd_progress_init(THD*, uint)")at ./assert/assert.c:101 #7 0x000056125cc9a561 in thd_progress_init (thd=0x14c378000d58, max_stage=1)at /test/11.6_dbg/sql/sql_class.cc:4895 #8 0x000056125d24724c in ha_maria::repair (this=0x14c378029690, thd=0x14c378000d58, check_opt=0x14c378006570)at /test/11.6_dbg/storage/maria/ha_maria.cc:1522 #9 0x000056125d02b057 in handler::ha_repair (this=0x14c378029690, thd=0x14c378000d58, check_opt=0x14c378006570)at /test/11.6_dbg/sql/handler.cc:5351 #10 0x000056125ce90f5b in mysql_admin_table (thd=thd@entry=0x14c378000d58, tables=tables@entry=0x14c37801aa78, check_opt=check_opt@entry=0x14c378006570, operator_name=operator_name@entry=0x56125e2cda30 <msg_repair>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, no_errors_from_open=<optimized out>, extra_open_options=<optimized out>, prepare_func=<optimized out>, operator_func=<optimized out>, view_operator_func=<optimized out>, is_cmd_replicated=<optimized out>)at /test/11.6_dbg/sql/sql_admin.cc:937 #11 0x000056125ce9395f in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x14c378000d58) at /test/11.6_dbg/sql/sql_admin.cc:1694 #12 0x000056125cd08fad in mysql_execute_command (thd=thd@entry=0x14c378000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.6_dbg/sql/sql_parse.cc:5842 #13 0x000056125cd0a1a9 in mysql_parse (thd=thd@entry=0x14c378000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c3c40952a0)at /test/11.6_dbg/sql/sql_parse.cc:7868 #14 0x000056125cd0c56c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c378000d58, packet=packet@entry=0x14c37800b319 "", packet_length=packet_length@entry=18, blocking=blocking@entry=true)at /test/11.6_dbg/sql/sql_class.h:255 #15 0x000056125cd0ea02 in do_command (thd=0x14c378000d58, blocking=blocking@entry=true) at /test/11.6_dbg/sql/sql_parse.cc:1405 #16 0x000056125ce7e863 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5612604dc8b8, put_in_cache=put_in_cache@entry=true)at /test/11.6_dbg/sql/sql_connect.cc:1447 #17 0x000056125ce7eb58 in handle_one_connection (arg=arg@entry=0x5612604dc8b8)at /test/11.6_dbg/sql/sql_connect.cc:1349 #18 0x000056125d2df2ee in pfs_spawn_thread (arg=0x56126044cd18)at /test/11.6_dbg/storage/perfschema/pfs.cc:2201 #19 0x000014c3c5097ada in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444 #20 0x000014c3c512847c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

            Also,

            --source include/have_innodb.inc 
            SET sql_mode='';
            CREATE TEMPORARY TABLE t (c DECIMAL ZEROFILL,c2 INT ZEROFILL,c3 CHAR BINARY,KEY(c)) ENGINE=InnoDB;
            INSERT INTO t VALUES (1,1,1);
            SET SESSION enforce_storage_engine=Aria;
            OPTIMIZE NO_WRITE_TO_BINLOG TABLE t;
            

            Leads to:

            11.6.0 29e9ade269d803b6823ec57808e0b7fad28baf9e (Debug)

            mariadbd: /test/11.6_dbg_san/sql/sql_class.cc:4895: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed.
            

            11.6.0 29e9ade269d803b6823ec57808e0b7fad28baf9e (Debug)

            Core was generated by `/test/UBASAN_MD170624-mariadb-11.6.0-linux-x86_64-dbg/bin/mariadbd --no-default'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
            [Current thread is 1 (LWP 2006881)]
            (gdb) bt
            #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2  __GI___pthread_kill (threadid=<optimized out>, signo=6)at ./nptl/pthread_kill.c:89
            #3  0x0000559a656deb01 in my_write_core (sig=6)at /test/11.6_dbg_san/mysys/stacktrace.c:424
            #4  0x0000559a62a3452f in handle_fatal_signal (sig=<optimized out>)at /test/11.6_dbg_san/sql/signal_handler.cc:357
            #5  <signal handler called>
            #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #7  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #9  0x000014ca93e42866 in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #10 0x000014ca93e268b7 in __GI_abort () at ./stdlib/abort.c:79
            #11 0x000014ca93e267db in __assert_fail_base (fmt=0x14ca93fc5168 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x559a6623e0c0 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x559a66239780 "/test/11.6_dbg_san/sql/sql_class.cc", line=line@entry=4895, function=function@entry=0x559a6623e120 "void thd_progress_init(THD*, uint)") at ./assert/assert.c:92
            #12 0x000014ca93e39186 in __assert_fail (assertion=0x559a6623e0c0 "thd->stmt_arena != thd->progress.arena", file=0x559a66239780 "/test/11.6_dbg_san/sql/sql_class.cc", line=4895, function=0x559a6623e120 "void thd_progress_init(THD*, uint)")at ./assert/assert.c:101
            #13 0x0000559a60e16782 in thd_progress_init (thd=0x62b00015e218, max_stage=1)at /test/11.6_dbg_san/sql/sql_class.cc:4895
            #14 0x0000559a63d88cc2 in ha_maria::analyze (this=0x61d0001faeb8, thd=0x62b00015e218, check_opt=<optimized out>)at /test/11.6_dbg_san/storage/maria/ha_maria.cc:1471
            #15 0x0000559a62a939bd in handler::ha_analyze (this=this@entry=0x61d0001faeb8, thd=thd@entry=0x62b00015e218, check_opt=check_opt@entry=0x62b000163830)at /test/11.6_dbg_san/sql/handler.cc:5478
            #16 0x0000559a61c97dc6 in mysql_admin_table (thd=thd@entry=0x62b00015e218, tables=tables@entry=0x6290000eb350, check_opt=check_opt@entry=0x62b000163830, operator_name=operator_name@entry=0x559a66ea1b80 <msg_optimize>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, no_errors_from_open=<optimized out>, extra_open_options=<optimized out>, prepare_func=<optimized out>, operator_func=<optimized out>, view_operator_func=<optimized out>, is_cmd_replicated=<optimized out>)at /test/11.6_dbg_san/sql/sql_admin.cc:1308
            #17 0x0000559a61c9f39d in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x62b00015e218)at /test/11.6_dbg_san/sql/sql_admin.cc:1669
            #18 0x0000559a611a6109 in mysql_execute_command (thd=thd@entry=0x62b00015e218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.6_dbg_san/sql/sql_parse.cc:5842
            #19 0x0000559a611abf57 in mysql_parse (thd=thd@entry=0x62b00015e218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ca6ff1a810)at /test/11.6_dbg_san/sql/sql_parse.cc:7868
            #20 0x0000559a611bbdc5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62b00015e218, packet=packet@entry=0x62900009b219 "", packet_length=packet_length@entry=35, blocking=blocking@entry=true)at /test/11.6_dbg_san/sql/sql_parse.cc:1892
            #21 0x0000559a611ca936 in do_command (thd=0x62b00015e218, blocking=blocking@entry=true) at /test/11.6_dbg_san/sql/sql_parse.cc:1405
            #22 0x0000559a61c0a8d6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x608000002f38, put_in_cache=put_in_cache@entry=true)at /test/11.6_dbg_san/sql/sql_connect.cc:1447
            #23 0x0000559a61c0bdf1 in handle_one_connection (arg=0x608000002f38)at /test/11.6_dbg_san/sql/sql_connect.cc:1349
            #24 0x000014ca93e97ada in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444
            #25 0x000014ca93f2847c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            

            Roel Roel Van de Paar added a comment - Also, --source include/have_innodb.inc SET sql_mode= '' ; CREATE TEMPORARY TABLE t (c DECIMAL ZEROFILL,c2 INT ZEROFILL,c3 CHAR BINARY , KEY (c)) ENGINE=InnoDB; INSERT INTO t VALUES (1,1,1); SET SESSION enforce_storage_engine=Aria; OPTIMIZE NO_WRITE_TO_BINLOG TABLE t; Leads to: 11.6.0 29e9ade269d803b6823ec57808e0b7fad28baf9e (Debug) mariadbd: /test/11.6_dbg_san/sql/sql_class.cc:4895: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed. 11.6.0 29e9ade269d803b6823ec57808e0b7fad28baf9e (Debug) Core was generated by `/test/UBASAN_MD170624-mariadb-11.6.0-linux-x86_64-dbg/bin/mariadbd --no-default'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44 Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c. [Current thread is 1 (LWP 2006881)] (gdb) bt #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44 #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78 #2 __GI___pthread_kill (threadid=<optimized out>, signo=6)at ./nptl/pthread_kill.c:89 #3 0x0000559a656deb01 in my_write_core (sig=6)at /test/11.6_dbg_san/mysys/stacktrace.c:424 #4 0x0000559a62a3452f in handle_fatal_signal (sig=<optimized out>)at /test/11.6_dbg_san/sql/signal_handler.cc:357 #5 <signal handler called> #6 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44 #7 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78 #8 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89 #9 0x000014ca93e42866 in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26 #10 0x000014ca93e268b7 in __GI_abort () at ./stdlib/abort.c:79 #11 0x000014ca93e267db in __assert_fail_base (fmt=0x14ca93fc5168 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x559a6623e0c0 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x559a66239780 "/test/11.6_dbg_san/sql/sql_class.cc", line=line@entry=4895, function=function@entry=0x559a6623e120 "void thd_progress_init(THD*, uint)") at ./assert/assert.c:92 #12 0x000014ca93e39186 in __assert_fail (assertion=0x559a6623e0c0 "thd->stmt_arena != thd->progress.arena", file=0x559a66239780 "/test/11.6_dbg_san/sql/sql_class.cc", line=4895, function=0x559a6623e120 "void thd_progress_init(THD*, uint)")at ./assert/assert.c:101 #13 0x0000559a60e16782 in thd_progress_init (thd=0x62b00015e218, max_stage=1)at /test/11.6_dbg_san/sql/sql_class.cc:4895 #14 0x0000559a63d88cc2 in ha_maria::analyze (this=0x61d0001faeb8, thd=0x62b00015e218, check_opt=<optimized out>)at /test/11.6_dbg_san/storage/maria/ha_maria.cc:1471 #15 0x0000559a62a939bd in handler::ha_analyze (this=this@entry=0x61d0001faeb8, thd=thd@entry=0x62b00015e218, check_opt=check_opt@entry=0x62b000163830)at /test/11.6_dbg_san/sql/handler.cc:5478 #16 0x0000559a61c97dc6 in mysql_admin_table (thd=thd@entry=0x62b00015e218, tables=tables@entry=0x6290000eb350, check_opt=check_opt@entry=0x62b000163830, operator_name=operator_name@entry=0x559a66ea1b80 <msg_optimize>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, no_errors_from_open=<optimized out>, extra_open_options=<optimized out>, prepare_func=<optimized out>, operator_func=<optimized out>, view_operator_func=<optimized out>, is_cmd_replicated=<optimized out>)at /test/11.6_dbg_san/sql/sql_admin.cc:1308 #17 0x0000559a61c9f39d in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x62b00015e218)at /test/11.6_dbg_san/sql/sql_admin.cc:1669 #18 0x0000559a611a6109 in mysql_execute_command (thd=thd@entry=0x62b00015e218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.6_dbg_san/sql/sql_parse.cc:5842 #19 0x0000559a611abf57 in mysql_parse (thd=thd@entry=0x62b00015e218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ca6ff1a810)at /test/11.6_dbg_san/sql/sql_parse.cc:7868 #20 0x0000559a611bbdc5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62b00015e218, packet=packet@entry=0x62900009b219 "", packet_length=packet_length@entry=35, blocking=blocking@entry=true)at /test/11.6_dbg_san/sql/sql_parse.cc:1892 #21 0x0000559a611ca936 in do_command (thd=0x62b00015e218, blocking=blocking@entry=true) at /test/11.6_dbg_san/sql/sql_parse.cc:1405 #22 0x0000559a61c0a8d6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x608000002f38, put_in_cache=put_in_cache@entry=true)at /test/11.6_dbg_san/sql/sql_connect.cc:1447 #23 0x0000559a61c0bdf1 in handle_one_connection (arg=0x608000002f38)at /test/11.6_dbg_san/sql/sql_connect.cc:1349 #24 0x000014ca93e97ada in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444 #25 0x000014ca93f2847c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

            People

              nikitamalyavin Nikita Malyavin
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.