Issue Details (XML | Word | Printable)

Key: CORE-1298
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

BTR\garbage_collect code can make a deadlock in a page cache

Created: 03/Jun/07 07:07 AM   Updated: 22/Aug/16 05:49 AM
Component/s: Engine
Affects Version/s: 1.0.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0, 1.5.4, 2.0.1, 2.1 Initial
Fix Version/s: 2.1 Beta 1, 2.0.2

Environment: It was detected on FB 2.1 beta but suspect code is present since the day one

QA Status: Cannot be tested

 Description  « Hide
To remove page from index BTR\garbage_collect take locks on parent, left, removing and right pages in exactly this order.
After that it searched parent page for node pointing to removing page and, if not found, traverse upper level of b-tree by right sibling pointers.
It can lead to deadlocks as locks at lower level peges are retained.

Solution is to searched node in parent page right after it being fetched and before fetch of lower level pages

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.