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
From time to time handle to restore of security3.fdb backup is not released by firebird.exe (using service_mgr) [CORE6082] #6332
Comments
Commented by: @livius2 View from "Resource monitor" |
Modified by: @livius2Attachment: FirebirdHandle.png [ 13354 ] |
Modified by: @livius2Attachment: MonAtt.png [ 13355 ] |
Modified by: @livius2description: We have automatic backup and restore process of many databases including security3.fdb gbak: time delta the process looks like this: We try to delete it but it is looked by the firebird.exe and never released - we have waited few days. This situation have occured 3 times - and now we report this here. => We have automatic backup and restore process of many databases including security3.fdb gbak: time delta the process looks like this: We try to delete it but it is looked by the firebird.exe and never released - we have waited few days. i can connect to this restored database (screen from MON$ATTACHMENT added) but only way to free handle to file is to stop Firebird server. This situation have occured 3 times - and now we report this here. |
Modified by: @livius2description: We have automatic backup and restore process of many databases including security3.fdb gbak: time delta the process looks like this: We try to delete it but it is looked by the firebird.exe and never released - we have waited few days. i can connect to this restored database (screen from MON$ATTACHMENT added) but only way to free handle to file is to stop Firebird server. This situation have occured 3 times - and now we report this here. => We have automatic backup and restore process of many databases including security3.fdb gbak: time delta the process looks like this: We try to delete it but it is looked by the firebird.exe and never released - we have waited few days previously, now it is 1 day, as visible in MON$ATTACHMENT. i can connect to this restored database (screen from MON$ATTACHMENT added) but only way to free handle to file is to stop Firebird server. This situation have occured 3 times - and now we report this here. |
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff I can see only one difference between security database and other DBs - it has by default non-zero linger. Is is set on your sec/db? |
Commented by: @livius2 I do not change linger for restored db, but i suppose it is default in minutes not days? |
Commented by: @AlexPeshkoff It's not in minutes, it's seconds :) I asked cause I want to have some idea from where to start. IMO some bug is present here but you see yourself - when we talk about something that happened for you 3 times it's rather hard to fix something using just this info. We need a way to reproduce soemthing. BTW, 3 failures per how many successful restores? |
Commented by: @livius2 Yes, i know. Without reproducible test case it is hard to start. We have 3 failtures in this year. The job start at every night and we have now day 164 of the year. |
Commented by: @livius2 I have tried --- no success or any change -- But still Firebird do not release handle to the file :( |
Modified by: @livius2Attachment: Current_MonAtt.png [ 13356 ] Attachment: MonTransactions.png [ 13357 ] |
Modified by: @livius2Attachment: MonAttAfterNoLinger.png [ 13358 ] |
Modified by: @livius2Attachment: SomeAdditionalInfo.txt [ 13359 ] |
Commented by: @livius2 I have found the way how to fix this. I should do this at start, but as you can see i must run this command 2 times to work --------------------------------------------------------------------------------------------------------------------------------------- C:\Firebird>gfix -shutdown -force 1 D:\restore\SECURITY3.FDB.RESTORED --------------------------------------------------------------------------------------------------------------------------------------- C:\Firebird>gfix -shutdown -force 1 -user sysdba -password XXXXXXX D:\restore\SECURITY3.FDB.RESTORED C:\Firebird> |
Commented by: @livius2 I have thinked about this command without credentials Why it release some handle? Is this some another bug? It should do nothing in the database as the user was not autorized. |
Commented by: @AlexPeshkoff That's embedded access. What is strange is that it can access file already open with SS instance. Are you using SS? |
Commented by: @livius2 Yes, SuperServer. |
Commented by: @livius2 Now this have occurred once again and i can confirm that first unauthorized (without credentials) shutdown close handle to the database |
Commented by: @livius2 I do not know as i have added shutdown command to the process. I can remove it and we will see. But now, if you need, you can close the issue, i will report if it happen again with this fix included. |
Commented by: @hvlad Karol, thanks, if you could test it - I'll wait for feedback |
Submitted by: @livius2
Attachments:
FirebirdHandle.png
MonAtt.png
Current_MonAtt.png
MonTransactions.png
MonAttAfterNoLinger.png
SomeAdditionalInfo.txt
We have automatic backup and restore process of many databases including security3.fdb
But from time to time - and only for "security3.fdb.restored", file handle is not released by firebird.exe and cannot be deleted.
gbak: time delta
gbak: 0.000 0.000 opened file D:\backup\security3.bak
gbak: ERROR:database D:\restore\security3.fdb.restored already exists. To replace it, use the -REP switch
gbak: ERROR: Exiting before completion due to errors
gbak:Exiting before completion due to errors
the process looks like this:
1. We try to delete previous files (we do not check if this process is succesfull or not)
2. every night we run backup to "security3.bak"
we validate the succesfull by "looking" into log file for text "closing file, committing, and finishing" if not present, we write log and also send email to admins
3. next we run restore process and this is also validated by log like in point 2.
all was ok and next day process failed on steep 3 as in step 1 security3.fdb.restored was not deleted.
We try to delete it but it is looked by the firebird.exe and never released - we have waited few days previously, now it is 1 day, as visible in MON$ATTACHMENT.
restore command looks like
"%FB_DIR%\gbak" -service 127.0.0.1:service_mgr -c -v -BUFFERS 131072 -STATISTICS TD -user SYSDBA -password XXXX %FB_BACKUP%\security3.bak %FB_RESTORE%\security3.fdb.restored
i can connect to this restored database (screen from MON$ATTACHMENT added) but only way to free handle to file is to stop Firebird server.
This situation have occured 3 times - and now we report this here.
The text was updated successfully, but these errors were encountered: