Issue Details (XML | Word | Printable)

Key: CORE-4754
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

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

Bugcheck 167 (invalid SEND request) while working with GTT from several attachments (using EXECUTE STATEMENT ... ON EXTERNAL and different roles)

Created: 18/Apr/15 06:30 AM   Updated: 23/Sep/15 12:22 PM
Component/s: None
Affects Version/s: 3.0 Beta 1, 2.1.7, 2.5.4
Fix Version/s: 3.0 Beta 2, 2.5.5

File Attachments: 1. Zip Archive fb-abend-after-manupilations-with-GTT-using-ES-in-several-attaches-from-single-execute-block.zip (45 kB)


QA Status: Done successfully


 Description  « Hide
WI-T3.0.0.31789, reproduced in SuperServer and SuperClassic.

The following script:

recreate global temporary table gtt_session(x int, y int) on commit preserve rows;
commit;

set transaction read committed;
set term ^;
execute block as -- returns(att_id int, cnt int, sql_plan blob, idx_stat double precision) as
   declare v_dbname type of column mon$database.mon$database_name;
begin

   v_dbname = 'localhost:' || rdb$get_context('SYSTEM', 'DB_NAME');

   execute statement 'insert into gtt_session select rand()*10, rand()*10 from rdb$types union all select -2, -3 from rdb$database'
   on external v_dbname
   as user 'sysdba' password 'masterke' role 'poor_dba';

   --------------------------------------------------------

   execute statement 'insert into gtt_session select rand()*10, rand()*10 from rdb$types union all select -2, -3 from rdb$database'
   on external v_dbname
   as user 'sysdba' password 'masterke' role 'cool_dba';

   execute statement 'create index gtt_session_x_y on gtt_session computed by ( x+y )'
   with autonomous transaction
   on external v_dbname
   as user 'sysdba' password 'masterke' role 'cool_dba';

   --------------------------------------------------------

   execute statement 'insert into gtt_session select rand()*10, rand()*10 from rdb$types union all select -2, -3 from rdb$database'
   on external v_dbname
   as user 'sysdba' password 'masterke' role 'super_dba';

end
^
set term ;^

-- leads to:

1) appearing in firebird.log message:
===
CSPROG Fri Apr 17 21:24:38 2015
        Database: C:\MIX\firebird\QA\fbt-repo\tmp\e30.fdb
        internal Firebird consistency check (invalid SEND request (167), file: JrdStatement.cpp line: 325)
===
2) appearing 'abend message' on Windows XP with:
2.1) singnature of error:
szAppName : firebird.exe szAppVer : 3.0.0.31789 szModName : msvcr100.dll
szModVer : 10.0.30319.415 offset : 0008cb95
2.2) notion about two files (which have been attached here): firebird.exe.mdmp and appcompat.txt

3) After this message will appear:
3.1) ISQL can not finish script, and can not be interrupted;
3.2) no new attaches can be etsablished to any other .fdb
3.3) these ISQLs loads CPU up to 100% and also can not be interrupted - even after killing firebird process.

All necessary files please see in attached .zip

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 20/Apr/15 11:58 AM
It should be reproducible in all FB versions where GTT is present

Vlad Khorsun added a comment - 20/Apr/15 12:00 PM
Fix is committed into v3, please confirm

Pavel Zotov added a comment - 20/Apr/15 01:38 PM
Works OK on LI-T6.3.0.31797, revision 61367 (checked on SS & SC).

Vlad Khorsun added a comment - 20/Apr/15 02:44 PM
Thanks.

Fix for v2.5 backported

Pavel Zotov added a comment - 21/Apr/15 05:10 AM
Tested on WI-V6.3.5.26861 (SC and SS) -- works fine.