[MDEV-21380] InnoDB: Corruption: Block space_id 4 != page space_id 0 or Block offset 1 != page offset 0 Created: 2019-12-21  Updated: 2023-11-29  Resolved: 2023-11-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.1
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 valgrind-3.12.0.SVN



 Description   

I'm not sure whether it's related to MDEV-12905, so I'm filing it separately.

On some reason it seems to be only reproducible with valgrind, but reliably, at least on my machine.

10.1 1f1e3ce8 valgrind

$ perl ./mtr --valgrind innodb.doublewrite
 
2019-12-22 01:40:16 4126700  InnoDB: Assertion failure in thread 68314880 in file buf0buf.cc line 2909
InnoDB: Failing assertion: block->page.space == page_get_space_id(page_align(ptr))
 
stdlib/abort.c:91(__GI_abort)[0x65bd42a]
buf/buf0buf.cc:2910(buf_block_align_instance(buf_pool_t*, unsigned char const*))[0xc12227d]
buf/buf0buf.cc:2940(buf_block_align(unsigned char const*))[0xc122339]
mtr/mtr0mtr.cc:420(mtr_memo_contains_page(mtr_t*, unsigned char const*, unsigned long))[0xc289e30]
include/mtr0log.ic:193(mlog_write_initial_log_record_fast(unsigned char const*, unsigned char, unsigned char*, mtr_t*))[0xc285ac7]
mtr/mtr0log.cc:287(mlog_write_ulint(unsigned char*, unsigned long, unsigned char, mtr_t*))[0xc286860]
handler/ha_innodb.cc:17286(innodb_make_page_dirty(THD*, st_mysql_sys_var*, void*, void const*))[0xc20f02f]
sql/sql_plugin.cc:3496(sys_var_pluginvar::global_update(THD*, set_var*))[0x604466]
sql/set_var.cc:198(sys_var::update(THD*, set_var*))[0x534d07]
sql/set_var.cc:795(set_var::update(THD*))[0x53686c]
sql/set_var.cc:696(sql_set_variables(THD*, List<set_var_base>*, bool))[0x53646a]
sql/sql_parse.cc:4077(mysql_execute_command(THD*))[0x5eaa57]
sql/sql_parse.cc:7209(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5f4409]
sql/sql_parse.cc:1501(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x5e35b9]
sql/sql_parse.cc:1131(do_command(THD*))[0x5e2377]
sql/sql_connect.cc:1331(do_handle_one_connection(THD*))[0x7257af]
sql/sql_connect.cc:1243(handle_one_connection)[0x7254e0]
perfschema/pfs.cc:1863(pfs_spawn_thread)[0xb889e4]
nptl/pthread_create.c:456(start_thread)[0x4e3f4a4]
x86_64/clone.S:99(clone)[0x6671d0f]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0xd0b9860): set global innodb_fil_make_page_dirty_debug = @space_id
Connection ID (thread ID): 2
Status: NOT_KILLED

Not reproducible on 10.2.



 Comments   
Comment by Marko Mäkelä [ 2023-11-29 ]

Here is the last failure of this type:

10.1 de20091f5cee6c018da37a6f4c2c5765

innodb.doublewrite '64k,innodb_plugin'   w50 [ fail ]
        Test ended at 2020-06-11 09:06:36
 
CURRENT_TEST: innodb.doublewrite
mysqltest: At line 225: query 'set global innodb_fil_make_page_dirty_debug = @space_id' failed: 2013: Lost connection to MySQL server during query
2020-06-11  9:06:34 140735208587392 [Note] InnoDB: Dirtying page:0 of space:0
2020-06-11  9:06:34 140735208587392 [ERROR] InnoDB: Corruption: Block space_id 11 != page space_id 0 or Block offset 1 != page offset 0 
2020-06-11 09:06:34 7fff781d8080  InnoDB: Assertion failure in thread 140735208587392 in file buf0buf.cc line 2909
InnoDB: Failing assertion: block->page.space == page_get_space_id(page_align(ptr))

It must be noted that before MariaDB Server 10.2, the test innodb.doublewrite would rather often fail in strange ways. This is because in older versions, a failure to start up InnoDB was not being handled properly.

Generated at Thu Feb 08 09:06:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.