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

Database shutdown is reported as successfully completed before all active connections are in fact interrupted [CORE4236] #4560

Closed
firebird-issue-importer opened this issue Sep 22, 2013 · 8 comments

Comments

@firebird-issue-importer

Submitted by: @pavel-zotov

Database shutdown procedure was reworked in v3 and v2.5.3 to be more synchronous than before and really wait until all running activities are stopped, their changes are rolled back and all user connections are gone. However, this does not work as expected in SuperServer, reporting a successful shutdown while other connections may be still modifying the database file. This situation is possible under high load.

Commits: 5bf1f9b 5453b5c FirebirdSQL/fbt-repository@ecc13ee FirebirdSQL/fbt-repository@ee964bb

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 22, 2013

Modified by: @dyemanov

reporter: Dmitry Yemanov [ dimitr ] => Pavel Zotov [ tabloid ]

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 22, 2013

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Nov 13, 2013

Modified by: @dyemanov

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 2 [ 10560 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 27, 2014

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 16, 2014

Modified by: @dyemanov

Fix Version: 2.5.3 [ 10461 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 16, 2014

Modified by: @dyemanov

Fix Version: 2.5.3 [ 10461 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 27, 2015

Commented by: @pavel-zotov

1. Create new database and run following DDL:

recreate table test(s varchar(1000));
create index test_s on test(s);

2. Create script for ISQL workers (let its name = 'c4236-run.sql'):

set term ^;
execute block as
declare n int = 100000;
begin
while ( n > 0 ) do
begin
execute statement
('insert into test(s) values( ? )')
( rpad('', 1000, uuid_to_char(gen_uuid()) ) )
;
n = n - 1;
end
end
^ set term ;^

3. Run this batch (it will start 10 ISQL sessions):

for /l %%i in (1,1,10) do (
start /min isql /3333:C:\MIX\firebird\QA\fbt-repo\tmp\c4236.fdb -user sysdba -pas masterkey -i c4236-run.sql 1>c4236-run_%%i.log 2>c4236-run_%%i.err
)

4. After 5-10 seconds run:

fbsvcmgr localhost:service_mgr action_properties dbname C:\MIX\firebird\QA\fbt-repo\tmp\c4236-25.fdb prp_shutdown_mode prp_sm_full prp_force_shutdown 0

Messages about it ("335544528 : database C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C4236-25.FDB shutdown") can be seen only in trace wher both log_errors = true and log_statement_* = true.

But neither 3.0 nor 2.5 will reflect shutdown in c4236-run_*.err files (ERROR logs for each ISQL), i.e. they will remain empty.

Is it correct ?

PS. On 2.5.6 (SC) process of returning from shutdown command is slower than in 3.0 (SS) by dozen times and can last several minutes for 10 attachments.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 29, 2015

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

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

2 participants