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' after canceling statement via MON$STATEMENTS [CORE1467] #1884

Closed
firebird-automations opened this issue Sep 17, 2007 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Yakov Hrebtov (jake)

Database attachment goes to some kind of invalid state after its long-running statement canceled via MON$STATEMENTS.

To reproduce:

1. open two isql sessions to the same database;
2. Session 1:
set term ^; execute block returns (val integer) as begin val=1; while (1=1) do suspend; end^
3. Session 2:
commit; delete from mon$statements where mon$statement_id=(select mon$statement_id from mon$statements where mon$sql_text starting 'execute');

statement in session 1 will be canceled with:
Statement failed, SQLCODE = -901
operation was cancelled

4. Session 1: Try to execute any sql statement, like
select 1 from rdb$database^

and you will get:
Statement failed, SQLCODE = -902
database /var/data/fbdata/generation_devel.fdb shutdown

Commits: 2c3e641

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 2.1 Beta 1 [ 10141 ]

Version: 2.1 Beta 2 [ 10190 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Could you please confirm that the worker process (that runs the query being canceled) still alive after cancellation (i.e. it didn't crash)?

@firebird-automations
Copy link
Collaborator Author

Commented by: Yakov Hrebtov (jake)

>Could you please confirm that the worker process (that runs the query being canceled) still alive after cancellation (i.e. it didn't crash)?

I was wrong. Actually worker process has crashed.

I have used embedded access for this test case. Isql itself didnt crash, but showed this strange ''database shutdown".
Now I made test via tcp connection, and can confirm, that worker process has crashed after canceling.

Isql showing much more clearer message in this case:

Statement failed, SQLCODE = -902
Unable to complete network request to host "127.0.0.1".
-Error reading data from the connection.

Sorry for careless investigation of this issue.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1 Beta 2 [ 10190 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 13080 ] => Firebird [ 13947 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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