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

Asynchronous cancellation request can be ignored in the case of EXECUTE STATEMENT and WHEN used together [CORE4356] #4678

Open
firebird-automations opened this issue Mar 3, 2014 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Artificial test case:

set term ^;

execute block as
declare stt varchar(255) = 'execute block as begin while (1 = 1) do begin end end';
begin
while(1=1) do
begin
execute statement stt;
when any do begin end
end
end^

set term ;^
commit;

Then either press Ctrl-C in the current ISQL session or issue "delete from mon$statements where mon$attachment_id <> current_connection" from a different ISQL session.

The endless loop inside EXECUTE STATEMENT really gets interrupted but isc_cancelled error gets handled by the WHEN block and the outer loop continues. This is a bug, cancellation/shutdown errors should not be processed by exception handlers.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 3.0 Alpha 2 [ 10560 ]

Version: 3.0 Alpha 1 [ 10331 ]

Version: 2.5.2 Update 1 [ 10521 ]

Version: 2.1.5 Update 1 [ 10522 ]

Version: 2.5.2 [ 10450 ]

Version: 2.1.5 [ 10420 ]

Version: 2.5.1 [ 10333 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

description: Artificial test case:

set term ^;

execute block as
declare stt varchar(255) = 'execute block as begin while (1 = 1) do begin end end';
begin
while(1=1) do
begin
execute statement stt;
when any do begin end
end
end^

set term ;^
commit;

Then either press Ctrl-C in the current ISQL session or issue "delete from mon$statements where mon$attachment_id <> current_connection" from a different ISQL session.

The endless loop inside EXECUTE STATEMENT really gets interrupted but isc_cancelled error gets handled by the WHEN block and the loop continues. This is a bug, cancellation/shutdown errors should not be processed by exception handlers.

=>

Artificial test case:

set term ^;

execute block as
declare stt varchar(255) = 'execute block as begin while (1 = 1) do begin end end';
begin
while(1=1) do
begin
execute statement stt;
when any do begin end
end
end^

set term ;^
commit;

Then either press Ctrl-C in the current ISQL session or issue "delete from mon$statements where mon$attachment_id <> current_connection" from a different ISQL session.

The endless loop inside EXECUTE STATEMENT really gets interrupted but isc_cancelled error gets handled by the WHEN block and the outer loop continues. This is a bug, cancellation/shutdown errors should not be processed by exception handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment