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

Assertion `block->type == PAGECACHE_EMPTY_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == type || (block->type == PAGECACHE_PLAIN_PAGE && type == PAGECACHE_LSN_PAGE)' failed.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
    • 10.4, 10.5, 10.6
    • None

    Description

      # mysqld options required for replay:  --sql-mode=
      SET GLOBAL aria_encrypt_tables=1;
      CREATE TABLE t1 (a INT PRIMARY KEY,b INT) ENGINE=Aria;
      INSERT INTO t1 (a) VALUES ('ab12cd');
      ALTER TABLE t1 CHANGE b b TIMESTAMP DEFAULT '2017-05-08 16:32:54';
      LOAD INDEX INTO CACHE t1 INDEX (PRIMARY);
      DROP TABLE t1;
      SELECT LENGTH (DATA) AS len FROM (SELECT REPEAT ('a', 21846) AS DATA) AS sub;
      

      Leads to:

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      mysqld: /test/10.8_dbg/storage/maria/ma_pagecache.c:4452: pagecache_write_part: Assertion `block->type == PAGECACHE_EMPTY_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == type || (block->type == PAGECACHE_PLAIN_PAGE && type == PAGECACHE_LSN_PAGE)' failed.
      

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      Core was generated by `/test/MD091221-mariadb-10.8.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x145788cda700 (LWP 4177970))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014579db6e859 in __GI_abort () at abort.c:79
      #2  0x000014579db6e729 in __assert_fail_base (fmt=0x14579dd04588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55adde2544a8 "block->type == PAGECACHE_EMPTY_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == type || (block->type == PAGECACHE_PLAIN_PAGE && type == PAGECACHE_LSN_PAGE)", file=0x55adde252c30 "/test/10.8_dbg/storage/maria/ma_pagecache.c", line=4452, function=<optimized out>) at assert.c:92
      #3  0x000014579db7ff36 in __GI___assert_fail (assertion=assertion@entry=0x55adde2544a8 "block->type == PAGECACHE_EMPTY_PAGE || block->type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == type || (block->type == PAGECACHE_PLAIN_PAGE && type == PAGECACHE_LSN_PAGE)", file=file@entry=0x55adde252c30 "/test/10.8_dbg/storage/maria/ma_pagecache.c", line=line@entry=4452, function=function@entry=0x55adde255530 <__PRETTY_FUNCTION__.23585> "pagecache_write_part") at assert.c:101
      #4  0x000055addd8e9de4 in pagecache_write_part (pagecache=0x55addf2a85c0 <maria_pagecache_var>, file=file@entry=0x145750082838, pageno=pageno@entry=1, level=level@entry=0, buff=buff@entry=0x145750084b40 "", type=PAGECACHE_PLAIN_PAGE, lock=PAGECACHE_LOCK_LEFT_UNLOCKED, pin=PAGECACHE_PIN_LEFT_UNPINNED, write_mode=PAGECACHE_WRITE_DELAY, page_link=0x145788cd76d8, first_REDO_LSN_for_page=0, offset=0, size=8192) at /test/10.8_dbg/storage/maria/ma_pagecache.c:4452
      #5  0x000055addd90fbc0 in write_full_pages (info=info@entry=0x1457500823a8, lsn=0, block=block@entry=0x145750078088, data=0x14575008d348 'a' <repeats 200 times>..., length=8180) at /test/10.8_dbg/storage/maria/ma_blockrec.c:2179
      #6  0x000055addd918537 in write_block_record (info=info@entry=0x1457500823a8, old_record=old_record@entry=0x0, record=record@entry=0x145750081bd0 "VU", row=row@entry=0x145750082428, bitmap_blocks=bitmap_blocks@entry=0x145750082428, head_block_is_read=<optimized out>, row_pos=0x145788cd7e50, undo_lsn=1, old_record_checksum=0) at /test/10.8_dbg/storage/maria/ma_blockrec.c:3463
      #7  0x000055addd918915 in allocate_and_write_block_record (undo_lsn=1, row=0x145750082428, record=0x145750081bd0 "VU", info=0x1457500823a8) at /test/10.8_dbg/storage/maria/ma_blockrec.c:3571
      #8  _ma_write_init_block_record (info=0x1457500823a8, record=0x145750081bd0 "VU") at /test/10.8_dbg/storage/maria/ma_blockrec.c:3611
      #9  0x000055addd924857 in maria_write (info=0x1457500823a8, record=record@entry=0x145750081bd0 "VU") at /test/10.8_dbg/storage/maria/ma_write.c:157
      #10 0x000055addd8b9720 in ha_maria::write_row (this=0x1457500882e0, buf=0x145750081bd0 "VU") at /test/10.8_dbg/storage/maria/ha_maria.cc:1271
      #11 0x000055addd47eb58 in handler::ha_write_tmp_row (buf=0x145750081bd0 "VU", this=0x1457500882e0) at /test/10.8_dbg/sql/sql_class.h:7323
      #12 select_unit::write_record (this=this@entry=0x1457500169b0) at /test/10.8_dbg/sql/sql_union.cc:396
      #13 0x000055addd47f604 in select_unit::send_data (this=0x1457500169b0, values=<optimized out>) at /test/10.8_dbg/sql/sql_union.cc:157
      #14 0x000055addd413a60 in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=<optimized out>, this=<optimized out>) at /test/10.8_dbg/sql/sql_class.h:5605
      #15 JOIN::exec_inner (this=this@entry=0x145750016a98) at /test/10.8_dbg/sql/sql_select.cc:4601
      #16 0x000055addd414c2a in JOIN::exec (this=this@entry=0x145750016a98) at /test/10.8_dbg/sql/sql_select.cc:4513
      #17 0x000055addd412c3b in mysql_select (thd=thd@entry=0x145750000db8, tables=0x0, fields=@0x145750014820: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x145750014bc8, last = 0x145750014bc8, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201171004160, result=0x1457500169b0, unit=0x145750014bf8, select_lex=0x145750014580) at /test/10.8_dbg/sql/sql_select.cc:4993
      #18 0x000055addd322b34 in mysql_derived_fill (thd=thd@entry=0x145750000db8, lex=lex@entry=0x1457500050e8, derived=derived@entry=0x145750015430) at /test/10.8_dbg/sql/sql_derived.cc:1294
      #19 0x000055addd3230c2 in mysql_derived_optimize (thd=0x145750000db8, lex=0x1457500050e8, derived=0x145750015430) at /test/10.8_dbg/sql/sql_derived.cc:1084
      #20 0x000055addd3225af in mysql_handle_single_derived (lex=0x1457500050e8, derived=derived@entry=0x145750015430, phases=phases@entry=4) at /test/10.8_dbg/sql/sql_derived.cc:200
      #21 0x000055addd4122d2 in JOIN::optimize_inner (this=this@entry=0x1457500163f8) at /test/10.8_dbg/sql/sql_select.cc:2285
      #22 0x000055addd412548 in JOIN::optimize (this=this@entry=0x1457500163f8) at /test/10.8_dbg/sql/sql_select.cc:1809
      #23 0x000055addd412bec in mysql_select (thd=thd@entry=0x145750000db8, tables=0x145750015430, fields=@0x145750014168: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x145750014560, last = 0x145750014560, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x1457500163d0, unit=0x1457500051c0, select_lex=0x145750013ec8) at /test/10.8_dbg/sql/sql_select.cc:4979
      #24 0x000055addd412ef0 in handle_select (thd=thd@entry=0x145750000db8, lex=lex@entry=0x1457500050e8, result=result@entry=0x1457500163d0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.8_dbg/sql/sql_select.cc:545
      #25 0x000055addd372a72 in execute_sqlcom_select (thd=thd@entry=0x145750000db8, all_tables=0x145750015430) at /test/10.8_dbg/sql/sql_parse.cc:6253
      #26 0x000055addd37f932 in mysql_execute_command (thd=thd@entry=0x145750000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.8_dbg/sql/sql_parse.cc:3944
      #27 0x000055addd36bc64 in mysql_parse (thd=thd@entry=0x145750000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x145788cd9400) at /test/10.8_dbg/sql/sql_parse.cc:8028
      #28 0x000055addd37a8e9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145750000db8, packet=packet@entry=0x14575000b879 "SELECT LENGTH (DATA) AS len FROM (SELECT REPEAT ('a', 21846) AS DATA) AS sub", packet_length=packet_length@entry=76, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_class.h:1360
      #29 0x000055addd37dd2b in do_command (thd=0x145750000db8, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_parse.cc:1402
      #30 0x000055addd4f71c0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55ade0a27b38, put_in_cache=put_in_cache@entry=true) at /test/10.8_dbg/sql/sql_connect.cc:1418
      #31 0x000055addd4f77c5 in handle_one_connection (arg=arg@entry=0x55ade0a27b38) at /test/10.8_dbg/sql/sql_connect.cc:1312
      #32 0x000055addd979de6 in pfs_spawn_thread (arg=0x55ade093c358) at /test/10.8_dbg/storage/perfschema/pfs.cc:2201
      #33 0x000014579e07c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #34 0x000014579dc6b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.41 (dbg), 10.3.32 (dbg), 10.4.22 (dbg), 10.5.13 (dbg), 10.6.5 (dbg), 10.7.1 (dbg), 10.8.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (opt), 10.3.32 (opt), 10.4.22 (opt), 10.5.13 (opt), 10.6.5 (opt), 10.7.1 (opt), 10.8.0 (opt)

      Attachments

        Activity

          People

            monty Michael Widenius
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.