Issue Details (XML | Word | Printable)

Key: CORE-3535
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

Write target of dirty page could be undefined if error happens when nbackup state is changed

Created: 24/Jun/11 08:34 AM   Updated: 18/Jan/16 05:08 PM
Component/s: Engine
Affects Version/s: 2.5.0
Fix Version/s: 2.5.1, 3.0 Alpha 1

QA Status: No test

 Description  « Hide
The bug show itself in DEBUG build - assertion failed at cch.cpp\write_page() near line 5022 :

// write out page to main database file, and to any
// shadows, making a special case of the header page
BackupManager* bm = dbb->dbb_backup_manager;
const int backup_state = bm->getState();

if (bdb->bdb_page.getPageNum() >= 0)
fb_assert(backup_state != nbak_state_unknown); <------- HERE
page->pag_pageno = bdb->bdb_page.getPageNum();

When exception happens in BackupManager::endBackup() method than destructor
BackupManager::StateWriteGuard::~StateWriteGuard() released the state lock *before*
backup state is set into nbak_state_unknown. In this small time window it is possible
that another thread fetched and modified some page.

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