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

SIGSEGV in end_io_cache on REPAIR LOCAL TABLE for Aria table (on optimized builds)

    XMLWordPrintable

Details

    Description

      CREATE TABLE t2 (i INT) ENGINE=Aria;
      INSERT INTO t2 VALUES (1);
      SET max_session_mem_used=50000;
      REPAIR LOCAL TABLE t2 USE_FRM;
      REPAIR LOCAL TABLE t2;
      

      Leads to:

      10.5.6 2bac9782aa81ad386beaf00eb126ccf2d15031a1 (Optimized)

      Core was generated by `/test/MD150920-mariadb-10.5.6-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      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:57
      [Current thread is 1 (Thread 0x148437f56700 (LWP 3666605))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055ed2e0f3ae7 in my_write_core (sig=sig@entry=11) at /data/10.5_opt/mysys/stacktrace.c:424
      #2  0x000055ed2dac2fda in handle_fatal_signal (sig=11) at /data/10.5_opt/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  end_io_cache (info=0x4b8) at /data/10.5_opt/mysys/mf_iocache.c:1776
      #5  0x000055ed2dd00f15 in maria_repair (param=param@entry=0x148414564030, info=<optimized out>, name=name@entry=0x148437f54490 "./test/t2", rep_quick=<optimized out>) at /data/10.5_opt/storage/maria/ma_check.c:2891
      #6  0x000055ed2dc94d65 in ha_maria::repair (this=this@entry=0x14841446d030, thd=thd@entry=0x148414412018, param=param@entry=0x148414564030, do_optimize=do_optimize@entry=false) at /data/10.5_opt/storage/maria/ha_maria.cc:1681
      #7  0x000055ed2dc95b78 in ha_maria::repair (this=0x14841446d030, thd=0x148414412018, check_opt=0x148414417288) at /data/10.5_opt/storage/maria/ha_maria.cc:1454
      #8  0x000055ed2dacbbd1 in handler::ha_repair (this=0x14841446d030, thd=<optimized out>, check_opt=<optimized out>) at /data/10.5_opt/sql/handler.cc:4622
      #9  0x000055ed2d9c6aac in mysql_admin_table (thd=thd@entry=0x148414412018, tables=tables@entry=0x1484144470f8, check_opt=check_opt@entry=0x148414417288, operator_name=operator_name@entry=0x55ed2e43cf13 "repair", lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x55ed2d9c5120 <prepare_for_repair(THD*, TABLE_LIST*, HA_CHECK_OPT*)>, operator_func=<optimized out>, view_operator_func=0x55ed2d97ca40 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /data/10.5_opt/sql/sql_admin.cc:791
      #10 0x000055ed2d9c76b2 in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x148414412018) at /data/10.5_opt/sql/sql_admin.cc:1420
      #11 0x000055ed2d8c8eff in mysql_execute_command (thd=thd@entry=0x148414412018) at /data/10.5_opt/sql/sql_parse.cc:5952
      #12 0x000055ed2d8cfa2c in mysql_parse (thd=0x148414412018, rawbuf=<optimized out>, length=21, parser_state=0x148437f55430, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/10.5_opt/sql/sql_parse.cc:7994
      #13 0x000055ed2d8c4cc5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148414412018, packet=packet@entry=0x14841443a019 "", packet_length=packet_length@entry=21, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/10.5_opt/sql/sql_parse.cc:1867
      #14 0x000055ed2d8c2fe4 in do_command (thd=0x148414412018) at /data/10.5_opt/sql/sql_parse.cc:1348
      #15 0x000055ed2d9b9ba1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x148434c338f8, put_in_cache=put_in_cache@entry=true) at /data/10.5_opt/sql/sql_connect.cc:1410
      #16 0x000055ed2d9b9f14 in handle_one_connection (arg=arg@entry=0x148434c338f8) at /data/10.5_opt/sql/sql_connect.cc:1312
      #17 0x000055ed2dd2da4a in pfs_spawn_thread (arg=0x148434c4f018) at /data/10.5_opt/storage/perfschema/pfs.cc:2201
      #18 0x0000148436ecf6db in start_thread (arg=0x148437f56700) at pthread_create.c:463
      #19 0x00001484362cda3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.6 2bac9782aa81ad386beaf00eb126ccf2d15031a1 (Debug)

      Core was generated by `/test/MD150920-mariadb-10.5.6-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      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:57
      [Current thread is 1 (Thread 0x14977ee87700 (LWP 3663654))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000555b9754885a in my_write_core (sig=sig@entry=11) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x0000555b96d0f3a9 in handle_fatal_signal (sig=11) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  end_io_cache (info=0x4b8) at /test/10.5_dbg/mysys/mf_iocache.c:1774
      #5  0x0000555b96fe9e4b in maria_repair (param=param@entry=0x14975a9440a0, info=<optimized out>, name=name@entry=0x14977ee85080 "./test/t2", rep_quick=<optimized out>) at /test/10.5_dbg/storage/maria/ma_check.c:2891
      #6  0x0000555b96f67b0b in ha_maria::repair (this=this@entry=0x14975a838aa0, thd=thd@entry=0x14975a815088, param=param@entry=0x14975a9440a0, do_optimize=do_optimize@entry=false) at /test/10.5_dbg/storage/maria/ha_maria.cc:1681
      #7  0x0000555b96f68ddc in ha_maria::repair (this=0x14975a838aa0, thd=0x14975a815088, check_opt=0x14975a81a4b8) at /test/10.5_dbg/storage/maria/ha_maria.cc:1454
      #8  0x0000555b96d1d899 in handler::ha_repair (this=0x14975a838aa0, thd=0x14975a815088, check_opt=0x14975a81a4b8) at /test/10.5_dbg/sql/handler.cc:4622
      #9  0x0000555b96bc667d in mysql_admin_table (thd=thd@entry=0x14975a815088, tables=tables@entry=0x14975a874168, check_opt=check_opt@entry=0x14975a81a4b8, operator_name=operator_name@entry=0x555b97a2fc3f "repair", lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x555b96bc48d9 <prepare_for_repair(THD*, TABLE_LIST*, HA_CHECK_OPT*)>, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x555b96d1d868 <handler::ha_repair(THD*, st_ha_check_opt*)>, view_operator_func=0x555b96b5d031 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /test/10.5_dbg/sql/sql_admin.cc:791
      #10 0x0000555b96bc8b10 in Sql_cmd_repair_table::execute (this=<optimized out>, thd=0x14975a815088) at /test/10.5_dbg/sql/sql_admin.cc:1420
      #11 0x0000555b96a619b0 in mysql_execute_command (thd=thd@entry=0x14975a815088) at /test/10.5_dbg/sql/sql_parse.cc:5952
      #12 0x0000555b96a69324 in mysql_parse (thd=thd@entry=0x14975a815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14977ee86350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7994
      #13 0x0000555b96a55d54 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14975a815088, packet=packet@entry=0x14975a867089 "", packet_length=packet_length@entry=21, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1867
      #14 0x0000555b96a5453e in do_command (thd=0x14975a815088) at /test/10.5_dbg/sql/sql_parse.cc:1348
      #15 0x0000555b96bb3893 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14975dcd4808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #16 0x0000555b96bb3fb7 in handle_one_connection (arg=arg@entry=0x14975dcd4808) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #17 0x0000555b9701e5c2 in pfs_spawn_thread (arg=0x14977bc46508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #18 0x000014977de006db in start_thread (arg=0x14977ee87700) at pthread_create.c:463
      #19 0x000014977d1fea3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.47 (dbg), 10.1.47 (opt), 10.2.34 (dbg), 10.2.34 (opt), 10.3.25 (dbg), 10.3.25 (opt), 10.4.15 (dbg), 10.4.15 (opt), 10.5.6 (dbg), 10.5.6 (opt), 10.6.0 (dbg), 10.6.0 (opt)

      Bug confirmed not present in:

      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.49 (dbg), 5.6.49 (opt), 5.7.31 (dbg), 5.7.31 (opt), 8.0.21 (dbg), 8.0.21 (opt)

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              Roel Roel Van de Paar
              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.