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

Assertion `page_get_page_no(block->frame) == index->page' failed in btr_pcur_store_position

    XMLWordPrintable

Details

    Description

      USE test;
      SET SQL_MODE='';
      SET GLOBAL innodb_limit_optimistic_insert_debug=2;
      CREATE TABLE t (a INT) ENGINE=InnoDB;
      ALTER TABLE t ADD COLUMN b INT FIRST;
      INSERT INTO t VALUES (5,7),(8,9),(4,1);
      DELETE FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;  # Will likely crash on this one
      SELECT GROUP_CONCAT(a) FROM t;  # Or on this one
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      SELECT GROUP_CONCAT(a) FROM t;
      

      Leads to:

      10.5.4 7dfac4d0dbc5d2cd25af72361423d0471a3176ba

      mysqld: /test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/btr/btr0pcur.cc:157: void btr_pcur_store_position(btr_pcur_t*, mtr_t*): Assertion `page_get_page_no(block->frame) == index->page' failed.
      

      10.5.4 7dfac4d0dbc5d2cd25af72361423d0471a3176ba

      Core was generated by `/test/MD300520-mariadb-10.5.4-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 0x14beea69e700 (LWP 916033))]
      (gdb) bt
      (gdb) (gdb) #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x00005570a7a8c6c2 in my_write_core (sig=sig@entry=6) at /test/bb-10.5-MDEV-15053-3_dbg/mysys/stacktrace.c:518
      #2  0x00005570a724342d in handle_fatal_signal (sig=6) at /test/bb-10.5-MDEV-15053-3_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000014bee8de2801 in __GI_abort () at abort.c:79
      #6  0x000014bee8dd239a in __assert_fail_base (fmt=0x14bee8f597d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5570a7f23628 "page_get_page_no(block->frame) == index->page", file=file@entry=0x5570a7f234a8 "/test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/btr/btr0pcur.cc", line=line@entry=157, function=function@entry=0x5570a7f24cc0 <btr_pcur_store_position(btr_pcur_t*, mtr_t*)::__PRETTY_FUNCTION__> "void btr_pcur_store_position(btr_pcur_t*, mtr_t*)") at assert.c:92
      #7  0x000014bee8dd2412 in __GI___assert_fail (assertion=assertion@entry=0x5570a7f23628 "page_get_page_no(block->frame) == index->page", file=file@entry=0x5570a7f234a8 "/test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/btr/btr0pcur.cc", line=line@entry=157, function=function@entry=0x5570a7f24cc0 <btr_pcur_store_position(btr_pcur_t*, mtr_t*)::__PRETTY_FUNCTION__> "void btr_pcur_store_position(btr_pcur_t*, mtr_t*)") at assert.c:101
      #8  0x00005570a78a1ce3 in btr_pcur_store_position (cursor=cursor@entry=0x14bec7d24258, mtr=mtr@entry=0x14beea69bda0) at /test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/btr/btr0pcur.cc:157
      #9  0x00005570a77b8dc3 in row_search_mvcc (buf=buf@entry=0x14bec7c539a8 "\377", mode=mode@entry=PAGE_CUR_G, prebuilt=0x14bec7d24098, match_mode=match_mode@entry=0, direction=direction@entry=0) at /test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/row/row0sel.cc:5584
      #10 0x00005570a7612e02 in ha_innobase::index_read (this=this@entry=0x14bec7c394a0, buf=buf@entry=0x14bec7c539a8 "\377", key_ptr=key_ptr@entry=0x0, key_len=key_len@entry=0, find_flag=find_flag@entry=HA_READ_AFTER_KEY) at /test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/handler/ha_innodb.cc:8940
      #11 0x00005570a7613080 in ha_innobase::index_first (this=this@entry=0x14bec7c394a0, buf=buf@entry=0x14bec7c539a8 "\377") at /test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/handler/ha_innodb.cc:9314
      #12 0x00005570a7613101 in ha_innobase::rnd_next (this=0x14bec7c394a0, buf=0x14bec7c539a8 "\377") at /test/bb-10.5-MDEV-15053-3_dbg/storage/innobase/handler/ha_innodb.cc:9407
      #13 0x00005570a724b074 in handler::ha_rnd_next (this=0x14bec7c394a0, buf=0x14bec7c539a8 "\377") at /test/bb-10.5-MDEV-15053-3_dbg/sql/handler.cc:2989
      #14 0x00005570a73e86c3 in rr_sequential (info=0x14bec7c76f78) at /test/bb-10.5-MDEV-15053-3_dbg/sql/records.cc:511
      #15 0x00005570a6fee2c2 in READ_RECORD::read_record (this=0x14bec7c76f78) at /test/bb-10.5-MDEV-15053-3_dbg/sql/records.h:79
      #16 join_init_read_record (tab=0x14bec7c76eb0) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_select.cc:21560
      #17 0x00005570a6fdeb21 in sub_select (join=0x14bec7c75c10, join_tab=0x14bec7c76eb0, end_of_records=<optimized out>) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_select.cc:20612
      #18 0x00005570a7016926 in do_select (procedure=0x0, join=0x14bec7c75c10) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_select.cc:20149
      #19 JOIN::exec_inner (this=this@entry=0x14bec7c75c10) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_select.cc:4464
      #20 0x00005570a7016f41 in JOIN::exec (this=this@entry=0x14bec7c75c10) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_select.cc:4245
      #21 0x00005570a7015256 in mysql_select (thd=thd@entry=0x14bec7c15088, tables=<optimized out>, fields=@0x14bec7c74290: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14bec7c74bc0, last = 0x14bec7c74bc0, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x14bec7c75be8, unit=0x14bec7c190a0, select_lex=0x14bec7c74140) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_select.cc:4669
      #22 0x00005570a7015585 in handle_select (thd=thd@entry=0x14bec7c15088, lex=lex@entry=0x14bec7c18fd8, result=result@entry=0x14bec7c75be8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_select.cc:417
      #23 0x00005570a6f9ffcf in execute_sqlcom_select (thd=thd@entry=0x14bec7c15088, all_tables=0x14bec7c74c18) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_parse.cc:6207
      #24 0x00005570a6f99104 in mysql_execute_command (thd=thd@entry=0x14bec7c15088) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_parse.cc:3939
      #25 0x00005570a6fa5f3e in mysql_parse (thd=thd@entry=0x14bec7c15088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14beea69d3d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_parse.cc:7991
      #26 0x00005570a6f92a52 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14bec7c15088, packet=packet@entry=0x14bec7c67089 "", packet_length=packet_length@entry=29, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_parse.cc:1874
      #27 0x00005570a6f9122c in do_command (thd=0x14bec7c15088) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_parse.cc:1355
      #28 0x00005570a70eb64f in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14becab603a8, put_in_cache=put_in_cache@entry=true) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_connect.cc:1411
      #29 0x00005570a70ebd6b in handle_one_connection (arg=arg@entry=0x14becab603a8) at /test/bb-10.5-MDEV-15053-3_dbg/sql/sql_connect.cc:1313
      #30 0x00005570a754b22c in pfs_spawn_thread (arg=0x14bee8045888) at /test/bb-10.5-MDEV-15053-3_dbg/storage/perfschema/pfs.cc:2201
      #31 0x000014bee9ac56db in start_thread (arg=0x14beea69e700) at pthread_create.c:463
      #32 0x000014bee8ec388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.14 (dbg), 10.5.4 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (opt), 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

        Activity

          People

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