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

Assertion `block->type == PAGECACHE_EMPTY_PAGE || block->type == type || type == PAGECACHE_LSN_PAGE || type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE' failed in pagecache_read or ER_CRASHED_ON_USAGE

    XMLWordPrintable

Details

    Description

      I'm demoting it to Minor, because after related fixes the failure is reproducible in 10.2-10.3 and doesn't appear to affect non-debug builds

      The test case is non-deterministic, run with --repeat=N. It usually fails for me within several attempts on 10.2/10.3 debug, but it can vary on different machines and builds.

      --source include/have_sequence.inc
       
      CREATE TABLE t1 (id INT, f INT, KEY (f), PRIMARY KEY (id)) ENGINE=Aria;
      ALTER TABLE t1 DISABLE KEYS;
      INSERT INTO t1 SELECT seq, 0 FROM seq_1_to_200;
       
      --connect (con1,localhost,root,,test)
      --send
        CREATE TABLE t2 SELECT f FROM t1;
       
      --connection default
      --let $run= 100
      --disable_query_log
      --disable_result_log
      while ($run)
      {
        --error ER_BAD_FIELD_ERROR
        INSERT INTO t1 (x) SELECT seq FROM seq_1_to_100;
        --dec $run
      }
      --enable_query_log
      --enable_result_log
       
      # Cleanup
      --connection con1
      --reap
      --disconnect con1
      --connection default
      DROP TABLE t1, t2;
      

      10.2 14a18d7d

      mysqld: /data/src/10.2/storage/maria/ma_pagecache.c:3416: pagecache_read: Assertion `block->type == PAGECACHE_EMPTY_PAGE || block->type == type || type == PAGECACHE_LSN_PAGE || type == PAGECACHE_READ_UNKNOW
      N_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE' failed.
      210426 21:08:34 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f6bd6ff1729 in __assert_fail_base (fmt=0x7f6bd7187588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5626246a4278 "block->type == PAGECACHE_EMPTY_PAGE || block->type == type || type == PAGECACHE_LSN_PAGE || type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE", file=0x5626246a2d78 "/data/src/10.2/storage/maria/ma_pagecache.c", line=3416, function=<optimized out>) at assert.c:92
      #7  0x00007f6bd7002f36 in __GI___assert_fail (assertion=0x5626246a4278 "block->type == PAGECACHE_EMPTY_PAGE || block->type == type || type == PAGECACHE_LSN_PAGE || type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE", file=0x5626246a2d78 "/data/src/10.2/storage/maria/ma_pagecache.c", line=3416, function=0x5626246a4f58 <__PRETTY_FUNCTION__.18793> "pagecache_read") at assert.c:101
      #8  0x000056262420ecbc in pagecache_read (pagecache=0x562625596960 <maria_pagecache_var>, file=0x7f6bc007e510, pageno=1, level=0, buff=0x7f6bb40b7660 '\245' <repeats 200 times>..., type=PAGECACHE_PLAIN_PAGE, lock=PAGECACHE_LOCK_LEFT_UNLOCKED, page_link=0x7f6bd0fc3110) at /data/src/10.2/storage/maria/ma_pagecache.c:3416
      #9  0x000056262424f228 in _ma_scan_block_record (info=0x7f6bc007e0d0, record=0x7f6bc018ef50 "\377", record_pos=0, skip_deleted=1 '\001') at /data/src/10.2/storage/maria/ma_blockrec.c:5508
      #10 0x000056262423c2ce in maria_scan (info=0x7f6bc007e0d0, record=0x7f6bc018ef50 "\377") at /data/src/10.2/storage/maria/ma_scan.c:54
      #11 0x00005626241e7b74 in ha_maria::rnd_next (this=0x7f6bc009edd8, buf=0x7f6bc018ef50 "\377") at /data/src/10.2/storage/maria/ha_maria.cc:2477
      #12 0x0000562623c4ce83 in handler::ha_rnd_next (this=0x7f6bc009edd8, buf=0x7f6bc018ef50 "\377") at /data/src/10.2/sql/handler.cc:2669
      #13 0x0000562623dc1147 in rr_sequential (info=0x7f6bb40141a0) at /data/src/10.2/sql/records.cc:492
      #14 0x0000562623a36b7b in join_init_read_record (tab=0x7f6bb40140d8) at /data/src/10.2/sql/sql_select.cc:19791
      #15 0x0000562623a348ba in sub_select (join=0x7f6bb4012600, join_tab=0x7f6bb40140d8, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18862
      #16 0x0000562623a33e7e in do_select (join=0x7f6bb4012600, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18409
      #17 0x0000562623a0da5f in JOIN::exec_inner (this=0x7f6bb4012600) at /data/src/10.2/sql/sql_select.cc:3642
      #18 0x0000562623a0cf06 in JOIN::exec (this=0x7f6bb4012600) at /data/src/10.2/sql/sql_select.cc:3437
      #19 0x0000562623a0e0e0 in mysql_select (thd=0x7f6bb4000d90, tables=0x7f6bb4011cf0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f6bb4012510, unit=0x7f6bb4004988, select_lex=0x7f6bb40050c8) at /data/src/10.2/sql/sql_select.cc:3840
      #20 0x0000562623a02242 in handle_select (thd=0x7f6bb4000d90, lex=0x7f6bb40048c8, result=0x7f6bb4012510, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
      #21 0x0000562623aa36a7 in Sql_cmd_create_table::execute (this=0x7f6bb4011560, thd=0x7f6bb4000d90) at /data/src/10.2/sql/sql_table.cc:10997
      #22 0x00005626239cb7bb in mysql_execute_command (thd=0x7f6bb4000d90) at /data/src/10.2/sql/sql_parse.cc:6020
      #23 0x00005626239d0620 in mysql_parse (thd=0x7f6bb4000d90, rawbuf=0x7f6bb4011480 "CREATE TABLE t2 SELECT f FROM t1", length=32, parser_state=0x7f6bd0fc4570, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7796
      #24 0x00005626239be84a in dispatch_command (command=COM_QUERY, thd=0x7f6bb4000d90, packet=0x7f6bb4060e81 "CREATE TABLE t2 SELECT f FROM t1", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1827
      #25 0x00005626239bd345 in do_command (thd=0x7f6bb4000d90) at /data/src/10.2/sql/sql_parse.cc:1381
      #26 0x0000562623b1874c in do_handle_one_connection (connect=0x5626262dfb20) at /data/src/10.2/sql/sql_connect.cc:1336
      #27 0x0000562623b184b1 in handle_one_connection (arg=0x5626262dfb20) at /data/src/10.2/sql/sql_connect.cc:1241
      #28 0x00005626243433ae in pfs_spawn_thread (arg=0x562626321860) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #29 0x00007f6bd7512609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x00007f6bd70ee293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on 10.2, 10.3.
      Not reproducible on 10.4, possibly due to patches for MDEV-17665/MDEV-23296 and/or related bugs in 10.4+.
      No obvious problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.