Issue Details (XML | Word | Printable)

Key: CORE-1467
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Yakov Hrebtov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

'database shutdown' after canceling statement via MON$STATEMENTS

Created: 17/Sep/07 01:43 AM   Updated: 18/Nov/08 02:04 PM
Component/s: Engine
Affects Version/s: 2.1 Beta 1
Fix Version/s: 2.1 Beta 2

Time Tracking:
Not Specified

Environment: CVS snapshots: LI-T2.1.0.16558 CS, LI-T2.1.0.16621 CS


 Description  « Hide
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



 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 17/Sep/07 01:52 AM
Could you please confirm that the worker process (that runs the query being canceled) still alive after cancellation (i.e. it didn't crash)?

Yakov Hrebtov added a comment - 17/Sep/07 03:50 AM
>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.