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

SIGSEGV in wait_while_table_is_used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7
    • Fix Version/s: 10.3, 10.4, 10.5, 10.6
    • Component/s: None
    • Labels:

      Description

      SET SESSION SQL_MODE='';
      CREATE TABLE t (c1 int) ;
      SET max_session_mem_used=50000;
      ALTER TABLE t ADD INDEX (c1);
      LOCK TABLE t WRITE;
      CREATE OR REPLACE SEQUENCE t;
      

      Leads to:

      10.7.1 5cc9cf9a05582307abefd8f3b57548945da86b1a (Optimized)

      Core was generated by `/test/MD111021-mariadb-10.7.1-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00005555ccbe20ae in wait_while_table_is_used (thd=thd@entry=
          0x151d08000c58, table=0x0, function=function@entry=HA_EXTRA_NOT_USED)
          at /test/10.7_opt/sql/sql_base.cc:1313
      1313	  if (thd->mdl_context.upgrade_shared_lock(
      [Current thread is 1 (Thread 0x151d6849f700 (LWP 683480))]
      (gdb) bt
      #0  0x00005555ccbe20ae in wait_while_table_is_used (thd=thd@entry=0x151d08000c58, table=0x0, function=function@entry=HA_EXTRA_NOT_USED) at /test/10.7_opt/sql/sql_base.cc:1313
      #1  0x00005555cccf751f in mysql_rm_table_no_locks (thd=0x151d08000c58, tables=<optimized out>, current_db=<optimized out>, ddl_log_state=<optimized out>, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_view=<optimized out>, drop_sequence=<optimized out>, dont_log_query=<optimized out>, dont_free_locks=<optimized out>) at /test/10.7_opt/sql/sql_table.cc:1432
      #2  0x00005555ccd0705c in mysql_create_table_no_lock (thd=thd@entry=0x151d08000c58, ddl_log_state_create=ddl_log_state_create@entry=0x151d6849da40, ddl_log_state_rm=ddl_log_state_rm@entry=0x151d6849da60, db=db@entry=0x151d080108a0, table_name=table_name@entry=0x151d080108b0, create_info=create_info@entry=0x151d6849dc90, alter_info=0x151d6849dba0, is_trans=0x151d6849da3f, create_table_mode=0, table_list=0x151d08010888) at /test/10.7_opt/sql/handler.h:2254
      #3  0x00005555ccd07349 in mysql_create_table (thd=thd@entry=0x151d08000c58, create_table=create_table@entry=0x151d08010888, create_info=create_info@entry=0x151d6849dc90, alter_info=alter_info@entry=0x151d6849dba0) at /test/10.7_opt/sql/sql_table.cc:4658
      #4  0x00005555ccd08c29 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x151d08000c58) at /test/10.7_opt/sql/sql_table.cc:11773
      #5  0x00005555ccc57d8e in mysql_execute_command (thd=0x151d08000c58, is_called_from_prepared_stmt=<optimized out>) at /test/10.7_opt/sql/sql_parse.cc:5989
      #6  0x00005555ccc47f26 in mysql_parse (thd=0x151d08000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.7_opt/sql/sql_parse.cc:8028
      #7  0x00005555ccc53fad in dispatch_command (command=COM_QUERY, thd=0x151d08000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.7_opt/sql/sql_class.h:1358
      #8  0x00005555ccc55ea8 in do_command (thd=0x151d08000c58, blocking=blocking@entry=true) at /test/10.7_opt/sql/sql_parse.cc:1402
      #9  0x00005555ccd71d07 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.7_opt/sql/sql_connect.cc:1418
      #10 0x00005555ccd7204d in handle_one_connection (arg=arg@entry=0x5555cf0e9e08) at /test/10.7_opt/sql/sql_connect.cc:1312
      #11 0x00005555cd0c76e3 in pfs_spawn_thread (arg=0x5555cf101e28) at /test/10.7_opt/storage/perfschema/pfs.cc:2201
      #12 0x0000151d69de7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #13 0x0000151d699d6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.1 (dbg), 10.7.1 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt)

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration