innodb_buffer_pool_evict_uncompressed might attempt to process non-unzip_LRU page, crashing debug build
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Medium
|
Laurynas Biveinis | |||
5.7 |
Fix Released
|
Medium
|
Laurynas Biveinis |
Bug Description
innodb_
{
...
mutex_
for (buf_block_t* block = UT_LIST_GET_LAST(
block != NULL; ) {
buf_block_t* prev_block = UT_LIST_GET_PREV(
unzip_LRU, block);
...
if (!buf_LRU_
mutex_
all_evicted = false;
} else {
mutex_
mutex_
}
block = prev_block;
}
mutex_
}
...
}
When buf_LRU_free_page returns true, it has released the LRU list mutex. That mutex is retaken, and the loop continues with block = prev_block. But, while the LRU list mutex was released, there was nothing preventing prev_block being removed from unzip_LRU list as well, rendering loop invariants invalid.
This shows up as a crash on Jenkins:
innodb.
...
At line 119: query 'SET GLOBAL innodb_
...
2017-01-03 17:15:04 a9285b70 InnoDB: Assertion failure in thread 2837994352 in file ha_innodb.cc line 16654
InnoDB: Failing assertion: buf_block_
...
#5 0xb7272802 in *__GI_abort () at abort.c:92
#6 0x087e0e86 in innodb_
#7 0x087e0ffb in innodb_
#8 0x0843987a in sys_var_
#9 0x0836eae3 in sys_var::update (this=0x9d09568, thd=0x9eb1e20, var=0x9f6c980) at /home/jenkins/
#10 0x0836fc60 in set_var::update (this=0x9f6c980, thd=0x9eb1e20) at /home/jenkins/
#11 0x0836f7fb in sql_set_variables (thd=0x9eb1e20, var_list=0x9eb3ce0) at /home/jenkins/
#12 0x08424240 in mysql_execute_
#13 0x0842b7ed in mysql_parse (thd=0x9eb1e20, rawbuf=0x9f6c7f8 "SET GLOBAL innodb_
#14 0x0841d8c0 in dispatch_command (command=COM_QUERY, thd=0x9eb1e20, packet=0x9f647c9 "SET GLOBAL innodb_
#15 0x0841c8f4 in do_command (thd=0x9eb1e20) at /home/jenkins/
#16 0x083e4a48 in do_handle_
#17 0x083e4521 in handle_
#18 0x0873a2e2 in pfs_spawn_thread (arg=0x9dfa158) at /home/jenkins/
#19 0xb7751954 in start_thread (arg=0xa9285b70) at pthread_
#20 0xb731daae in clone () at ../sysdeps/
tags: | added: bp-split ci regression xtradb |
https:/ /github. com/percona/ percona- server/ pull/1330 /github. com/percona/ percona- server/ pull/1331
https:/