[MDEV-14690] Assertion `page_link == &fake_link' failed in pagecache_write_part Created: 2017-12-17  Updated: 2018-01-11  Resolved: 2018-01-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Aria
Affects Version/s: 5.5, 10.0, 10.1, 10.2
Fix Version/s: 5.5.59, 10.0.34, 10.3.4, 10.1.31, 10.2.13

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Sprint: 5.5.59

 Description   

CREATE TABLE t1 (a CHAR(8), b CHAR(8), c CHAR(8) NOT NULL DEFAULT '', f FLOAT, KEY(f)) ENGINE=Aria;
INSERT INTO t1 (a) VALUES ('foo');
DELETE FROM t1 WHERE c < 'bar';
ALTER TABLE t1 DISABLE KEYS; 
INSERT INTO t1 (b) VALUES ('');
ALTER TABLE t1 ENABLE KEYS;
 
# Cleanup
DROP TABLE t1;

5.5 20089f5a39fa8f

mysqld: /data/src/5.5/storage/maria/ma_pagecache.c:4154: pagecache_write_part: Assertion `page_link == &fake_link' failed.
171217  4:19:01 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f0263b8bee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000000000097581a in pagecache_write_part (pagecache=0x1d03c00 <maria_pagecache_var>, file=0x7f025e57a6c8, pageno=1, level=3, buff=0x7f025e6072e0 "", type=PAGECACHE_PLAIN_PAGE, lock=PAGECACHE_LOCK_WRITE_UNLOCK, pin=PAGECACHE_UNPIN, write_mode=PAGECACHE_WRITE_DELAY, page_link=0x7f02655fabd0, first_REDO_LSN_for_page=0, offset=0, size=8192) at /data/src/5.5/storage/maria/ma_pagecache.c:4154
#9  0x00000000009980c3 in _ma_write_keypage (page=0x7f02655fac30, lock=PAGECACHE_LOCK_WRITE_UNLOCK, level=3) at /data/src/5.5/storage/maria/ma_page.c:232
#10 0x00000000009e0172 in _ma_flush_pending_blocks (sort_param=0x7f02655fc0b0) at /data/src/5.5/storage/maria/ma_check.c:5908
#11 0x00000000009e4c15 in _ma_create_index_by_sort (info=0x7f02655fc0b0, no_messages=1 '\001', sortbuff_size=134217728) at /data/src/5.5/storage/maria/ma_sort.c:236
#12 0x00000000009d9f26 in maria_repair_by_sort (param=0x7f025e5e2078, info=0x7f025e53f060, name=0x7f02655fc9e0 "./test/t1", rep_quick=1 '\001') at /data/src/5.5/storage/maria/ma_check.c:3891
#13 0x000000000094a72e in ha_maria::repair (this=0x7f025e473878, thd=0x7f025f664060, param=0x7f025e5e2078, do_optimize=false) at /data/src/5.5/storage/maria/ha_maria.cc:1645
#14 0x000000000094b3bf in ha_maria::enable_indexes (this=0x7f025e473878, mode=2) at /data/src/5.5/storage/maria/ha_maria.cc:1991
#15 0x00000000007b58b7 in handler::ha_enable_indexes (this=0x7f025e473878, mode=2) at /data/src/5.5/sql/handler.cc:3662
#16 0x00000000006a0bd1 in mysql_alter_table (thd=0x7f025f664060, new_db=0x7f025e548730 "test", new_name=0x7f025e548128 "t1", create_info=0x7f02655fe6e0, table_list=0x7f025e548160, alter_info=0x7f02655fe640, order_num=0, order=0x0, ignore=false, require_online=false) at /data/src/5.5/sql/sql_table.cc:6405
#17 0x00000000009245f6 in Alter_table_statement::execute (this=0x7f025e548738, thd=0x7f025f664060) at /data/src/5.5/sql/sql_alter.cc:106
#18 0x000000000060658a in mysql_execute_command (thd=0x7f025f664060) at /data/src/5.5/sql/sql_parse.cc:4503
#19 0x00000000006098ce in mysql_parse (thd=0x7f025f664060, rawbuf=0x7f025e548078 "ALTER TABLE t1 ENABLE KEYS", length=26, parser_state=0x7f02655ff640) at /data/src/5.5/sql/sql_parse.cc:5923
#20 0x00000000005fd5e3 in dispatch_command (command=COM_QUERY, thd=0x7f025f664060, packet=0x7f026335b061 "ALTER TABLE t1 ENABLE KEYS", packet_length=26) at /data/src/5.5/sql/sql_parse.cc:1066
#21 0x00000000005fc7d5 in do_command (thd=0x7f025f664060) at /data/src/5.5/sql/sql_parse.cc:793
#22 0x00000000006ff7cf in do_handle_one_connection (thd_arg=0x7f025f664060) at /data/src/5.5/sql/sql_connect.cc:1268
#23 0x00000000006ff55c in handle_one_connection (arg=0x7f025f664060) at /data/src/5.5/sql/sql_connect.cc:1184
#24 0x0000000000a0d6d9 in pfs_spawn_thread (arg=0x7f0260376fc0) at /data/src/5.5/storage/perfschema/pfs.cc:1015
#25 0x00007f0265232494 in start_thread (arg=0x7f0265600700) at pthread_create.c:333
#26 0x00007f0263c4893f in clone () from /lib/x86_64-linux-gnu/libc.so.6



 Comments   
Comment by Oleksandr Byelkin [ 2018-01-11 ]

It looks like just not following call convention (passed link when it should not) but generally nothing serious happened. All calls will be checked.

Comment by Oleksandr Byelkin [ 2018-01-11 ]

github: bb-5.5-MDEV-14690

revision-id: b6cdfacbec61f512ec307a2e112bd7b8c0529827 (mariadb-5.5.58-27-gb6cdfacbec6)
parent(s): bdcd7f79e4a33e08bae31a86cee98e23ff6824ff
author: Oleksandr Byelkin
committer: Oleksandr Byelkin
timestamp: 2018-01-11 12:59:30 +0100
message:

MDEV-14690: Assertion `page_link == &fake_link' failed in pagecache_write_part

Fix the call to correspond protocoll of pagecache call.
Fix of misleading variables names.

Comment by Michael Widenius [ 2018-01-11 ]

Review comments:

  • Remove new end space in maria.test
  • Please revert name changes in _ma_apply_redo_insert_row_head_or_tail. Not part of the
    bug fix. You can do that in a separate patch if you really want the name changes.
    (Reason is that it's hard to see if this is part of the bug fix or not)

Otherwise ok to push

Comment by Michael Widenius [ 2018-01-11 ]

done

Generated at Thu Feb 08 08:15:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.