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

SIGSEGV in mysql_ha_close_table (opt) and in MDL_ticket::has_pending_conflicting_lock (dbg) after HANDLER OPEN

    XMLWordPrintable

Details

    • Q4/2025 Server Maintenance

    Description

      CREATE GLOBAL TEMPORARY TABLE t2 (c INT) ENGINE=MyISAM;
      HANDLER t2 OPEN AS a2;  # ERROR 1180 (HY000): Got error 1 "Operation not permitted" during COMMIT on dbg+opt
      SELECT 1;  # Immediately shows server lost on dbg, on opt it will complete. Opt seems to SIGSEGV on client exit
      

      Leads to:

      MDEV-35915-2 CS 12.0.1 5d52514d536e9d141963f956408ac0efb4958a74 (Optimized, Clang 21.1.0-20250811) Build 06/09/2025

      Core was generated by `/test/MDEV-35915_2_MD060925-mariadb-12.0.1-linux-x86_64-opt/bin/mariadbd --no-d'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000651b97ecd35b in mysql_ha_close_table (handler=0x7e9790023bb0)at /test/bb-12.0-nikita-global-tmp_opt/sql/sql_handler.cc:204
       
      [Current thread is 1 (LWP 1666408)]
      (gdb) bt
      #0  0x0000651b97ecd35b in mysql_ha_close_table (handler=0x7e9790023bb0)at /test/bb-12.0-nikita-global-tmp_opt/sql/sql_handler.cc:204
      #1  0x0000651b97eceaa5 in mysql_ha_cleanup_no_free (thd=thd@entry=0x7e9790000c68)at /test/bb-12.0-nikita-global-tmp_opt/sql/sql_handler.cc:1220
      #2  mysql_ha_cleanup (thd=thd@entry=0x7e9790000c68)at /test/bb-12.0-nikita-global-tmp_opt/sql/sql_handler.cc:1229
      #3  0x0000651b97e568dc in THD::cleanup (this=0x7e9790000c68)at /test/bb-12.0-nikita-global-tmp_opt/sql/sql_class.cc:1687
      #4  0x0000651b97c1f3ee in unlink_thd (thd=0x0, thd@entry=0x7e9790000c68)at /test/bb-12.0-nikita-global-tmp_opt/sql/mysqld.cc:2868
      #5  0x0000651b980612fd in do_handle_one_connection (connect=<optimized out>, connect@entry=0x651b9afaaa18, put_in_cache=true)at /test/bb-12.0-nikita-global-tmp_opt/sql/sql_connect.cc:1425
      #6  0x0000651b9806103f in handle_one_connection (arg=arg@entry=0x651b9afaaa18)at /test/bb-12.0-nikita-global-tmp_opt/sql/sql_connect.cc:1326
      #7  0x0000651b9821f7e9 in pfs_spawn_thread (arg=0x651b9af5a728)at /test/bb-12.0-nikita-global-tmp_opt/storage/perfschema/pfs.cc:2198
      #8  0x00007e98bb69ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #9  0x00007e98bb729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      MDEV-35915-2 CS 12.0.1 f88831afe2e18d124dfeaaf15ac51725a319b8e2 (Debug, Clang 21.1.0-20250811) Build 06/09/2025

      Core was generated by `/test/MDEV-35915_2_MD060925-mariadb-12.0.1-linux-x86_64-dbg/bin/mariadbd --no-d'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  MDL_ticket::has_pending_conflicting_lock (this=0x8f8f8f8f8f8f8f8f)at /test/bb-12.0-nikita-global-tmp_dbg/sql/mdl.cc:3126
       
      [Current thread is 1 (LWP 1676731)]
      (gdb) bt
      #0  MDL_ticket::has_pending_conflicting_lock (this=0x8f8f8f8f8f8f8f8f)at /test/bb-12.0-nikita-global-tmp_dbg/sql/mdl.cc:3126
      #1  0x0000640c3bb0c3a5 in mysql_ha_flush (thd=0x7e64a8000d58)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_handler.cc:1193
      #2  0x0000640c3ba17b8b in open_tables (thd=0x7e64a8000d58, options=@0x7e64a800672c: {m_options = DDL_options_st::OPT_NONE}, start=0x7e65d4b2fc50, counter=0x7e65d4b2fc3c, flags=0, prelocking_strategy=0x7e65d4b2fca0)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_base.cc:4717
      #3  0x0000640c3ba1abba in open_and_lock_tables (thd=0x7e64a8000d58, options=@0x7e64a800672c: {m_options = DDL_options_st::OPT_NONE}, tables=0x0, derived=true, flags=0, prelocking_strategy=0x7e65d4b2fca0)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_base.cc:5781
      #4  0x0000640c3b8ab43e in open_and_lock_tables (thd=0x7e64a8000d58, tables=0x0, derived=true, flags=0)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_base.h:544
      #5  0x0000640c3bb7639a in execute_sqlcom_select (thd=0x7e64a8000d58, all_tables=0x0)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_parse.cc:6091
      #6  0x0000640c3bb6cf65 in mysql_execute_command (thd=0x7e64a8000d58, is_called_from_prepared_stmt=false)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_parse.cc:3958
      #7  0x0000640c3bb65ea8 in mysql_parse (thd=0x7e64a8000d58, rawbuf=0x7e64a8019ef0 "SELECT 1", length=8, parser_state=0x7e65d4b31a10)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_parse.cc:7893
      #8  0x0000640c3bb63689 in dispatch_command (command=COM_QUERY, thd=0x7e64a8000d58, packet=0x7e64a800b269 "SELECT 1", packet_length=8, blocking=true) at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_parse.cc:1881
      #9  0x0000640c3bb6692a in do_command (thd=0x7e64a8000d58, blocking=true)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_parse.cc:1420
      #10 0x0000640c3bd57c1e in do_handle_one_connection (connect=0x640c3f71cea8, put_in_cache=true)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_connect.cc:1414
      #11 0x0000640c3bd57a01 in handle_one_connection (arg=0x640c3f645638)at /test/bb-12.0-nikita-global-tmp_dbg/sql/sql_connect.cc:1326
      #12 0x00007e65d8c9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #13 0x00007e65d8d29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.