Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write target of dirty page could be undefined if error happens when nbackup state is changed [CORE3535] #3892

Closed
firebird-automations opened this issue Jun 24, 2011 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

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.

Commits: 44fad53 d00d66a

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Fix Version: 2.5.1 [ 10333 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

assignee: Vlad Khorsun [ hvlad ]

summary: Write target for dirty page could be undefined if error happens when nbackup state is changed => Write target of dirty page could be undefined if error happens when nbackup state is changed

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants