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

SIGSEGV in ha_myisammrg::append_create_info

    XMLWordPrintable

Details

    Description

      CREATE TEMPORARY TABLE t (c INT) ENGINE=mrg_myisam UNION=(t,t2) insert_method=FIRST;
      CREATE TABLE t2 LIKE t;
      

      Leads to:

      10.6.1 370b310b1d67ad42df96b75c3876fdcf67a8694f (Optimized)

      Core was generated by `/test/GAL_MD120521-mariadb-10.6.1-linux-x86_64-opt/bin/mysqld --defaults-file=/'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14feac458700 (LWP 4176134))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055d9ec3436df in my_write_core (sig=sig@entry=11) at /test/10.6_opt/mysys/stacktrace.c:424
      #2  0x000055d9ebdc33c0 in handle_fatal_signal (sig=11) at /test/10.6_opt/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  0x000055d9ec3b34f4 in ha_myisammrg::append_create_info (this=0x14fe4c01ba60, packet=0x14feac4545a0) at /test/10.6_opt/storage/myisammrg/ha_myisammrg.cc:1607
      #5  0x000055d9ebc27a55 in add_table_options (thd=thd@entry=0x14fe4c000c58, table=table@entry=0x55d9eea78ea8, create_info_arg=create_info_arg@entry=0x0, schema_table=<optimized out>, sequence=sequence@entry=false, packet=packet@entry=0x14feac4545a0) at /test/10.6_opt/sql/sql_show.cc:1921
      #6  0x000055d9ebc297e6 in show_create_table_ex (thd=<optimized out>, table_list=<optimized out>, force_db=<optimized out>, force_name=<optimized out>, packet=0x14feac4545a0, create_info_arg=<optimized out>, with_db_name=<optimized out>) at /test/10.6_opt/sql/sql_show.cc:2417
      #7  0x000055d9ebc29abd in show_create_table (thd=thd@entry=0x14fe4c000c58, table_list=table_list@entry=0x14feac4545c0, packet=packet@entry=0x14feac4545a0, create_info_arg=create_info_arg@entry=0x0, with_db_name=with_db_name@entry=WITH_DB_NAME) at /test/10.6_opt/sql/sql_show.cc:1993
      #8  0x000055d9ec0b0c1f in wsrep_create_like_table (thd=thd@entry=0x14fe4c000c58, table=table@entry=0x14fe4c010968, src_table=src_table@entry=0x14fe4c011080, create_info=create_info@entry=0x14feac456c90) at /test/10.6_opt/sql/wsrep_mysqld.cc:3271
      #9  0x000055d9ebc5aff5 in mysql_create_like_table (thd=0x14fe4c000c58, table=0x14fe4c010968, src_table=0x14fe4c011080, create_info=0x14feac456c90) at /test/10.6_opt/sql/sql_table.cc:6268
      #10 0x000055d9ebc5b973 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14fe4c000c58) at /test/10.6_opt/sql/sql_table.cc:12271
      #11 0x000055d9ebbb846e in mysql_execute_command (thd=0x14fe4c000c58) at /test/10.6_opt/sql/sql_parse.cc:5986
      #12 0x000055d9ebba8865 in mysql_parse (thd=0x14fe4c000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:8018
      #13 0x000055d9ebba82b6 in wsrep_mysql_parse (thd=0x14fe4c000c58, rawbuf=0x14fe4c010880 "CREATE TABLE t2 LIKE t", length=22, parser_state=0x14feac457440) at /test/10.6_opt/sql/sql_parse.cc:7832
      #14 0x000055d9ebbb5d86 in dispatch_command (command=COM_QUERY, thd=0x14fe4c000c58, packet=0x14fe4c0084e9 "CREATE TABLE t2 LIKE t", packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1333
      #15 0x000055d9ebbb68a8 in do_command (thd=0x14fe4c000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1406
      #16 0x000055d9ebcba157 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1410
      #17 0x000055d9ebcba4bd in handle_one_connection (arg=arg@entry=0x55d9eeacfc88) at /test/10.6_opt/sql/sql_connect.cc:1312
      #18 0x000055d9ec03cabd in pfs_spawn_thread (arg=0x55d9eead0558) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #19 0x000014febfb95609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x000014febf784293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.11 4d53a7585c532c2cfcea184259e3153f95b35683 (Optimized)

      Core was generated by `/test/GAL_MD120521-mariadb-10.5.11-linux-x86_64-opt/bin/mysqld --defaults-file='.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14ef04dda700 (LWP 4174889))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005635df5815bf in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:424
      #2  0x00005635defa9c80 in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  0x00005635df5f2504 in ha_myisammrg::append_create_info (this=0x14eea4027400, packet=0x14ef04dd6550) at /test/10.5_opt/storage/myisammrg/ha_myisammrg.cc:1607
      #5  0x00005635dee0cc15 in add_table_options (thd=thd@entry=0x14eea4000c58, table=table@entry=0x5635e2772648, create_info_arg=create_info_arg@entry=0x0, schema_table=<optimized out>, sequence=sequence@entry=false, packet=packet@entry=0x14ef04dd6550) at /test/10.5_opt/sql/sql_show.cc:1921
      #6  0x00005635dee0e9d7 in show_create_table_ex (thd=<optimized out>, table_list=<optimized out>, force_db=<optimized out>, force_name=<optimized out>, packet=0x14ef04dd6550, create_info_arg=<optimized out>, with_db_name=<optimized out>) at /test/10.5_opt/sql/sql_show.cc:2417
      #7  0x00005635dee0ec5d in show_create_table (thd=thd@entry=0x14eea4000c58, table_list=table_list@entry=0x14ef04dd6570, packet=packet@entry=0x14ef04dd6550, create_info_arg=create_info_arg@entry=0x0, with_db_name=with_db_name@entry=WITH_DB_NAME) at /test/10.5_opt/sql/sql_show.cc:1993
      #8  0x00005635df2a07ef in wsrep_create_like_table (thd=thd@entry=0x14eea4000c58, table=table@entry=0x14eea40104d8, src_table=src_table@entry=0x14eea4010be8, create_info=create_info@entry=0x14ef04dd8bf0) at /test/10.5_opt/sql/wsrep_mysqld.cc:2935
      #9  0x00005635dee404e5 in mysql_create_like_table (thd=0x14eea4000c58, table=0x14eea40104d8, src_table=0x14eea4010be8, create_info=0x14ef04dd8bf0) at /test/10.5_opt/sql/sql_table.cc:6269
      #10 0x00005635dee40e63 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14eea4000c58) at /test/10.5_opt/sql/sql_table.cc:12166
      #11 0x00005635ded9c736 in mysql_execute_command (thd=0x14eea4000c58) at /test/10.5_opt/sql/sql_parse.cc:6055
      #12 0x00005635ded8bd2f in mysql_parse (thd=thd@entry=0x14eea4000c58, rawbuf=rawbuf@entry=0x14eea40103f0 "CREATE TABLE t2 LIKE t", length=length@entry=22, parser_state=parser_state@entry=0x14ef04dd9400, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:8099
      #13 0x00005635ded8b73c in wsrep_mysql_parse (thd=0x14eea4000c58, rawbuf=0x14eea40103f0 "CREATE TABLE t2 LIKE t", length=22, parser_state=0x14ef04dd9400, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7902
      #14 0x00005635ded99ccf in dispatch_command (command=COM_QUERY, thd=0x14eea4000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_class.h:1271
      #15 0x00005635ded9abcc in do_command (thd=0x14eea4000c58) at /test/10.5_opt/sql/sql_parse.cc:1370
      #16 0x00005635deea0951 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5635e276e218, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1410
      #17 0x00005635deea0dcd in handle_one_connection (arg=arg@entry=0x5635e276e218) at /test/10.5_opt/sql/sql_connect.cc:1312
      #18 0x00005635df22c676 in pfs_spawn_thread (arg=0x5635e27c9ab8) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
      #19 0x000014ef1750c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x000014ef170fb293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.20 b2bb747f8cf56cf01dc571ffd8be195b95f0c0e8 (Optimized)

      Core was generated by `/test/GAL_MD120521-mariadb-10.4.20-linux-x86_64-opt/bin/mysqld --defaults-file='.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1460f61ec700 (LWP 4178085))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000557cf51b75cf in my_write_core (sig=sig@entry=11) at /test/10.4_opt/mysys/stacktrace.c:386
      #2  0x0000557cf4bc0c08 in handle_fatal_signal (sig=11) at /test/10.4_opt/sql/signal_handler.cc:356
      #3  <signal handler called>
      #4  0x0000557cf508de4d in ha_myisammrg::append_create_info (this=0x1460b4027fd0, packet=0x1460f61e72e0) at /test/10.4_opt/storage/myisammrg/ha_myisammrg.cc:1604
      #5  0x0000557cf4a0c665 in add_table_options (thd=thd@entry=0x1460b4000c48, table=table@entry=0x1460b40271d8, create_info_arg=create_info_arg@entry=0x0, schema_table=<optimized out>, sequence=sequence@entry=false, packet=packet@entry=0x1460f61e72e0) at /test/10.4_opt/sql/sql_show.cc:2032
      #6  0x0000557cf4a0dfdb in show_create_table (thd=thd@entry=0x1460b4000c48, table_list=table_list@entry=0x1460f61e7300, packet=packet@entry=0x1460f61e72e0, create_info_arg=create_info_arg@entry=0x0, with_db_name=with_db_name@entry=WITH_DB_NAME) at /test/10.4_opt/sql/sql_show.cc:2494
      #7  0x0000557cf4b30ef4 in wsrep_create_like_table (thd=thd@entry=0x1460b4000c48, table=table@entry=0x1460b40100d8, src_table=src_table@entry=0x1460b40107d8, create_info=create_info@entry=0x1460f61e9920) at /test/10.4_opt/sql/wsrep_mysqld.cc:2711
      #8  0x0000557cf4a3ed75 in mysql_create_like_table (thd=0x1460b4000c48, table=0x1460b40100d8, src_table=0x1460b40107d8, create_info=0x1460f61e9920) at /test/10.4_opt/sql/sql_table.cc:6001
      #9  0x0000557cf4a3f6e3 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x1460b4000c48) at /test/10.4_opt/sql/sql_table.cc:11566
      #10 0x0000557cf4998480 in mysql_execute_command (thd=0x1460b4000c48) at /test/10.4_opt/sql/sql_parse.cc:6192
      #11 0x0000557cf499f4e3 in mysql_parse (thd=thd@entry=0x1460b4000c48, rawbuf=rawbuf@entry=0x1460b400fff0 "CREATE TABLE t2 LIKE t", length=length@entry=22, parser_state=parser_state@entry=0x1460f61eb4c0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_opt/sql/sql_parse.cc:7995
      #12 0x0000557cf499fe48 in wsrep_mysql_parse (thd=0x1460b4000c48, rawbuf=0x1460b400fff0 "CREATE TABLE t2 LIKE t", length=22, parser_state=0x1460f61eb4c0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7799
      #13 0x0000557cf49a3483 in dispatch_command (command=COM_QUERY, thd=0x1460b4000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_class.h:1184
      #14 0x0000557cf49a3c40 in do_command (thd=0x1460b4000c48) at /test/10.4_opt/sql/sql_parse.cc:1373
      #15 0x0000557cf4a97d0e in do_handle_one_connection (connect=connect@entry=0x557cf77a0128) at /test/10.4_opt/sql/sql_connect.cc:1412
      #16 0x0000557cf4a97e2f in handle_one_connection (arg=0x557cf77a0128) at /test/10.4_opt/sql/sql_connect.cc:1316
      #17 0x000014613b03e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #18 0x000014613ac2d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3.30 1447b39475d2900066e0d058cee9b3fa6aec5016 (Optimized)

      Core was generated by `/test/GAL_MD120521-mariadb-10.3.30-linux-x86_64-opt/bin/mysqld --defaults-file='.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1520bc10f700 (LWP 4177041))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000562484e8e0bf in my_write_core (sig=sig@entry=11) at /test/10.3_opt/mysys/stacktrace.c:386
      #2  0x0000562484926c68 in handle_fatal_signal (sig=11) at /test/10.3_opt/sql/signal_handler.cc:355
      #3  <signal handler called>
      #4  0x0000562484dd10fd in ha_myisammrg::append_create_info (this=0x15204801c0f0, packet=0x1520bc10a560) at /test/10.3_opt/storage/myisammrg/ha_myisammrg.cc:1604
      #5  0x0000562484799fc5 in add_table_options (thd=thd@entry=0x152048000c48, table=table@entry=0x15204801a7d8, create_info_arg=create_info_arg@entry=0x0, schema_table=<optimized out>, sequence=sequence@entry=false, packet=packet@entry=0x1520bc10a560) at /test/10.3_opt/sql/sql_show.cc:2041
      #6  0x000056248479b7c8 in show_create_table (thd=thd@entry=0x152048000c48, table_list=table_list@entry=0x1520bc10a580, packet=packet@entry=0x1520bc10a560, create_info_arg=create_info_arg@entry=0x0, with_db_name=with_db_name@entry=WITH_DB_NAME) at /test/10.3_opt/sql/sql_show.cc:2470
      #7  0x000056248489f6d4 in wsrep_create_like_table (thd=thd@entry=0x152048000c48, table=table@entry=0x15204800f758, src_table=src_table@entry=0x15204800fdf0, create_info=create_info@entry=0x1520bc10cae0) at /test/10.3_opt/sql/wsrep_mysqld.cc:2853
      #8  0x00005624847ca003 in mysql_create_like_table (thd=0x152048000c48, table=0x15204800f758, src_table=0x15204800fdf0, create_info=0x1520bc10cae0) at /test/10.3_opt/sql/sql_table.cc:5982
      #9  0x00005624847ca8a9 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x152048000c48) at /test/10.3_opt/sql/sql_table.cc:11353
      #10 0x000056248472bd10 in mysql_execute_command (thd=<optimized out>) at /test/10.3_opt/sql/sql_parse.cc:6078
      #11 0x0000562484732d63 in mysql_parse (thd=thd@entry=0x152048000c48, rawbuf=rawbuf@entry=0x15204800f670 "CREATE TABLE t2 LIKE t", length=length@entry=22, parser_state=parser_state@entry=0x1520bc10e540, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_opt/sql/sql_parse.cc:7873
      #12 0x000056248473380a in wsrep_mysql_parse (thd=0x152048000c48, rawbuf=0x15204800f670 "CREATE TABLE t2 LIKE t", length=22, parser_state=0x1520bc10e540, is_com_multi=false, is_next_command=false) at /test/10.3_opt/sql/sql_parse.cc:7665
      #13 0x00005624847354d1 in dispatch_command (command=COM_QUERY, thd=0x152048000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.3_opt/sql/sql_parse.cc:1938
      #14 0x000056248473711d in do_command (thd=0x152048000c48) at /test/10.3_opt/sql/sql_parse.cc:1398
      #15 0x000056248481f5d6 in do_handle_one_connection (connect=connect@entry=0x56248812d588) at /test/10.3_opt/sql/sql_connect.cc:1403
      #16 0x000056248481f7af in handle_one_connection (arg=0x56248812d588) at /test/10.3_opt/sql/sql_connect.cc:1308
      #17 0x00001520cd056609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #18 0x00001520ccf7d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.39 (opt), 10.3.30 (opt), 10.4.20 (opt), 10.5.11 (opt), 10.6.1 (opt)

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.