Merge lp:~laurynas-biveinis/percona-server/bug1395543 into lp:percona-server/5.6

Proposed by Laurynas Biveinis on 2014-12-04
Status: Merged
Approved by: Sergei Glushchenko on 2014-12-13
Approved revision: no longer in the source branch.
Merged at revision: 711
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1395543
Merge into: lp:percona-server/5.6
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1395543
Reviewer Review Type Date Requested Status
Sergei Glushchenko g2 2014-12-04 Approve on 2014-12-13
Review via email: mp+243654@code.launchpad.net

Description of the change

Fix bug 1395543 (buf_LRU_free_page() crashes at
!buf_page_hash_get_low( buf_pool, b->space, b->offset, fold))

The issue is a race condition in page hash access between
buf_LRU_free_page and buf_pool_watch_set. After buf_LRU_free_page
returns from the buf_LRU_block_remove_hashed call - which removes the
page from the page hash, another thread may call buf_pool_watch_set,
which will insert the page. Then buf_LRU_free_page will attempt to
reinsert the compressed page descriptor into the page hash too and
will fail at the sanity check of the hash not containing that page
already.

Serialize the operations by requiring that buf_pool_watch_set holds
the LRU list mutex.

Fix bug 1395543 (buf_LRU_free_page() crashes at
!buf_page_hash_get_low( buf_pool, b->space, b->offset, fold))

The issue is a race condition in page hash access between
buf_LRU_free_page and buf_pool_watch_set. After buf_LRU_free_page
returns from the buf_LRU_block_remove_hashed call - which removes the
page from the page hash, another thread may call buf_pool_watch_set,
which will insert the page. Then buf_LRU_free_page will attempt to
reinsert the compressed page descriptor into the page hash too and
will fail at the sanity check of the hash not containing that page
already.

Serialize the operations by requiring that buf_pool_watch_set holds
the LRU list mutex.

Fix bug 1395543 (buf_LRU_free_page() crashes at
!buf_page_hash_get_low( buf_pool, b->space, b->offset, fold))

The issue is a race condition in page hash access between
buf_LRU_free_page and buf_pool_watch_set. After buf_LRU_free_page
returns from the buf_LRU_block_remove_hashed call - which removes the
page from the page hash, another thread may call buf_pool_watch_set,
which will insert the page. Then buf_LRU_free_page will attempt to
reinsert the compressed page descriptor into the page hash too and
will fail at the sanity check of the hash not containing that page
already.

Serialize the operations by requiring that buf_pool_watch_set holds
the LRU list mutex.

http://jenkins.percona.com/job/percona-server-5.6-param/768/

To post a comment you must log in.

Approve

review: Approve (g2)

Diff calculation failed

Calculating the branch diff failed. You can manually schedule an update if required.

Subscribers

People subscribed via source and target branches