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
Full shutdown doesn't unlock database file when Classic Server is running a query modifying data [CORE1611] #2032
Comments
Commented by: Sergei Rubanik (sergeir) On some our production databases this happens even with select queries which don't modify data, but infortunately I cannot reproduce it on a sample database. |
Commented by: @dyemanov Duplicated ticket. |
Modified by: @pcisarWorkflow: jira [ 13493 ] => Firebird [ 14080 ] |
Commented by: Sergei Rubanik (sergeir) Hi Dmitry, Can I ask you to look at this issue once more to make sure that this wasn't recognized mistakenly as a duplicate of CORE97: 1) In contrast to CORE97 dealing with Firebir 1.5, my case is related to new full/exclusive shutdown mode, which is available in 2.0 (2.0.3 was tested), but was not available in 1.5. 2) Another difference is that we have problem with Classic, not with SuperServer. 3) The third difference is that Firebird not only doesn't release a database file, but doesn't seem to close a connection either, because when we bring it online and try to verify it with gfix, gfix reports: "secondary server attachments cannot validate databases". I would say that this is more similar CORE1249. 4) An actual trouble for us is that after an attempt to shut down, the database seems to be locked "forever" (at least several hours - we never tested longer) and we cannot find any way to unlock it without manual stopping the Firebird Classic server process (or server computer), which in turn causes database page errors like:
After that Firebird.log contains errors like: SERVER Mon Mar 31 12:53:43 2008 SERVER Mon Mar 31 12:53:43 2008 SERVERI Mon Mar 31 12:53:43 2008 We would consider this as a major issue as this can destroy database files and we've got a lot of complaints about corrupted databases from our customers since we moved to Firebird 2.0.3 and started to use full/exclusive shutdown. Please don't hesitate to contact me if you need more details. |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Commented by: @dyemanov It doesn't make any difference whether the requested shutdown mode is multi-user (v1.5 compatible) or exclusive. Neither it differs between SS and CS. By design, the database shutdown is not expected to disconnect users, neither it's expected to release the database file. It just puts active connections to the "frozen" state where they cannot perform any activity. |
Commented by: Sergei Rubanik (sergeir) Dmitry, This is confusing as the information on http://ibphonix.com seems to be at variance with your words, and we would appreciate to hear your comments on this: 1) "By design, the database shutdown is not expected to disconnect users". According to the Interbase Operations Guide (http://www.ibphoenix.com/downloads/60OpGuide.zip), option -force: "if there are still active connections, it rolls back any uncommitted transactions, disconnects (!) any users, and shuts down the database". Commandline Utilities guide (http://www.firebirdsql.org/pdfmanual/Firebird-Utils-WIP.pdf) says: "-f[orce] : shuts down with no regard for the connection or transaction status of the database. No new connections But I just found that it contains warning: "There is a bug in Classic Server which still exists at version 2.0. The bug is such that the -f[orce] option behaves in exactly the same way as the -at[tach] option". I wonder if this is what we are observing... 2) "neither it's expected to release the database file": Cralos H. Cantu on FB Conf 2006 mentioned the full shutdown as a way to get a correct physical copy of a database file: " FULL MODE (totally off-line): Source: http://www.ibphoenix.com/downloads/FirebirdConf2006/HOWTO-QTZ201-R/HOWTO-QTZ201-R.zip In reality zip, rar reports that they cannot work (or can work correctly) as the file is used by other process. Moreover according to our experience Firebird in SuperServer mode (in contrast to Classic mode) does close connections and does release databases (unfortunately with bugs: CORE1610). |
Commented by: @dyemanov Do you have a test case showing that SS closes the active connections? |
Modified by: @dyemanovFix Version: 2.5 Beta 1 [ 10251 ] |
Commented by: @dyemanov I'm closing it as a duplicate as it partially mirrors CORE97. The unique part of this ticket has not been confirmed. Regardless, everything mentioned here is expected to be fixed in v2.5 RC1, but I don't want to have duplicated information in the release notes, thus I bypass the "resolved" state. |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Duplicate [ 3 ] Fix Version: 3.0 Alpha 1 [ 10331 ] => |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Submitted by: Sergei Rubanik (sergeir)
Duplicates CORE97
Votes: 1
When classic server executes a query, and we do
gfix -shut full -force 0
a query connection doesn't close (and seems to be hanging forever) and the database file is still locked.
Then if we do
gfix -online
it's still locked.
The only method to unlock the file we found is to close the server process (using Task Manager).
But in this case we have a lot of page error after the database validation with
gfix -f -v.
How to reproduce it:
Use the same scripts as in issue CORE1610.
1. Edit database file name in both scripts.
2. Create test database by CORE1610_create_db.sql.
3. Run CORE1610_test_db.sql and shut down the database while the script is running with
gfix -shut full -force 0.
The text was updated successfully, but these errors were encountered: