/en/articles/how-to-check-ram-and-avoid-database-corruptions/Alexey Kovyazin, 31-03-2014
Below is the description of common errors and problems in InterBase/Firebird databases and their recovery chances.
To get exact recovery price and time please contact us via email.
For approximate pricing please see "Firebird and InterBase Recovery" service description. There is no 100% warranty that described errors exactly correspond to the described reasons.
Error description
Database cannot be opened using Firebird or InterBase engine, and the following message appears: Internal gds software consistency check (cannot find tip page (165))
Reason (why it happened?) The most probable reasons are abnormal server shutdown (using Reset button), wrong backup approach or backup tools. On Windows XP such corruption can be caused by "System Restore" feature for "gdb" files.
Recovery process
First, the database should be scanned with FirstAID Diagnostician. If FirstAID does not warn about serious corruption, corruption can be fixed with the full version of FirstAID.
In the case of serious corruption, the custom recovery needed.
Chances to fix corruption
99%
Error description
Error message appeared in standard output or in firebird.log or interbase.log:
Database file appears corrupt. Wrong page type. Page NNN is of wrong type (expected X, found Y)
Reason
The most probable reasons are abnormal server shutdown (using Reset button), wrong backup procedure or wrong backup tools/approach.
Recovery process
First, the database should be scanned with FirstAID Diagnostician. If FirstAID does not warn about serious corruption, corruption can be fixed with the full version of FirstAID.
Otherwise, custom recovery process needed.
Chances to fix corruption
95%.
Error description
The database cannot be open, and the following error message appears: Unknown database I/O error for file "*.gdb". Error while trying to read from the file.
Reason
Due to the abnormal server shutdown, the most recent database pages were not written to the disk.
Recovery process
Custom recovery process. Database is checked by gfix and backup/restore.
Recovery chances
95%
Error description
Error message appears: Internal gds software consistency check (decompression overran buffer (179))
Reason
It is a serious database corruption: system tables could be damaged. Sometimes this error occurs after database transfer to the new server/computer. Investigation needed.
Recovery process
Database structure analysis, generation of new pages, several iterations needed.
Recovery chances
95%
Error description
An error message appears: Internal gds software consistency check. Wrong record length
Reason
Most often "Wrong record length" error are caused by bad RAM. We strongly recommend checking memory (RAM) at the server.
Recovery process
Locate and delete wrong records using IBSurgeon's low-level tools. Several iterations needed.
Recovery chances
97%
Error description
Database file appears corrupt. Bad checksum. Checksum error on database page XX.
Reason
Bad RAM. We strongly recommend checking memory (RAM) at the server.
Recovery process
Custom recovery process. Several iterations needed.
Recovery chances
99%
Error description
The database seems to be working, but gbak cannot complete backup.
Error text:
Internal gds software consistency check (cannot find record back version (291))
gds_$receive failed. Exiting before completion due to errors. internal gds software consistency check (can't continue after bug check).
Reason
Most probable reason is wrong transaction management. Transactions' performance investigation.
Recovery process
The database requires detailed analysis, and usually the solution is to find and delete problem database objects and then recreate them. Sometimes it is necessary to transfer data to the new database.
Recovery chances
99%
Error showings
Internal gds software consistency check (next transaction older than oldest active transaction (266))
Reason
This seldom error occurs in InterBase 4.x-5.x, it's a bug.
Recovery process
Custom recovery process
Recovery chances
99%
Error description
The database cannot be opened and Firebird/InterBase does not consider it as a valid database.
Reason
Physical corruption, HDD crash.
Recovery process
Custom recovery process
Recovery chances
80%
Error description
It happens on InterBase 4.x-5.x servers and early Firebird (0.9.x) betas. The database cannot be opened, database file size is 4Gb.
Reason
Implementation limit of InterBase 4.x-5.x-6.0.x, and early Firebird 0.9.x.
Recovery process
Custom recovery process.
Recovery chances
Usually, we can save all data (i.e., 100%), but sometimes it can be less than 70%.
Error description
Error text: Conversion error from string "XXX".
Reason
Preliminary diagnosis is impossible, on-site investigation needed.
Recovery process
Custom recovery process.
Recovery chances
99%
Error showings
Multiple entries in firebird.log or interbase.log with errors 10054, 10038, 10093, etc.
Reason
These errors are caused by network problems - check your hubs, network adapters, etc. It is not a Firebird/InterBase error itself, but it may impact Firebird/InterBase.
Recovery process
We offer FBScanner tool to solve "10054 errors" problem (among other issues). See details here.
Recovery chances
Not applicable.
Error description
Error messages text: internal gds software consistency check (partner index description not found (175))
Missed index for a primary or foreign key.
Reason
It may be caused by physical corruption or internal server bugs.
Recovery process
Custom recovery process.
Recovery chances
100%
Error description
Below there is a list of seldom Firebird/InterBase errors, which can be caused by different reasons. Do not hesitate to send us the description of your problem - we can help you.
Wrong UDF may cause the following errors in interbase.log:
SCH_validate -- not entered
SCH_validate -- wrong thread
Index corruption may cause the following message in interbase.log:
Page 34672 is an orphan
And this error can occur during intensive inserts/update/delete during the single transaction:
internal gds software consistency check (Too many savepoints (287))
It is hard to recognize the reason without investigation of database in case of the following errors:
internal gds software consistency check (error during savepoint backout (290))
internal gds Software consistency check (size of opt block exceeded (286))
internal gds software consistency check (invalid SEND request (167))
Probable Reason
Different reasons. We need to investigate corrupted database.
Recovery process
Custom recovery process.
Recovery chances
Various