Comment 2 for bug 1664280

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Re: Race condition between accessing and flushing buffer pool page | InnoDB: Failing assertion: buf_page_in_file(bpage) in buf_page_make_young

Triggering execution history:

Thread 1 calls buf_page_optimistic_get with some block pointer
Thread 2 (flushes and) evicts the same block, places it on the free list
Thread 3 calls buf_page_read, buf_page_read_low, buf_page_init_for_read, buf_page_init
Thread 3 sets block->state to BUF_BLOCK_FILE_PAGE
Thread 1 locks block mutex
Thread 1 checks block->state == BUF_BLOCK_FILE_PAGE
Thread 1 increments block.page->buf_fix_count
Thread 3 calls buf_page_init_low
Thread 3 resets buf_fix_count to zero, causing one of the possible assert failures.