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

Assertion `level <= 50' failed in btr_cur_latch_leaves

    XMLWordPrintable

Details

    Description

      Briefly discussed with Marko online. Agreed to log this as a bug for the time being, though it is not clear if it is a bug or not. Marko mentioned that this could be a case of MDEV-13542. Feel free to close if it's a dud.

      USE test;
      SET GLOBAL innodb_simulate_comp_failures=99;  # (!)
      CREATE TABLE t(c INT);
      INSERT INTO t VALUES (1),(1),(1);
      ALTER TABLE t KEY_BLOCK_SIZE=2;
      

      Leads to:

      10.5.3 cfe5ee90c8e4b9dfa98a41fcd299197a59261be7

      mysqld: /test/10.5_dbg/storage/innobase/include/btr0btr.ic:51: void btr_page_set_level(buf_block_t*, ulint, mtr_t*): Assertion `level <= 50' failed.
      

      Also seen:

      2020-05-21 16:19:55 0 [Note] /test/MD110520-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld: ready for connections.
      Version: '10.5.3-MariaDB-debug'  socket: '/test/MD110520-mariadb-10.5.3-linux-x86_64-dbg/socket.sock'  port: 11832  MariaDB Server
      2020-05-21 16:19:59 4 [ERROR] InnoDB: Simulating a compression failure for table `test`.`#sql-alter-381de-4` index GEN_CLUST_INDEX page 4(leaf)
      2020-05-21 16:19:59 4 [ERROR] InnoDB: Simulating a compression failure for table `test`.`#sql-alter-381de-4` index GEN_CLUST_INDEX page 5(leaf)
      2020-05-21 16:19:59 4 [ERROR] InnoDB: Simulating a compression failure for table `test`.`#sql-alter-381de-4` index GEN_CLUST_INDEX page 6(non-leaf)
      2020-05-21 16:19:59 4 [ERROR] InnoDB: Simulating a compression failure for table `test`.`#sql-alter-381de-4` index GEN_CLUST_INDEX page 8(non-leaf)
      2020-05-21 16:19:59 4 [ERROR] InnoDB: Simulating a compression failure for table `test`.`#sql-alter-381de-4` index GEN_CLUST_INDEX page 3(non-leaf)
      2020-05-21 16:19:59 4 [ERROR] InnoDB: Simulating a compression failure for table `test`.`#sql-alter-381de-4` index GEN_CLUST_INDEX page 9(non-leaf)
      2020-05-21 16:19:59 0x14deefa53700  InnoDB: Assertion failure in file /test/10.5_dbg/storage/innobase/btr/btr0cur.cc line 382
      InnoDB: We intentionally generate a memory trap.
      

      10.5.3 cfe5ee90c8e4b9dfa98a41fcd299197a59261be7

      Core was generated by `/test/MD110520-mariadb-10.5.3-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 0x14b2ba881700 (LWP 1864040))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000563a2d886c11 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x0000563a2d02bf8d in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000014b2b8fc5801 in __GI_abort () at abort.c:79
      #6  0x0000563a2d642aae in ut_dbg_assertion_failed (expr=expr@entry=0x0, file=file@entry=0x563a2dd0cd50 "/test/10.5_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=382) at /test/10.5_dbg/storage/innobase/ut/ut0dbg.cc:60
      #7  0x0000563a2d6735fe in btr_cur_latch_leaves (block=block@entry=0x14b29e22b190, latch_mode=38, cursor=cursor@entry=0x14b2ba879c10, mtr=mtr@entry=0x14b2ba87a380) at /test/10.5_dbg/storage/innobase/btr/btr0cur.cc:382
      #8  0x0000563a2d68678f in btr_cur_search_to_nth_level_func (index=index@entry=0x14b2978a5098, level=level@entry=7, tuple=0x14b29781ced8, mode=mode@entry=PAGE_CUR_LE, latch_mode=<optimized out>, latch_mode@entry=38, cursor=cursor@entry=0x14b2ba879c10, ahi_latch=0x0, file=0x563a2dd02708 "/test/10.5_dbg/storage/innobase/btr/btr0btr.cc", line=4897, mtr=0x14b2ba87a380, autoinc=0) at /test/10.5_dbg/storage/innobase/btr/btr0cur.cc:1847
      #9  0x0000563a2d64b806 in btr_page_get_father_node_ptr_func (offsets=offsets@entry=0x14b29781ce98, heap=<optimized out>, cursor=cursor@entry=0x14b2ba879c10, latch_mode=latch_mode@entry=38, file=file@entry=0x563a2dd02708 "/test/10.5_dbg/storage/innobase/btr/btr0btr.cc", line=line@entry=4897, mtr=0x14b2ba87a380) at /test/10.5_dbg/storage/innobase/btr/btr0btr.cc:855
      #10 0x0000563a2d650942 in btr_validate_level (lockout=<optimized out>, level=6, trx=0x0, index=0x14b2978a5098) at /test/10.5_dbg/storage/innobase/btr/btr0btr.cc:4896
      #11 btr_validate_index (index=0x14b2978a5098, trx=trx@entry=0x0) at /test/10.5_dbg/storage/innobase/btr/btr0btr.cc:5133
      #12 0x0000563a2d666fe1 in BtrBulk::finish (this=this@entry=0x14b2978803e8, err=DB_SUCCESS) at /test/10.5_dbg/storage/innobase/btr/btr0bulk.cc:1205
      #13 0x0000563a2d55a496 in row_merge_read_clustered_index (allow_not_null=<optimized out>, eval_table=<optimized out>, crypt_block=<optimized out>, pct_cost=<optimized out>, stage=<optimized out>, tmpfd=0x14b2ba87b550, skip_pk_sort=<optimized out>, block=<optimized out>, sequence=..., add_autoinc=<optimized out>, col_map=<optimized out>, add_v=<optimized out>, defaults=<optimized out>, n_index=<optimized out>, key_numbers=<optimized out>, files=<optimized out>, psort_info=<optimized out>, fts_sort_idx=<optimized out>, index=0x14b297857270, online=<optimized out>, new_table=<optimized out>, old_table=0x14b297852598, table=<optimized out>, trx=<optimized out>) at /test/10.5_dbg/storage/innobase/row/row0merge.cc:2513
      #14 row_merge_build_indexes (trx=<optimized out>, old_table=0x14b297852598, new_table=<optimized out>, online=<optimized out>, indexes=0x14b297857270, key_numbers=<optimized out>, n_indexes=<optimized out>, table=<optimized out>, defaults=<optimized out>, col_map=<optimized out>, add_autoinc=<optimized out>, sequence=..., skip_pk_sort=<optimized out>, stage=<optimized out>, add_v=<optimized out>, eval_table=<optimized out>, allow_not_null=<optimized out>) at /test/10.5_dbg/storage/innobase/row/row0merge.cc:4529
      #15 0x0000563a2d42293e in ha_innobase::inplace_alter_table (this=0x14b297836ca0, altered_table=0x14b2ba87ca70, ha_alter_info=0x14b2ba87c9d0) at /test/10.5_dbg/storage/innobase/handler/handler0alter.cc:8384
      #16 0x0000563a2ce4c984 in handler::ha_inplace_alter_table (ha_alter_info=0x14b2ba87c9d0, altered_table=0x14b2ba87ca70, this=<optimized out>) at /test/10.5_dbg/sql/handler.h:4513
      #17 mysql_inplace_alter_table (thd=thd@entry=0x14b297815088, table_list=0x14b297874188, table=table@entry=0x14b2978f0088, altered_table=altered_table@entry=0x14b2ba87ca70, ha_alter_info=ha_alter_info@entry=0x14b2ba87c9d0, inplace_supported=inplace_supported@entry=HA_ALTER_INPLACE_COPY_NO_LOCK, target_mdl_request=0x14b2ba87d830, alter_ctx=0x14b2ba87e6c0) at /test/10.5_dbg/sql/sql_table.cc:7869
      #18 0x0000563a2ce58f17 in mysql_alter_table (thd=thd@entry=0x14b297815088, new_db=new_db@entry=0x14b297819940, new_name=new_name@entry=0x14b297819d48, create_info=create_info@entry=0x14b2ba87f2b0, table_list=<optimized out>, table_list@entry=0x14b297874188, alter_info=alter_info@entry=0x14b2ba87f1e0, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/10.5_dbg/sql/sql_table.cc:10442
      #19 0x0000563a2cedc7d0 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14b297815088) at /test/10.5_dbg/sql/sql_alter.cc:532
      #20 0x0000563a2cd87eda in mysql_execute_command (thd=thd@entry=0x14b297815088) at /test/10.5_dbg/sql/sql_parse.cc:5912
      #21 0x0000563a2cd8f804 in mysql_parse (thd=thd@entry=0x14b297815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b2ba8803e0, 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:7957
      #22 0x0000563a2cd7bffd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b297815088, packet=packet@entry=0x14b297867089 "ALTER TABLE t KEY_BLOCK_SIZE=2", packet_length=packet_length@entry=30, 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:1839
      #23 0x0000563a2cd7a8cc in do_command (thd=0x14b297815088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #24 0x0000563a2ced499d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14b2990433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #25 0x0000563a2ced50b9 in handle_one_connection (arg=arg@entry=0x14b2990433a8) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #26 0x0000563a2d33310a in pfs_spawn_thread (arg=0x14b2b8445888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #27 0x000014b2b9ca86db in start_thread (arg=0x14b2ba881700) at pthread_create.c:463
      #28 0x000014b2b90a688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Presumed bug confirmed present in:
      MariaDB: 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

      Presumed bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt), 10.5.4 (dbg), 10.5.4 (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

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.