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

SIGSEGV in HA_CREATE_INFO::finalize_locked_tables

    XMLWordPrintable

    Details

      Description

      SET sql_mode='';
      CREATE TABLE t (c INT) ENGINE=InnoDB;
      ALTER TABLE mysql.innodb_index_stats MODIFY stat_description CHAR(10);
      LOCK TABLE t WRITE;
      CREATE OR REPLACE TABLE t (c INT);
      

      Leads to:

      10.11.0 8f9df08f02294f4828d40ef0a298dc0e72b01f60 (Debug)

      Core was generated by `/test/MD130922-mariadb-10.11.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000560c13360363 in HA_CREATE_INFO::finalize_locked_tables (
          this=this@entry=0x14ec98c090f0, thd=thd@entry=0x14ec5c000d48, 
          operation_failed=operation_failed@entry=true)
          at /test/10.11_dbg/sql/sql_table.cc:4544
      4544	    table->mdl_ticket->downgrade_lock(MDL_SHARED_NO_READ_WRITE);
      [Current thread is 1 (Thread 0x14ec98c0c700 (LWP 1187004))]
      (gdb) bt
      #0  0x0000560c13360363 in HA_CREATE_INFO::finalize_locked_tables (this=this@entry=0x14ec98c090f0, thd=thd@entry=0x14ec5c000d48, operation_failed=operation_failed@entry=true) at /test/10.11_dbg/sql/sql_table.cc:4544
      #1  0x0000560c13371aff in mysql_create_table (alter_info=0x14ec98c08f10, create_info=0x14ec98c090f0, create_table=<optimized out>, thd=0x14ec5c000d48) at /test/10.11_dbg/sql/sql_table.cc:5302
      #2  Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14ec5c000d48) at /test/10.11_dbg/sql/sql_table.cc:12797
      #3  0x0000560c13297a7b in mysql_execute_command (thd=thd@entry=0x14ec5c000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:5997
      #4  0x0000560c1328003c in mysql_parse (thd=thd@entry=0x14ec5c000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ec98c0b330) at /test/10.11_dbg/sql/sql_parse.cc:8037
      #5  0x0000560c1328d66d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14ec5c000d48, packet=packet@entry=0x14ec5c00aed9 "CREATE OR REPLACE TABLE t (id INT,s DATE,e DATE,PERIOD FOR p (s,e),PRIMARY KEY(id,p WITHOUT OVERLAPS)) PARTITION BY HASH (id)", packet_length=packet_length@entry=125, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1345
      #6  0x0000560c1328fd97 in do_command (thd=0x14ec5c000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
      #7  0x0000560c133f3fb8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x560c16a7b608, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1418
      #8  0x0000560c133f44c1 in handle_one_connection (arg=0x560c16a7b608) at /test/10.11_dbg/sql/sql_connect.cc:1312
      #9  0x000014ecb1e79609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #10 0x000014ecb1a65133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.11.0 8f9df08f02294f4828d40ef0a298dc0e72b01f60 (Optimized)

      Core was generated by `/test/MD130922-mariadb-10.11.0-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000563f4ccae7bd in HA_CREATE_INFO::finalize_locked_tables (thd=
          0x147948000c58, operation_failed=<optimized out>, this=0x147985c52250)
          at /test/10.11_opt/sql/sql_table.cc:4544
      4544	    table->mdl_ticket->downgrade_lock(MDL_SHARED_NO_READ_WRITE);
      [Current thread is 1 (Thread 0x147985c55700 (LWP 1289549))]
      (gdb) bt
      #0  0x0000563f4ccae7bd in HA_CREATE_INFO::finalize_locked_tables (thd=0x147948000c58, operation_failed=<optimized out>, this=0x147985c52250) at /test/10.11_opt/sql/sql_table.cc:4544
      #1  HA_CREATE_INFO::finalize_locked_tables (this=0x147985c52250, thd=0x147948000c58, operation_failed=<optimized out>) at /test/10.11_opt/sql/sql_table.cc:4519
      #2  0x0000563f4ccbee2f in mysql_create_table (alter_info=0x147985c52070, create_info=0x147985c52250, create_table=<optimized out>, thd=0x147948000c58) at /test/10.11_opt/sql/sql_table.cc:5302
      #3  Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x147948000c58) at /test/10.11_opt/sql/sql_table.cc:12797
      #4  0x0000563f4cc056d6 in mysql_execute_command (thd=0x147948000c58, is_called_from_prepared_stmt=<optimized out>) at /test/10.11_opt/sql/sql_parse.cc:5997
      #5  0x0000563f4cbf6055 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x147948000c58) at /test/10.11_opt/sql/sql_parse.cc:8037
      #6  mysql_parse (thd=0x147948000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.11_opt/sql/sql_parse.cc:7959
      #7  0x0000563f4cc01bba in dispatch_command (command=COM_QUERY, thd=0x147948000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.11_opt/sql/sql_class.h:1345
      #8  0x0000563f4cc03b02 in do_command (thd=0x147948000c58, blocking=blocking@entry=true) at /test/10.11_opt/sql/sql_parse.cc:1407
      #9  0x0000563f4cd1cfcf in do_handle_one_connection (connect=<optimized out>, connect@entry=0x563f4f8f6398, put_in_cache=put_in_cache@entry=true) at /test/10.11_opt/sql/sql_connect.cc:1418
      #10 0x0000563f4cd1d2ad in handle_one_connection (arg=0x563f4f8f6398) at /test/10.11_opt/sql/sql_connect.cc:1312
      #11 0x000014799eea4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #12 0x000014799ea90133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              midenok Aleksey Midenkov
              Reporter:
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration

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