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

SIGSEGV in intern_plugin_unlock | plugin_unlock

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
    • 10.4, 10.5, 10.6, 10.11, 11.1
    • None
    • None

    Description

      SET sql_mode='';
      CREATE TABLE t (a INT GENERATED ALWAYS AS (0) VIRTUAL,KEY(a)) ENGINE=MYISAM;
      INSERT INTO t SELECT 0 seq_0_to_0;
      SET GLOBAL gtid_pos_auto_engines='InnoDB,MEMORY';
      INSERT INTO t SELECT 0 seq_0_to_0;
      SET GLOBAL gtid_pos_auto_engines='InnoDB';
      

      Leads to:

      10.4.31 922db0642b6321ece41adb3232c1616812143573 (Debug)

      Core was generated by `/test/MD040723-mariadb-10.4.31-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  intern_plugin_unlock (lex=lex@entry=0x0, 
          plugin=plugin@entry=0x150000000058)
          at /test/10.4_dbg/sql/sql_plugin.cc:1341
      [Current thread is 1 (Thread 0x153e7c106700 (LWP 2056669))]
      (gdb) bt
      #0  intern_plugin_unlock (lex=lex@entry=0x0, plugin=plugin@entry=0x150000000058) at /test/10.4_dbg/sql/sql_plugin.cc:1341
      #1  0x0000564dde01c41d in plugin_unlock (thd=thd@entry=0x0, plugin=0x150000000058) at /test/10.4_dbg/sql/sql_plugin.cc:1391
      #2  0x0000564dddf3dc44 in free_engine_list (list=list@entry=0x153e20083f48) at /test/10.4_dbg/sql/set_var.cc:1422
      #3  0x0000564dde158534 in Sys_var_pluginlist::do_update (newval=<optimized out>, valptr=0x564ddf48a0e0 <opt_gtid_pos_auto_plugins>, this=<optimized out>) at /test/10.4_dbg/sql/sys_vars.inl:1641
      #4  Sys_var_pluginlist::global_update (this=<optimized out>, thd=<optimized out>, var=<optimized out>) at /test/10.4_dbg/sql/sys_vars.inl:1651
      #5  0x0000564dddf3b738 in sys_var::update (this=0x564ddf4a0d80 <Sys_gtid_pos_auto_engines>, thd=0x153e20000d28, var=0x153e20012668) at /test/10.4_dbg/sql/set_var.cc:208
      #6  0x0000564dddf3bc85 in set_var::update (this=<optimized out>, thd=<optimized out>) at /test/10.4_dbg/sql/set_var.cc:837
      #7  0x0000564dddf3ce76 in sql_set_variables (thd=thd@entry=0x153e20000d28, var_list=var_list@entry=0x153e20005a60, free=free@entry=true) at /test/10.4_dbg/sql/set_var.cc:740
      #8  0x0000564dde00c27f in mysql_execute_command (thd=thd@entry=0x153e20000d28) at /test/10.4_dbg/sql/sql_parse.cc:5045
      #9  0x0000564dde01228f in mysql_parse (thd=thd@entry=0x153e20000d28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153e7c1053b0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:8008
      #10 0x0000564dde014daa in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153e20000d28, packet=packet@entry=0x153e20019509 "SET GLOBAL gtid_pos_auto_engines='InnoDB'", packet_length=packet_length@entry=41, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1231
      #11 0x0000564dde0175d5 in do_command (thd=0x153e20000d28) at /test/10.4_dbg/sql/sql_parse.cc:1378
      #12 0x0000564dde1340ed in do_handle_one_connection (connect=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1420
      #13 0x0000564dde1341a9 in handle_one_connection (arg=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1324
      #14 0x0000153e7f48e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x0000153e7f07a133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      11.2.0 a63c558b205fb0805bae813308d1d117c0a51d79 (Optimized)

      Core was generated by `/test/MD060723-mariadb-11.2.0-linux-x86_64-opt/bin/mariadbd --no-defaults --cor'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  plugin_unlock (thd=thd@entry=0x0, plugin=0x5500000000b0)
          at /test/11.2_opt/sql/sql_plugin.cc:1411
       
      warning: Source file is more recent than executable.
      1411	  if (!plugin_dlib(plugin))
      [Current thread is 1 (Thread 0x14a85414b700 (LWP 2057045))]
      (gdb) bt
      #0  plugin_unlock (thd=thd@entry=0x0, plugin=0x5500000000b0) at /test/11.2_opt/sql/sql_plugin.cc:1411
      #1  0x000055d50f9a4fab in free_engine_list (list=<optimized out>) at /test/11.2_opt/sql/set_var.cc:1457
      #2  free_engine_list (list=list@entry=0x14a814061978) at /test/11.2_opt/sql/set_var.cc:1450
      #3  0x000055d50fba8c70 in Sys_var_pluginlist::do_update (this=<optimized out>, newval=<optimized out>, valptr=0x55d510c3f978 <opt_gtid_pos_auto_plugins>) at /test/11.2_opt/sql/sys_vars.inl:1870
      #4  Sys_var_pluginlist::global_update (this=<optimized out>, thd=<optimized out>, var=<optimized out>) at /test/11.2_opt/sql/sys_vars.inl:1880
      #5  0x000055d50f9a2b71 in sys_var::update (this=0x55d510c5cae0 <Sys_gtid_pos_auto_engines>, thd=0x14a814000c58, var=0x14a814010928) at /test/11.2_opt/sql/set_var.cc:207
      #6  0x000055d50f9a303b in set_var::update (this=<optimized out>, thd=<optimized out>) at /test/11.2_opt/sql/set_var.cc:864
      #7  0x000055d50f9a4139 in sql_set_variables (thd=thd@entry=0x14a814000c58, var_list=var_list@entry=0x14a814005c78, free=free@entry=true) at /test/11.2_opt/sql/set_var.cc:746
      #8  0x000055d50fa754ca in mysql_execute_command (thd=0x14a814000c58, is_called_from_prepared_stmt=<optimized out>) at /test/11.2_opt/sql/sql_parse.cc:4803
      #9  0x000055d50fa638c5 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x14a814000c58) at /test/11.2_opt/sql/sql_parse.cc:7774
      #10 mysql_parse (thd=0x14a814000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/11.2_opt/sql/sql_parse.cc:7696
      #11 0x000055d50fa6f942 in dispatch_command (command=COM_QUERY, thd=0x14a814000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/11.2_opt/sql/sql_class.h:1370
      #12 0x000055d50fa7183e in do_command (thd=0x14a814000c58, blocking=blocking@entry=true) at /test/11.2_opt/sql/sql_parse.cc:1405
      #13 0x000055d50fb90e1f in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d511a9b3a8, put_in_cache=put_in_cache@entry=true) at /test/11.2_opt/sql/sql_connect.cc:1416
      #14 0x000055d50fb9110d in handle_one_connection (arg=0x55d511a9b3a8) at /test/11.2_opt/sql/sql_connect.cc:1318
      #15 0x000014a86cfc0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x000014a86cbac133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.31 (dbg), 10.4.31 (opt), 10.5.21 (dbg), 10.5.22 (dbg), 10.5.22 (opt), 10.6.15 (dbg), 10.6.15 (opt), 10.9.8 (dbg), 10.9.8 (opt), 10.10.6 (dbg), 10.10.6 (opt), 10.11.4 (opt), 10.11.5 (dbg), 10.11.5 (opt), 11.0.2 (dbg), 11.0.2 (opt), 11.0.3 (dbg), 11.0.3 (opt), 11.1.2 (dbg), 11.1.2 (opt), 11.2.0 (dbg), 11.2.0 (opt)

      Attachments

        Activity

          People

            cvicentiu Vicențiu Ciorbaru
            ramesh Ramesh Sivaraman
            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.