Issue Details (XML | Word | Printable)

Key: CORE-5329
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Dmitry Yemanov
Votes: 0
Watchers: 2
Operations

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

Database gets partially corrupted in the "no-reserve" mode

Created: 13/Aug/16 03:14 PM   Updated: 16/Aug/16 07:33 AM
Component/s: Engine
Affects Version/s: 3.0.0
Fix Version/s: 3.0.1, 4.0 Alpha 1

QA Status: Done successfully
Test Details: NB: could not get validation errors using steps described by hvlad. Confirmed bug if use .fbk from 2.5.x and restore it.


 Description  « Hide
If a "no-reserve" (aka "use full space") option was enabled for a v2.5 database, then the issue becomes visible right after restore on v3.0, just do an immediate validation and see:

Summary of validation errors
Number of database page errors : 90167

Then check firebird.log and see:

solaris Sat Aug 13 18:01:28 2016
Database: /work/data/abc.fdb
Error: Page 1017 wrong type (expected SCN inventory encountered purposely undefined)

solaris Sat Aug 13 18:01:28 2016
Database: /work/data/abc.fdb
Error: SCN's page 1017 {sequence 1} inconsistent

solaris Sat Aug 13 18:01:28 2016
Database: /work/data/abc.fdb
Error: Page 2034 wrong type (expected SCN inventory encountered purposely undefined)

solaris Sat Aug 13 18:01:28 2016
Database: /work/data/abc.fdb
Error: SCN's page 2034 {sequence 2} inconsistent

and so on. Only SCN pages are corrupted, they are all unexpectedly zeroed.

It means that only incremental restore is affected by this issue, basically the database operates OK. A short-term workaround is: gfix -use reserve + backup/restore.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 14/Aug/16 06:19 PM
The issue is easy to reproduce without restore:
- create database
- set "no reserve" (gfix -use full)
- fill it with some data
- run validation