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

SIGABRT in buf_page_io_complete (on optimized builds)

    XMLWordPrintable

Details

    Description

      # Repeat 3-10000000 times. Random delays may help. Highly sporadic.
      # Single thread enough to reproduce, multi-threaded is likely faster.
      DROP DATABASE test;CREATE DATABASE test;USE test;
      CREATE TABLE t2 (a INT) ENGINE=InnoDB;
      XA BEGIN 'x1';
      SET GLOBAL innodb_lru_scan_depth=10000;
      SET GLOBAL innodb_checksum_algorithm=3;
      INSERT INTO t2 VALUES (1),(1),(1);
      

      Leads to:

      10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)

      Core was generated by `/test/MD110820-mariadb-10.4.15-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x14aafa4bc700 (LWP 945443))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000056222f3898a6 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:482
      #2  0x000056222eb05cdc in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000014aaf87538b1 in __GI_abort () at abort.c:79
      #6  0x000056222ef9c87e in ib::fatal::~fatal (this=<optimized out>, __in_chrg=<optimized out>) at /test/10.4_dbg/storage/innobase/ut/ut0ut.cc:601
      #7  0x000056222f0201ea in buf_page_io_complete (bpage=bpage@entry=0x14aadcc15d30, dblwr=dblwr@entry=false, evict=evict@entry=false) at /test/10.4_dbg/storage/innobase/buf/buf0buf.cc:6171
      #8  0x000056222f050f63 in buf_read_page_low (err=err@entry=0x14aafa4b600c, sync=sync@entry=true, type=type@entry=0, mode=mode@entry=132, page_id={m_space = 0, m_page_no = 303}, zip_size=zip_size@entry=0, unzip=false, ignore_missing_space=false) at /test/10.4_dbg/storage/innobase/buf/buf0rea.cc:203
      #9  0x000056222f054de8 in buf_read_page (page_id={m_space = 0, m_page_no = 303}, zip_size=zip_size@entry=0) at /test/10.4_dbg/storage/innobase/buf/buf0rea.cc:406
      #10 0x000056222f01c111 in buf_page_get_low (page_id={m_space = 0, m_page_no = 303}, zip_size=zip_size@entry=0, rw_latch=rw_latch@entry=1, guess=<optimized out>, guess@entry=0x14aadcc15ae0, mode=mode@entry=10, file=file@entry=0x56222f6c7848 "/test/10.4_dbg/storage/innobase/row/row0sel.cc", line=<optimized out>, mtr=<optimized out>, err=<optimized out>) at /test/10.4_dbg/storage/innobase/buf/buf0buf.cc:4416
      #11 0x000056222f01e112 in buf_page_get_gen (page_id={m_space = 2, m_page_no = 0}, zip_size=zip_size@entry=0, rw_latch=rw_latch@entry=1, guess=guess@entry=0x14aadcc15ae0, mode=mode@entry=10, file=file@entry=0x56222f6c7848 "/test/10.4_dbg/storage/innobase/row/row0sel.cc", line=1336, mtr=0x14aafa4b7a00, err=0x14aafa4b65dc) at /test/10.4_dbg/storage/innobase/buf/buf0buf.cc:4942
      #12 0x000056222efd63b8 in btr_cur_search_to_nth_level_func (index=index@entry=0x14aaf7270d80, level=level@entry=0, tuple=<optimized out>, mode=<optimized out>, latch_mode=<optimized out>, latch_mode@entry=1, cursor=cursor@entry=0x14aad24a5f60, ahi_latch=<optimized out>, file=<optimized out>, line=<optimized out>, mtr=<optimized out>, autoinc=<optimized out>) at /test/10.4_dbg/storage/innobase/btr/btr0cur.cc:1629
      #13 0x000056222eef1ffc in btr_pcur_open_with_no_init_func (mtr=0x14aafa4b7a00, line=1336, file=0x56222f6c7848 "/test/10.4_dbg/storage/innobase/row/row0sel.cc", ahi_latch=0x0, cursor=0x14aad24a5f60, latch_mode=1, mode=<optimized out>, tuple=<optimized out>, index=0x14aaf7270d80) at /test/10.4_dbg/storage/innobase/include/btr0pcur.ic:504
      #14 row_sel_open_pcur (plan=plan@entry=0x14aad24a5f50, mtr=mtr@entry=0x14aafa4b7a00) at /test/10.4_dbg/storage/innobase/row/row0sel.cc:1334
      #15 0x000056222eefa177 in row_sel (node=node@entry=0x14aad24a5a18, thr=thr@entry=0x14aad24a8c38) at /test/10.4_dbg/storage/innobase/row/row0sel.cc:1664
      #16 0x000056222eefc0f3 in row_sel_step (thr=thr@entry=0x14aad24a8c38) at /test/10.4_dbg/storage/innobase/row/row0sel.cc:2329
      #17 0x000056222ee56cc8 in que_thr_step (thr=0x14aad24a8c38) at /test/10.4_dbg/storage/innobase/que/que0que.cc:1015
      #18 que_run_threads_low (thr=0x14aad24a8c38) at /test/10.4_dbg/storage/innobase/que/que0que.cc:1101
      #19 que_run_threads (thr=<optimized out>) at /test/10.4_dbg/storage/innobase/que/que0que.cc:1141
      #20 0x000056222ee5904d in que_eval_sql (info=info@entry=0x14aad83a8100, sql=sql@entry=0x56222f6bbc70 "PROCEDURE DROP_ALL_FOREIGN_KEYS_PROC () IS\nforeign_id CHAR;\nfor_name CHAR;\nfound INT;\nDECLARE CURSOR cur IS\nSELECT ID, FOR_NAME FROM SYS_FOREIGN\nWHERE FOR_NAME >= :dbname\nLOCK IN SHARE MODE\nORDER BY F"..., reserve_dict_mutex=reserve_dict_mutex@entry=false, trx=trx@entry=0x14aae4c02258) at /test/10.4_dbg/storage/innobase/que/que0que.cc:1218
      #21 0x000056222eec55bf in drop_all_foreign_keys_in_db (trx=0x14aae4c02258, name=0x14aad2451570 "test/") at /test/10.4_dbg/storage/innobase/row/row0mysql.cc:3850
      #22 row_drop_database_for_mysql (name=<optimized out>, name@entry=0x14aad2451570 "test/", trx=0x14aae4c02258, found=found@entry=0x14aafa4b8308) at /test/10.4_dbg/storage/innobase/row/row0mysql.cc:4034
      #23 0x000056222ed320c4 in innobase_drop_database (hton=<optimized out>, path=<optimized out>) at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:13271
      #24 0x000056222eb05e22 in dropdb_handlerton (unused1=unused1@entry=0x0, plugin=<optimized out>, path=path@entry=0x14aafa4b8fe0) at /test/10.4_dbg/sql/handler.cc:763
      #25 0x000056222e869d6a in plugin_foreach_with_mask (thd=thd@entry=0x0, func=func@entry=0x56222eb05e01 <dropdb_handlerton(THD*, plugin_ref, void*)>, type=type@entry=1, state_mask=state_mask@entry=8, arg=arg@entry=0x14aafa4b8fe0) at /test/10.4_dbg/sql/sql_plugin.cc:2474
      #26 0x000056222eb0a217 in ha_drop_database (path=path@entry=0x14aafa4b8fe0 "./test/") at /test/10.4_dbg/sql/handler.cc:770
      #27 0x000056222e804f10 in mysql_rm_db_internal (thd=0x14aad2415070, db=<optimized out>, if_exists=<optimized out>, silent=silent@entry=false) at /test/10.4_dbg/sql/sql_db.cc:922
      #28 0x000056222e8055e2 in mysql_rm_db (thd=thd@entry=0x14aad2415070, db=db@entry=0x14aad2419c38, if_exists=<optimized out>) at /test/10.4_dbg/sql/sql_db.cc:1055
      #29 0x000056222e85747c in mysql_execute_command (thd=thd@entry=0x14aad2415070) at /test/10.4_dbg/sql/sql_parse.cc:5070
      #30 0x000056222e85d090 in mysql_parse (thd=thd@entry=0x14aad2415070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14aafa4bb460, 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:7896
      #31 0x000056222e85f920 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14aad2415070, packet=packet@entry=0x14aad2457071 "DROP DATABASE test", packet_length=packet_length@entry=18, 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:1834
      #32 0x000056222e86335b in do_command (thd=0x14aad2415070) at /test/10.4_dbg/sql/sql_parse.cc:1352
      #33 0x000056222e98f8b6 in do_handle_one_connection (connect=connect@entry=0x14aaf7035790) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #34 0x000056222e98f9d6 in handle_one_connection (arg=0x14aaf7035790) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #35 0x000014aaf96ba6db in start_thread (arg=0x14aafa4bc700) at pthread_create.c:463
      #36 0x000014aaf8834a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Note frame #20 (PROCEDURE DROP_ALL_FOREIGN_KEYS_PROC). I can provide a core dump + mysqld if required.

      10.4.15 1cda462f46305daf2a5becb1ed0ce4fcdf3ae404 (Optimized)

      Core was generated by `/test/MD040920-mariadb-10.4.15-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x151057af5700 (LWP 1016592))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000556cf21d2677 in my_write_core (sig=sig@entry=6) at /test/10.4_opt/mysys/stacktrace.c:386
      #2  0x0000556cf1ba864a in handle_fatal_signal (sig=6) at /test/10.4_opt/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x0000151055d8c8b1 in __GI_abort () at abort.c:79
      #6  0x0000556cf1ea0991 in ib::fatal::~fatal (this=<optimized out>, __in_chrg=<optimized out>) at /test/10.4_opt/storage/innobase/ut/ut0ut.cc:601
      #7  0x0000556cf1eddfd4 in buf_page_io_complete (bpage=bpage@entry=0x15103a003b20, dblwr=dblwr@entry=false, evict=evict@entry=false) at /test/10.4_opt/storage/innobase/buf/buf0buf.cc:6179
      #8  0x0000556cf1f02cc0 in buf_read_page_low (ignore_missing_space=false, unzip=false, zip_size=0, page_id={m_space = 0, m_page_no = 217}, mode=132, type=0, sync=true, err=0x151057aec42c) at /test/10.4_opt/storage/innobase/buf/buf0rea.cc:203
      #9  buf_read_page (page_id={m_space = 0, m_page_no = 217}, zip_size=zip_size@entry=0) at /test/10.4_opt/storage/innobase/buf/buf0rea.cc:388
      #10 0x0000556cf1edec3f in buf_page_get_low (page_id={m_space = 0, m_page_no = 217}, zip_size=0, rw_latch=rw_latch@entry=2, guess=<optimized out>, mode=10, file=0x556cf241cb48 "/test/10.4_opt/storage/innobase/include/trx0rseg.ic", line=44, mtr=0x151057aecb80, err=0x0) at /test/10.4_opt/storage/innobase/buf/buf0buf.cc:4416
      #11 0x0000556cf1edfec6 in buf_page_get_gen (page_id=<optimized out>, zip_size=zip_size@entry=0, rw_latch=rw_latch@entry=2, guess=guess@entry=0x0, mode=mode@entry=10, file=file@entry=0x556cf241cb48 "/test/10.4_opt/storage/innobase/include/trx0rseg.ic", line=<optimized out>, mtr=<optimized out>, err=<optimized out>) at /test/10.4_opt/storage/innobase/buf/buf0buf.cc:4942
      #12 0x0000556cf1e97c6a in trx_rsegf_get (mtr=0x151057aecb80, page_no=<optimized out>, space=<optimized out>) at /test/10.4_opt/storage/innobase/include/trx0rseg.ic:43
      #13 trx_undo_create (trx=trx@entry=0x1510420031e8, rseg=rseg@entry=0x1510548389e0, undo=undo@entry=0x151042004190, err=err@entry=0x151057aecb0c, mtr=mtr@entry=0x151057aecb80) at /test/10.4_opt/storage/innobase/trx/trx0undo.cc:1276
      #14 0x0000556cf1e9b994 in trx_undo_assign_low (trx=0x1510420031e8, rseg=0x1510548389e0, undo=undo@entry=0x151042004190, err=err@entry=0x151057aecb0c, mtr=mtr@entry=0x151057aecb80) at /test/10.4_opt/storage/innobase/trx/trx0undo.cc:1487
      #15 0x0000556cf1e7d904 in trx_undo_report_row_operation (thr=thr@entry=0x1510300b5eb0, index=index@entry=0x15105486e6e8, clust_entry=clust_entry@entry=0x151030179c68, update=update@entry=0x0, cmpl_info=cmpl_info@entry=0, rec=rec@entry=0x0, offsets=0x0, roll_ptr=0x151057aedcb0) at /test/10.4_opt/storage/innobase/trx/trx0rec.cc:2107
      #16 0x0000556cf1eb53b9 in btr_cur_ins_lock_and_undo (flags=flags@entry=0, cursor=cursor@entry=0x151057aee030, entry=entry@entry=0x151030179c68, thr=thr@entry=0x1510300b5eb0, mtr=mtr@entry=0x151057aee9f0, inherit=inherit@entry=0x151057aedd77) at /test/10.4_opt/storage/innobase/btr/btr0cur.cc:3343
      #17 0x0000556cf1ec3372 in btr_cur_optimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x151057aee030, offsets=offsets@entry=0x151057aedfc8, heap=heap@entry=0x151057aedfc0, entry=entry@entry=0x151030179c68, rec=rec@entry=0x151057aee490, big_rec=0x151057aedfb8, n_ext=<optimized out>, thr=0x1510300b5eb0, mtr=0x151057aee9f0) at /test/10.4_opt/storage/innobase/btr/btr0cur.cc:3560
      #18 0x0000556cf1e068d6 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=2, index=index@entry=0x15105486e6e8, n_uniq=n_uniq@entry=1, entry=entry@entry=0x151030179c68, n_ext=n_ext@entry=0, thr=0x1510300b5eb0) at /test/10.4_opt/storage/innobase/row/row0ins.cc:2761
      #19 0x0000556cf1e0b233 in row_ins_clust_index_entry (index=index@entry=0x15105486e6e8, entry=entry@entry=0x151030179c68, thr=thr@entry=0x1510300b5eb0, n_ext=n_ext@entry=0) at /test/10.4_opt/storage/innobase/row/row0ins.cc:3235
      #20 0x0000556cf1e0be1d in row_ins_index_entry (thr=0x1510300b5eb0, entry=<optimized out>, index=<optimized out>) at /test/10.4_opt/storage/innobase/row/row0ins.cc:3360
      #21 row_ins_index_entry_step (thr=0x1510300b5eb0, node=0x151030179a68) at /test/10.4_opt/storage/innobase/row/row0ins.cc:3529
      #22 row_ins (thr=<optimized out>, node=<optimized out>) at /test/10.4_opt/storage/innobase/row/row0ins.cc:3666
      #23 row_ins_step (thr=thr@entry=0x1510300b5eb0) at /test/10.4_opt/storage/innobase/row/row0ins.cc:3805
      #24 0x0000556cf1de9e06 in que_thr_step (thr=0x1510300b5eb0) at /test/10.4_opt/storage/innobase/que/que0que.cc:1018
      #25 que_run_threads_low (thr=0x1510300b5eb0) at /test/10.4_opt/storage/innobase/que/que0que.cc:1101
      #26 que_run_threads (thr=thr@entry=0x1510300b5eb0) at /test/10.4_opt/storage/innobase/que/que0que.cc:1141
      #27 0x0000556cf1e1dd0c in row_create_table_for_mysql (table=table@entry=0x1510301272e8, trx=0x1510420031e8, mode=FIL_ENCRYPTION_DEFAULT, key_id=1) at /test/10.4_opt/storage/innobase/row/row0mysql.cc:2373
      #28 0x0000556cf1d60ff3 in create_table_info_t::create_table_def (this=0x151057aefdd0) at /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:11037
      #29 0x0000556cf1d5d6cd in create_table_info_t::create_table (this=this@entry=0x151057aefdd0, create_fk=create_fk@entry=true) at /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:12275
      #30 0x0000556cf1d61db6 in ha_innobase::create (this=<optimized out>, name=0x151057af2010 "./test/t2", form=<optimized out>, create_info=<optimized out>, file_per_table=<optimized out>, trx=0x1510420031e8) at /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:12827
      #31 0x0000556cf1bb1358 in handler::ha_create (this=0x151030048820, name=<optimized out>, form=0x151057af0380, info_arg=0x151057af23e0) at /test/10.4_opt/sql/handler.cc:4778
      #32 0x0000556cf1bb1b81 in ha_create_table (thd=thd@entry=0x151030012008, path=path@entry=0x151057af2010 "./test/t2", db=0x15103003f7f0 "test", table_name=0x15103003f0f8 "t2", create_info=create_info@entry=0x151057af23e0, frm=frm@entry=0x151057af2000) at /test/10.4_opt/sql/handler.cc:5242
      #33 0x0000556cf1a28cca in create_table_impl (thd=thd@entry=0x151030012008, orig_db=@0x15103003f148: {str = 0x15103003f7f0 "test", length = 4}, orig_table_name=@0x15103003f158: {str = 0x15103003f0f8 "t2", length = 2}, db=@0x15103003f148: {str = 0x15103003f7f0 "test", length = 4}, table_name=@0x15103003f158: {str = 0x15103003f0f8 "t2", length = 2}, path=path@entry=0x151057af2010 "./test/t2", options={m_options = DDL_options_st::OPT_NONE}, create_info=0x151057af23e0, alter_info=0x151057af2320, create_table_mode=0, is_trans=0x151057af2297, key_info=0x151057af1ff8, key_count=0x151057af1ff4, frm=0x151057af2000) at /test/10.4_opt/sql/sql_table.cc:5092
      #34 0x0000556cf1a2905b in mysql_create_table_no_lock (thd=thd@entry=0x151030012008, db=db@entry=0x15103003f148, table_name=table_name@entry=0x15103003f158, create_info=create_info@entry=0x151057af23e0, alter_info=0x151057af2320, is_trans=is_trans@entry=0x151057af2297, create_table_mode=0, table_list=0x15103003f130) at /test/10.4_opt/sql/sql_table.cc:5176
      #35 0x0000556cf1a29271 in mysql_create_table (thd=thd@entry=0x151030012008, create_table=create_table@entry=0x15103003f130, create_info=create_info@entry=0x151057af23e0, alter_info=alter_info@entry=0x151057af2320) at /test/10.4_opt/sql/sql_table.cc:5268
      #36 0x0000556cf1a2a59a in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x151030012008) at /test/10.4_opt/sql/sql_table.cc:11493
      #37 0x0000556cf1996684 in mysql_execute_command (thd=thd@entry=0x151030012008) at /test/10.4_opt/sql/sql_parse.cc:6098
      #38 0x0000556cf199dbaa in mysql_parse (thd=0x151030012008, rawbuf=<optimized out>, length=37, parser_state=0x151057af44d0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7896
      #39 0x0000556cf19a0005 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151030012008, packet=packet@entry=0x151030032009 "CREATE TABLE t2 (a INT) ENGINE=InnoDB", packet_length=packet_length@entry=37, 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:1834
      #40 0x0000556cf19a1784 in do_command (thd=0x151030012008) at /test/10.4_opt/sql/sql_parse.cc:1352
      #41 0x0000556cf1a7ee4e in do_handle_one_connection (connect=connect@entry=0x151054832748) at /test/10.4_opt/sql/sql_connect.cc:1412
      #42 0x0000556cf1a7ef0d in handle_one_connection (arg=0x151054832748) at /test/10.4_opt/sql/sql_connect.cc:1316
      #43 0x0000151056cf36db in start_thread (arg=0x151057af5700) at pthread_create.c:463
      #44 0x0000151055e6da3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

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

      Bug confirmed not present in:
      MariaDB: 10.1.47 (dbg), 10.1.47 (opt), 10.5.6 (dbg), 10.5.6 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Activity

          People

            marko Marko Mäkelä
            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.