firebird
firebird copied to clipboard
FB4 GUID NBACKUP catastrophe
FB 4.0.3.2853-0_Win32 Windows 10 64 bit.
We are running GUID based nbackup very often with JayBird.
One time this fault happened: (firebird.log) KASSA1 Fri Oct 7 23:31:18 2022 I/O error during "WriteFile" operation for file "C:\FDB\DB.FDB.DELTA" Error while trying to write to file Begäran misslyckades på grund av ett oåterkalleligt maskinvarufel.
Message is in Swedish and mean that "task failed because of a unrecoverable hardware error".
java.sql.SQLException: I/O error during "WriteFile" operation for file "C:\FDB\DB.FDB.DELTA"; Error while trying to write to file; Begäran misslyckades på grund av ett oåterkalleligt maskinvarufel. [SQLState:08001, ISC error code:335544344]
Any connection to the database file after this incident fails with error: internal Firebird consistency check (can't attach after bugcheck) [SQLState:XX000, ISC error code:335544333]
Tried running gfix failed with same error message. Strangely restart of the computer did not help but restarting the FB service some how "fixed" the DB file and connection is possible.
It seems that the DB enters a very sensitive state during nbackup and failure cause a catastrophe.
The bugcheck state is kept until full disconnect of database. For SS it means all user connections should gone. It allows Firebird to release all memory related with bugcheck'ed database. This is not new beviour and inherited from IB days. The bugcheck itself should be written into firebird.log.
restart of the computer did not help but restarting the FB service some how "fixed" the DB file
It is very strange to read this, do you mean that "restart of the computer" doesn't restar Firebird service ? ;) And, of course, restart of service clear bugcheck state, while it (restart) was not necessary.
It is highly recommended to validate database after any bugcheck, BTW.
Sorry the user swore to me that the computer was restarted but I checked windows logs and they did not.
Does the database enter "bugcheck" state with each nbackup? Is there a way to exit "bugcheck" state without restart?
How to gracefully recover such situations?
Sorry the user swore to me that the computer was restarted but I checked windows logs and they did not.
It happens with users regularly ;)
Does the database enter "bugcheck" state with each nbackup? Is there a way to exit "bugcheck" state without restart?
No, of course not. "Bugcheck" means that happens something that "never can be". It is very rare situation. To be more concrete I need to know bugcheck error message - look firebird.log for it.
How to gracefully recover such situations?
Disconnect all users, make file copy of database (and delta file if present) if possible, and validate database. Next actions depends on validation results.
It's nice to read that's it's very rare:) But with this user we are testing FB4 (before 2.5) and this happens so I'm worried because we have hundreds of user on FB2.5.
The only information in firebird.log is:
One time this fault happened: (firebird.log) KASSA1 Fri Oct 7 23:31:18 2022 I/O error during "WriteFile" operation for file "C:\FDB\DB.FDB.DELTA" Error while trying to write to file Begäran misslyckades på grund av ett oåterkalleligt maskinvarufel.
Message is in Swedish and mean that "task failed because of a unrecoverable hardware error".
It's nice to read that's it's very rare:) But with this user we are testing FB4 (before 2.5) and this happens so I'm worried because we have hundreds of user on FB2.5.
It is nice you have have hundreds of users, hope they are all satisfied and happy, but... you ask if "database enter "bugcheck" state with each nbackup?" and I answers - no, then you ask "Is there a way to exit "bugcheck" state without restart?" and I answers - disconnect all users ...what answers you expected to get ?
Since you can't give exact bugcheck error message I need to simulate this hardware (!) failure somehow in the hope to get similar situation. It will not be fast, it might not happen for me.
Message is in Swedish and mean that "task failed because of a unrecoverable hardware error".
If your hardware if failing nothing can be done at software level. Fix your hardware first.
Since you can't give exact bugcheck error message I need to simulate this hardware (!) failure somehow in the hope to get similar situation. It will not be fast, it might not happen for me.
FB did not print any other message than the one I pasted from firebird.log. What can be the cause? Is there a way to run FB in a debug mode or something?
Is the Firebird installation and the database in the same disk? Could it be that for some hardware error the disk was remounted as read only so no log were saved?
Is the Firebird installation and the database in the same disk? Could it be that for some hardware error the disk was remounted as read only so no log were saved?
Same disk (SSD). Windows 10 desktop computer.
So, look at Windows event for some error
So, look at Windows event for some error
Same message. Nothing about "bugcheck".
So, look at Windows event for some error
Same message. Nothing about "bugcheck".
"bugcheck" is a Firebird term, if Windows detected a hardware failure, I would expect Windows itself to have logged an event about that (unless of course, that hardware failure also prevented Windows from writing to the event log).
There is a windows hardware failure Windos log "Begäran misslyckades på grund av ett oåterkalleligt maskinvarufel." Message is in Swedish and mean that "task failed because of a unrecoverable hardware error".
The gentlemen were asking about a specific "bugcheck" error message but there are none in firebird.log.
After checking the code I should say that not every bugcheck is written into firebird.log, I was wrong here, sorry. But this changes nothing actually.
I have a question. You wrote that to exit "bugcheck" mode all users has to be disconnected. What is the best way to do that without restarting computer or service? It's not possible to delete MON$ATTACHMENTS because it's not possible to connect when db in "bugcheck".
When database is bugcheck'ed, no new connections is possible. Existing connections get "internal Firebird consistency check" error on any request, except of disconnect. If applications sleeps or not disconnects as reaction on "internal Firebird consistency check" errors, then you shoud try to shutdown database using gfix (as @aafemt wrote above).
If this not helps, disconnect (or shutdown) all other attached databases in normal mode and restart the service.
BTW, this is support question and it is better to ask it here
We had another failure. Restarting the computer made the DB exiting the "bugcheck" mode. internal Firebird consistency check (can't continue after bugcheck) [SQLState:XX000, ISC error code:335544333] There are many DB operations on this SSD and I just can't stop wondering about why making a nbackup puts the DB in this "sensitive" state? Reading or writing data might fail but does not put it in "bugcheck" state. Now it feels like with every nbackup there is a risk of making the DB unavailable bacause of a hardware glitch.
Can't the nbackup just fail and roll back like other operations?
We had another failure.
Again with "unrecoverable hardware error" ?
There are many DB operations on this SSD and I just can't stop wondering about why making a nbackup puts the DB in this "sensitive" state?
Perhaprs because nbackup creates additional load on IO subsystem
Can't the nbackup just fail and roll back like other operations?
It should do something like this, of course. If your apps would log error received just before bugcheck it will help to find and fix bugcheck reason. Or I could provide custom build that will write all bugcheck's into firebird.log
-
Yes Hardware failure. But windows OS and our java application runs but without access to DB beacuse "bugcheck". "I/O-åtgärden på den logiska blockadressen 0xf7 för disk 0 (PDO-namn: \Device\0000002b) misslyckades på grund av ett maskinvarufel."
-
This is the only log that is available in JayBird Exception, firebird.log and windows log.
-
Yes, please provide a build that prints logs that you need.
I'm trying to reproduce bugcheck after IO error and still have no success. But I found that I was not wrong - all bugchecks are written into firebird.log ;) Please, look for "internal Firebird consistency check" messages. Or provide me with a full copy of firebird.log from the host where bugcheck happens.
Hi, Here is log. unfortunately nothing about "bugcheck". firebird.log