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

Server crashes while executing REPAIR VIEW that created from information_schema.tables

    XMLWordPrintable

    Details

      Description

      CREATE VIEW v1 AS SELECT table_name FROM information_schema.tables;
      REPAIR VIEW v1;
      

      Leads to

      10.6.0 8751aa7397b2e698fa0b46ec3e60abb9e2fd7e1b (Optimized)

      Core was generated by `/test/GAL_MD200421-mariadb-10.6.0-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 0x148284c39700 (LWP 1830899))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000562b5d2a168f in my_write_core (sig=sig@entry=11) at /test/10.6_opt/mysys/stacktrace.c:424
      #2  0x0000562b5cd20190 in handle_fatal_signal (sig=11) at /test/10.6_opt/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  0x0000562b5cb41f67 in TABLE_SHARE::period_info_t::start_field (this=0x14824801b758, s=0x14824801b340) at /test/10.6_opt/sql/table.h:901
      #5  period_get_condition (thd=0x148248000c58, table=0x148248013370, select=0x148248012c90, conds=0x148248013980, timestamp=false) at /test/10.6_opt/sql/sql_select.cc:785
      #6  0x0000562b5cb4574f in st_select_lex::vers_setup_conds (this=0x148248012c90, thd=0x148248000c58, tables=<optimized out>) at /test/10.6_opt/sql/sql_select.cc:1085
      #7  0x0000562b5cb6c40d in JOIN::prepare (this=this@entry=0x148248015608, tables_init=<optimized out>, conds_init=<optimized out>, og_num=0, order_init=0x0, skip_order_by=<optimized out>, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x148248012c90, unit_arg=0x148248011140) at /test/10.6_opt/sql/sql_select.cc:1178
      #8  0x0000562b5cbccdcb in st_select_lex_unit::prepare_join (this=0x148248011140, thd_arg=0x148248000c58, sl=0x148248012c90, tmp_result=0x148248015528, additional_options=<optimized out>, is_union_select=<optimized out>) at /test/10.6_opt/sql/sql_union.cc:1088
      #9  0x0000562b5cbd021c in st_select_lex_unit::prepare (this=this@entry=0x148248011140, derived_arg=derived_arg@entry=0x148248010570, sel_result=sel_result@entry=0x148248015528, additional_options=additional_options@entry=0) at /test/10.6_opt/sql/sql_union.cc:1481
      #10 0x0000562b5cad46f4 in mysql_derived_prepare (thd=0x148248000c58, lex=<optimized out>, derived=0x148248010570) at /test/10.6_opt/sql/sql_derived.cc:817
      #11 0x0000562b5cad35e9 in mysql_handle_derived (lex=0x148248004ba8, phases=phases@entry=2) at /test/10.6_opt/sql/sql_derived.cc:126
      #12 0x0000562b5cab1a9c in open_and_lock_tables (thd=thd@entry=0x148248000c58, options=<optimized out>, tables=<optimized out>, tables@entry=0x148248010570, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x148284c376c0) at /test/10.6_opt/sql/sql_base.cc:5257
      #13 0x0000562b5cc26050 in open_and_lock_tables (flags=0, derived=true, tables=0x148248010570, thd=0x148248000c58) at /test/10.6_opt/sql/sql_base.h:507
      #14 open_only_one_table (thd=0x148248000c58, table=0x148248010570, repair_table_use_frm=<optimized out>, is_view_operator_func=<optimized out>) at /test/10.6_opt/sql/sql_admin.cc:405
      #15 0x0000562b5cc27218 in mysql_admin_table (thd=<optimized out>, tables=0x148248010570, check_opt=0x148248005f28, operator_name=0x562b5d5e5e53 "repair", lock_type=TL_WRITE, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x562b5cc26340 <prepare_for_repair(THD*, TABLE_LIST*, HA_CHECK_OPT*)>, operator_func=<optimized out>, view_operator_func=0x562b5cbdd900 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /test/10.6_opt/sql/sql_admin.cc:580
      #16 0x0000562b5cc297de in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x148248000c58) at /test/10.6_opt/sql/sql_admin.cc:1482
      #17 0x0000562b5cb1a81e in mysql_execute_command (thd=0x148248000c58) at /test/10.6_opt/sql/sql_parse.cc:5986
      #18 0x0000562b5cb0ac45 in mysql_parse (thd=0x148248000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:8017
      #19 0x0000562b5cb0a696 in wsrep_mysql_parse (thd=0x148248000c58, rawbuf=0x1482480104c0 "REPAIR VIEW v1", length=14, parser_state=0x148284c38440) at /test/10.6_opt/sql/sql_parse.cc:7831
      #20 0x0000562b5cb18139 in dispatch_command (command=COM_QUERY, thd=0x148248000c58, packet=0x148248008129 "", packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1331
      #21 0x0000562b5cb18c58 in do_command (thd=0x148248000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1406
      #22 0x0000562b5cc1b517 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1410
      #23 0x0000562b5cc1b87d in handle_one_connection (arg=arg@entry=0x562b5fe17128) at /test/10.6_opt/sql/sql_connect.cc:1312
      #24 0x0000562b5cf999c6 in pfs_spawn_thread (arg=0x562b5fe2a818) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #25 0x00001482ba6dd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x00001482ba2cc293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5 and 10.4 crashing with different stack.

      10.5.10 675c22c065110be03a5fab82442d2c3dc32aefff (Optimized)

      Core was generated by `/test/GAL_MD200421-mariadb-10.5.10-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 0x1509100f9700 (LWP 1901907))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055b2655a1eef in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:424
      #2  0x000055b264fcaf60 in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  setup_table_map (tablenr=0, table_list=0x1508b4013278, table=0x1508b401f190) at /test/10.5_opt/sql/sql_base.h:359
      #5  setup_tables (thd=0x1508b4000c58, context=0x1508b4012bf8, from_clause=0x1508b4012d68, tables=0x1508b4013278, leaves=<optimized out>, select_insert=<optimized out>, full_table_list=false) at /test/10.5_opt/sql/sql_base.cc:7820
      #6  0x000055b264d55a54 in setup_tables_and_check_access (thd=0x1508b4000c58, context=<optimized out>, from_clause=<optimized out>, tables=0x1508b4013278, leaves=@0x1508b4012de0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1508b4015a88, last = 0x1508b4015a88, elements = 1}, <No data fields>}, select_insert=select_insert@entry=false, want_access_first=SELECT_ACL, want_access=SELECT_ACL, full_table_list=false) at /test/10.5_opt/sql/sql_base.cc:7928
      #7  0x000055b264e11547 in JOIN::prepare (this=this@entry=0x1508b4015510, tables_init=<optimized out>, conds_init=<optimized out>, og_num=0, order_init=0x0, skip_order_by=<optimized out>, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x1508b4012ba0, unit_arg=0x1508b4011070) at /test/10.5_opt/sql/sql_select.cc:1171
      #8  0x000055b264e7298b in st_select_lex_unit::prepare_join (this=0x1508b4011070, thd_arg=0x1508b4000c58, sl=0x1508b4012ba0, tmp_result=0x1508b4015430, additional_options=<optimized out>, is_union_select=<optimized out>) at /test/10.5_opt/sql/sql_union.cc:1088
      #9  0x000055b264e75ddc in st_select_lex_unit::prepare (this=this@entry=0x1508b4011070, derived_arg=derived_arg@entry=0x1508b40104a0, sel_result=sel_result@entry=0x1508b4015430, additional_options=additional_options@entry=0) at /test/10.5_opt/sql/sql_union.cc:1481
      #10 0x000055b264d76704 in mysql_derived_prepare (thd=0x1508b4000c58, lex=<optimized out>, derived=0x1508b40104a0) at /test/10.5_opt/sql/sql_derived.cc:817
      #11 0x000055b264d755f9 in mysql_handle_derived (lex=0x1508b4004b80, phases=phases@entry=2) at /test/10.5_opt/sql/sql_derived.cc:126
      #12 0x000055b264d534ac in open_and_lock_tables (thd=thd@entry=0x1508b4000c58, options=<optimized out>, tables=<optimized out>, tables@entry=0x1508b40104a0, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x1509100f7620) at /test/10.5_opt/sql/sql_base.cc:5231
      #13 0x000055b264ecd4c0 in open_and_lock_tables (flags=0, derived=true, tables=0x1508b40104a0, thd=0x1508b4000c58) at /test/10.5_opt/sql/sql_base.h:507
      #14 open_only_one_table (thd=0x1508b4000c58, table=0x1508b40104a0, repair_table_use_frm=<optimized out>, is_view_operator_func=<optimized out>) at /test/10.5_opt/sql/sql_admin.cc:405
      #15 0x000055b264ece688 in mysql_admin_table (thd=<optimized out>, tables=0x1508b40104a0, check_opt=0x1508b4005ef8, operator_name=0x55b2658e6b93 "repair", lock_type=TL_WRITE, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x55b264ecd7b0 <prepare_for_repair(THD*, TABLE_LIST*, HA_CHECK_OPT*)>, operator_func=<optimized out>, view_operator_func=0x55b264e83520 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /test/10.5_opt/sql/sql_admin.cc:580
      #16 0x000055b264ed0c4e in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x1508b4000c58) at /test/10.5_opt/sql/sql_admin.cc:1482
      #17 0x000055b264dbe956 in mysql_execute_command (thd=0x1508b4000c58) at /test/10.5_opt/sql/sql_parse.cc:6055
      #18 0x000055b264dadf4f in mysql_parse (thd=thd@entry=0x1508b4000c58, rawbuf=rawbuf@entry=0x1508b40103f0 "REPAIR VIEW v1", length=length@entry=14, parser_state=parser_state@entry=0x1509100f8400, 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
      #19 0x000055b264dad95c in wsrep_mysql_parse (thd=0x1508b4000c58, rawbuf=0x1508b40103f0 "REPAIR VIEW v1", length=14, parser_state=0x1509100f8400, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7902
      #20 0x000055b264dbbeef in dispatch_command (command=COM_QUERY, thd=0x1508b4000c58, 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:1270
      #21 0x000055b264dbcdec in do_command (thd=0x1508b4000c58) at /test/10.5_opt/sql/sql_parse.cc:1370
      #22 0x000055b264ec2101 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b26866df18, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1410
      #23 0x000055b264ec257d in handle_one_connection (arg=arg@entry=0x55b26866df18) at /test/10.5_opt/sql/sql_connect.cc:1312
      #24 0x000055b26524d5b6 in pfs_spawn_thread (arg=0x55b267f4cdf8) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
      #25 0x00001509228a7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x0000150922496293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.19 031f11717d9f351dfb12cd27c225c533e289261a (Optimized)

      Core was generated by `/test/GAL_MD200421-mariadb-10.4.19-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 0x146c24075700 (LWP 2048129))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005578cfcc157f in my_write_core (sig=sig@entry=11) at /test/10.4_opt/mysys/stacktrace.c:386
      #2  0x00005578cf6cb088 in handle_fatal_signal (sig=11) at /test/10.4_opt/sql/signal_handler.cc:356
      #3  <signal handler called>
      #4  0x00005578cf445249 in setup_table_map (tablenr=0, table_list=0x146bdc012da0, table=<optimized out>) at /test/10.4_opt/sql/sql_base.h:355
      #5  setup_tables (thd=0x146bdc000c48, context=0x146bdc012748, from_clause=0x146bdc0128b8, tables=0x146bdc012da0, leaves=@0x146bdc012930: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x146bdc015f80, last = 0x146bdc015f80, elements = 1}, <No data fields>}, select_insert=<optimized out>, full_table_list=false) at /test/10.4_opt/sql/sql_base.cc:7895
      #6  0x00005578cf4456a4 in setup_tables_and_check_access (thd=0x146bdc000c48, context=<optimized out>, from_clause=<optimized out>, tables=0x146bdc012da0, leaves=@0x146bdc012930: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x146bdc015f80, last = 0x146bdc015f80, elements = 1}, <No data fields>}, select_insert=select_insert@entry=false, want_access_first=1, want_access=1, full_table_list=false) at /test/10.4_opt/sql/sql_base.cc:8004
      #7  0x00005578cf4fbbe0 in JOIN::prepare (this=this@entry=0x146bdc022aa0, tables_init=<optimized out>, wild_num=0, conds_init=<optimized out>, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x146bdc0126f8, unit_arg=0x146bdc010bf8) at /test/10.4_opt/sql/sql_select.cc:1189
      #8  0x00005578cf557e51 in st_select_lex_unit::prepare_join (this=0x146bdc010bf8, thd_arg=0x146bdc000c48, sl=0x146bdc0126f8, tmp_result=0x146bdc015e98, additional_options=<optimized out>, is_union_select=<optimized out>) at /test/10.4_opt/sql/sql_union.cc:646
      #9  0x00005578cf55ae94 in st_select_lex_unit::prepare (this=this@entry=0x146bdc010bf8, derived_arg=derived_arg@entry=0x146bdc010090, sel_result=sel_result@entry=0x146bdc015e98, additional_options=additional_options@entry=0) at /test/10.4_opt/sql/sql_union.cc:993
      #10 0x00005578cf4659c4 in mysql_derived_prepare (thd=0x146bdc000c48, lex=<optimized out>, derived=0x146bdc010090) at /test/10.4_opt/sql/sql_derived.cc:817
      #11 0x00005578cf4648b9 in mysql_handle_derived (lex=0x146bdc004900, phases=phases@entry=2) at /test/10.4_opt/sql/sql_derived.cc:126
      #12 0x00005578cf44311b in open_and_lock_tables (thd=thd@entry=0x146bdc000c48, options=<optimized out>, tables=<optimized out>, tables@entry=0x146bdc010090, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x146c24072330) at /test/10.4_opt/sql/sql_base.cc:5331
      #13 0x00005578cf5ad370 in open_and_lock_tables (flags=0, derived=true, tables=0x146bdc010090, thd=0x146bdc000c48) at /test/10.4_opt/sql/sql_base.h:503
      #14 open_only_one_table (thd=0x146bdc000c48, table=0x146bdc010090, repair_table_use_frm=<optimized out>, is_view_operator_func=<optimized out>) at /test/10.4_opt/sql/sql_admin.cc:412
      #15 0x00005578cf5ae4b6 in mysql_admin_table (thd=<optimized out>, tables=0x146bdc010090, check_opt=0x146bdc005c90, operator_name=0x5578cff1d673 "repair", lock_type=TL_WRITE, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x5578cf5ad5e0 <prepare_for_repair(THD*, TABLE_LIST*, HA_CHECK_OPT*)>, operator_func=<optimized out>, view_operator_func=0x5578cf567fa0 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /test/10.4_opt/sql/sql_admin.cc:587
      #16 0x00005578cf5b059e in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x146bdc000c48) at /test/10.4_opt/sql/sql_admin.cc:1483
      #17 0x00005578cf4a3670 in mysql_execute_command (thd=0x146bdc000c48) at /test/10.4_opt/sql/sql_parse.cc:6192
      #18 0x00005578cf4aa6d3 in mysql_parse (thd=thd@entry=0x146bdc000c48, rawbuf=rawbuf@entry=0x146bdc00ffe0 "REPAIR VIEW v1", length=length@entry=14, parser_state=parser_state@entry=0x146c240744c0, 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
      #19 0x00005578cf4ab038 in wsrep_mysql_parse (thd=0x146bdc000c48, rawbuf=0x146bdc00ffe0 "REPAIR VIEW v1", length=14, parser_state=0x146c240744c0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7799
      #20 0x00005578cf4ae673 in dispatch_command (command=COM_QUERY, thd=0x146bdc000c48, 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:1183
      #21 0x00005578cf4aee30 in do_command (thd=0x146bdc000c48) at /test/10.4_opt/sql/sql_parse.cc:1373
      #22 0x00005578cf5a268e in do_handle_one_connection (connect=connect@entry=0x5578d1eb9d68) at /test/10.4_opt/sql/sql_connect.cc:1412
      #23 0x00005578cf5a27af in handle_one_connection (arg=0x5578d1eb9d68) at /test/10.4_opt/sql/sql_connect.cc:1316
      #24 0x0000146c5b9ef609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x0000146c5b52f293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

        Attachments

          Activity

            People

            Assignee:
            jplindst Jan Lindström
            Reporter:
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: