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

Firebird 4: Database page errors directly after gbak, which dissappear after some calls of gfix #7134

Closed
KlausMu opened this issue Feb 16, 2022 · 6 comments

Comments

@KlausMu
Copy link

KlausMu commented Feb 16, 2022

When I restore a backup with Firebird 4.0.1.2692 (gbak) and immediatly after I run gfix, I get
Number of database page errors : 6
When I rerun gfix after 1 or 2 seconds, I get
Number of database page warnings : 6
After another rerun, all errors and warnings are gone.
Seems firebird is healing the errors ...
Is this normal? I don't have this behaviour with 3.0.8.33535.

@hvlad
Copy link
Member

hvlad commented Feb 16, 2022

Could you show messages that appears at firebird.log while gfix runs ?

@KlausMu KlausMu changed the title Firebird 4: Database page errors directly after gbak, which dissappear alone after some seconds Firebird 4: Database page errors directly after gbak, which dissappear after some calls of gfix Feb 16, 2022
@KlausMu
Copy link
Author

KlausMu commented Feb 16, 2022

Ok, it is a little bit different, but still weird.

  • I do a restore with gbak.exe from a backup created in FB 2.5, and the resulting DB seems to have errors, but only in FB4, not in FB3
  • running gfix -v -fu (errors are repaired) leads to 6 errors, second run to 6 warnings, third run is fine
  • running gfix -v -fu -n (which should not repair to my understanding) immediately repairs all 6 errors, second run shows no errors

So I changed the title to "Firebird 4: Database page errors directly after gbak, which dissappear after some calls of gfix"

Here are the details:


restore: .\gbak.exe -rep -c -v -user sysdba -password secret d:\Firebird2.5.fbk d:\new.fdb
I do a restore from a Firebird 2.5 backup.


first run: .\gfix.exe -v -fu -user sysdba -password secret :d:\new.fdb

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Validation started

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Error: Page 1843 is used but marked free

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Error: Page 1844 is used but marked free

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Error: Page 1845 is used but marked free

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Error: Page 1846 is used but marked free

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Error: Page 1847 is used but marked free

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Error: Page 1856 is used but marked free

WORKSTATION Wed Feb 16 19:47:44 2022
Database: D:\NEW.FDB
Validation finished: 6 errors, 0 warnings, 6 fixed


second run: .\gfix.exe -v -fu -user sysdba -password secret :d:\new.fdb

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Validation started

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Warning: Page 1843 is an orphan

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Warning: Page 1844 is an orphan

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Warning: Page 1845 is an orphan

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Warning: Page 1846 is an orphan

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Warning: Page 1847 is an orphan

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Warning: Page 1856 is an orphan

WORKSTATION Wed Feb 16 19:48:41 2022
Database: D:\NEW.FDB
Validation finished: 0 errors, 6 warnings, 6 fixed


third run: .\gfix.exe -v -fu -user sysdba -password secret :d:\new.fdb

WORKSTATION Wed Feb 16 19:49:01 2022
Database: D:\NEW.FDB
Validation started

WORKSTATION Wed Feb 16 19:49:01 2022
Database: D:\NEW.FDB
Validation finished: 0 errors, 0 warnings, 0 fixed


first run with .\gfix.exe -v -fu -n -user sysdba -password secret :d:\new.fdb

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Validation started

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Error: Page 1843 is used but marked free

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Error: Page 1844 is used but marked free

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Error: Page 1845 is used but marked free

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Error: Page 1846 is used but marked free

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Error: Page 1847 is used but marked free

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Error: Page 1856 is used but marked free

WORKSTATION Wed Feb 16 19:49:44 2022
Database: D:\NEW.FDB
Validation finished: 6 errors, 0 warnings, 0 fixed


second run with .\gfix.exe -v -fu -n -user sysdba -password secret :d:\new.fdb

WORKSTATION Wed Feb 16 19:50:30 2022
Database: D:\NEW.FDB
Validation started

WORKSTATION Wed Feb 16 19:50:30 2022
Database: D:\NEW.FDB
Validation finished: 0 errors, 0 warnings, 0 fixed

hvlad added a commit that referenced this issue Feb 16, 2022
… after gbak, which dissappear after some calls of gfix
@hvlad
Copy link
Member

hvlad commented Feb 16, 2022

Please check next snapshot build

@KlausMu
Copy link
Author

KlausMu commented Feb 17, 2022

Ok, so the bug was in gfix, not in gbak? "gbak -c" with 2692 and afterwards "gfix" with 2728-snapshot shows no errors. Thanks for fixing it.

@hvlad
Copy link
Member

hvlad commented Feb 17, 2022

Yes, the problem was within validation code. It reported false errors due to garbage collection in system tables at not appropriate moment.

@pavel-zotov
Copy link

@@@ QA issue @@@
Could not reproduce on b/r of starndard employee database from FB 2.5

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

3 participants