lp:~laurynas-biveinis/percona-server/bug1227581

Created by Laurynas Biveinis and last modified
Get this branch:
bzr branch lp:~laurynas-biveinis/percona-server/bug1227581
Only Laurynas Biveinis can upload to this branch. If you are Laurynas Biveinis please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

429. By Laurynas Biveinis on 2013-09-25

Fix bug 1227581 (InnoDB: Failing assertion: buf_page_in_file(bpage) in
file buf0flu.cc line 2674 | abort (sig=6) in
buf_pool_get_dirty_pages_count on ALTER TABLE).

The issue is that buf_LRU_free_page() may perform a flush list
relocation for a dirty zip page, making it possible to observe a page
in BUF_BLOCK_REMOVE_HASH state on the flush list between
buf_LRU_block_remove_hashed() and buf_flush_relocate_on_flush_list()
calls, if another thread reads flush list pages without the LRU list
mutex.

Places where a thread iterates through the flush list without the LRU
list mutex and does not expect to see a BUF_BLOCK_REMOVE_HASH page are
buf_pool_get_dirty_pages_count(), buf_do_flush_list_batch(), and
buf_get_latched_pages_number_instance(). The fix is to accept such
pages there:
- in buf_pool_get_dirty_pages_count() check such page as if it were
  BUF_BLOCK_FILE_PAGE;
- in buf_flush_page_and_try_neighbors(), called from
  buf_do_flush_list_batch(), do not attempt to flush such page.
- in buf_flush_set_hp(), also called from buf_do_flush_list_batch(),
  allow setting hazard pointer on such page.
- in buf_get_latched_pages_number_instance(), silently accept such
  page as BUF_BLOCK_FILE_PAGE.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:percona-server/5.6
This branch contains Public information 
Everyone can see this information.