lp:~laurynas-biveinis/percona-server/bug1086680-5.1

Created by Laurynas Biveinis and last modified
Get this branch:
bzr branch lp:~laurynas-biveinis/percona-server/bug1086680-5.1
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

519. By Laurynas Biveinis

Fix bug 1086680 (Valgrind: free in buf_page_get_gen (Invalid read in
buf_flush_batch / buf_flush_list) + free in buf_page_get_gen (Invalid
read in buf_flush_page_and_try_neighbors)) in XtraDB.

The Valgrind errors and crashes happen because of a race condition
involving a dirty compressed page block for which there is
uncompressed page image in the buffer pool.

First, a master thread (or possible another query thread) does a flush
list flush and for that acquires the flush list mutex, gets a pointer
to a page, releases the flush list mutex.

At this point another thread starts reading the same page into the
buffer. Since it is a dirty compressed page, it allocates an
uncompressed page, relocates the page on the flush list, frees the
compressed page descriptor.

At this point the flushing thread proceeds to use the pointer which is
now dangling, causing the issue.

To fix this, a new buffer pool mutex is introduced that protects flush
list relocations and flush list page reads with no flush list mutex
taken. The mutex priority is between the page latch and the LRU list
mutex priorities.

Acquire this mutex in buf_page_get_gen() when we are about to relocate
the page on the flush list. Also acquire it in buf_flush_batch()
around the flushing. Temporarily release this mutex to obey latching
order in buf_flush_page() after an I/O fix is set on the page we are
about to flush, as this also prevents the flush list relocation.

518. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug110159-5.1

517. By <email address hidden>

Merge lp:~sergei.glushchenko/percona-server/51-ST-27220-bug1042946

516. By <email address hidden>

Merge lp:~hrvojem/percona-server/rn-5.1.67-14.3

515. By Stewart Smith

merge 5.1.66-14.2 release branch

514. By <email address hidden>

Merge lp:~percona-core/percona-server/release-5.1.66-14.1

513. By <email address hidden>

Merge lp:~hrvojem/percona-server/bug1092106-5.1

512. By <email address hidden>

Merge lp:~hrvojem/percona-server/rn-5.1.66-14.2-r2

511. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.1

510. By <email address hidden>

Merge lp:~vlad-lesin/percona-server/5.1-bug1049871-injections-gca

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.5
This branch contains Public information 
Everyone can see this information.