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

BUGCHECK(183) when use cursor with "order by ID+0" and "for update with lock" [CORE4561] #4878

Closed
firebird-issue-importer opened this issue Sep 27, 2014 · 8 comments

Comments

@firebird-issue-importer

Submitted by: @pavel-zotov

Attachments:
gdb-firebird.140927_215115.1.zip

DDL:

$ /opt/fb30trnk/bin/isql -q
SQL> create database 'tmpbug.fdb'; commit;
SQL> [root@oel64 21:49:49 fb30]$ /opt/fb30trnk/bin/isql -q
SQL> create database '/var/db/fb30/tmpbug.fdb'; commit;
SQL> connect 'localhost/3330:/var/db/fb30/tmpbug.fdb';
Database: 'localhost/3330:/var/db/fb30/tmpbug.fdb'
SQL> show version;
ISQL Version: LI-T3.0.0.31309 Firebird 3.0 Alpha 2
Server version:
Firebird/Linux/AMD/Intel/x64 (access method), version "LI-T3.0.0.31309 Firebird 3.0 Alpha 2"
Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-T3.0.0.31309 Firebird 3.0 Alpha 2/tcp (oel64)/P13"
Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-T3.0.0.31309 Firebird 3.0 Alpha 2/tcp (oel64)/P13"
on disk structure version 12.0
SQL> recreate table tm(id int);
SQL> commit;
SQL> insert into tm(id) values(1);
SQL> insert into tm(id) values(2); -- at least TWO records need to be added
SQL> commit;

The following EB lead to bug check abort and message "wrong record length (183), file: vio.cpp line: 1311" in firebird.log:

select current_timestamp as dts,'before execute block. . .' as msg from rdb$database;
set term ^;
execute block as
begin
for
select id
from tm
order by id+0 -- "+0" is mandatory for getting BCA
for update with lock -- and this also is mandatory
as cursor c
do begin
delete from tm where current of c;
end
end^
set term ;^
select current_timestamp as dts,'after execute block' as msg from rdb$database;
commit;

ISQL console:
---
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
---

firebird.log:

oel64 Sat Sep 27 21:48:24 2014
/opt/fb30trnk/bin/fbguard: guardian starting /opt/fb30trnk/bin/firebird

oel64 Sat Sep 27 21:51:15 2014
Database: /var/db/fb30/tmpbug.fdb
internal Firebird consistency check (wrong record length (183), file: vio.cpp line: 1311)

oel64 Sat Sep 27 21:51:15 2014
/opt/fb30trnk/bin/fbguard: /opt/fb30trnk/bin/firebird terminated abnormally (-1)

oel64 Sat Sep 27 21:51:15 2014
/opt/fb30trnk/bin/fbguard: guardian starting /opt/fb30trnk/bin/firebird

oel64 Sat Sep 27 21:51:24 2014
REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.
Uncommitted work may have been lost.
Error writing data to the connection.

Two stack traces (for SC ans SS) please see in attach.

Commits: 8744b80 FirebirdSQL/fbt-repository@63488cd

====== Test Details ======

Confirmed on WI-T3.0.0.31852 (CS/SC/SS):
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (wrong record length (183), file: vio.cpp line: 1310)

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 27, 2014

Modified by: @pavel-zotov

Attachment: gdb-firebird.140927_215115.1.zip [ 12591 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 27, 2014

Commented by: @aafemt

The same side-effect of cursor stability as in CORE4369

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Nov 9, 2014

Modified by: @dyemanov

Regression: 3.0 Alpha 2 [ 10560 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Dec 2, 2014

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 2, 2015

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 2, 2015

Modified by: @dyemanov

summary: Bugcheckabort with message "wrong record length (183), file: vio.cpp line: 1311" when use cursor with "order by ID+0" and "for update with lock" => BUGCHECK(183) when use cursor with "order by ID+0" and "for update with lock"

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 3, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

Test Details: Confirmed on WI-T3.0.0.31852 (CS/SC/SS):
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (wrong record length (183), file: vio.cpp line: 1310)

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 3, 2015

Modified by: @pavel-zotov

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

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