Issue Details (XML | Word | Printable)

Key: CORE-5457
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Holger Klemt
Votes: 0
Watchers: 5
Operations

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

Bugcheck 167 (invalid SEND request)

Created: 17/Jan/17 10:47 AM   Updated: 18/Jun/18 04:52 AM
Component/s: Engine
Affects Version/s: 3.0.1
Fix Version/s: 3.0.2, 4.0 Alpha 1

File Attachments: 1. File BUG.7z (46 kB)
2. File c5457-1.sql.7z (1 kB)

Image Attachments:

1. c5457-crash.png
(36 kB)
Environment: Windows

QA Status: Done successfully


 Description  « Hide
i have a reproducable bug in fb301 but at the moment i can only reproduce it using ibexpert
(but there is is easy to reproduce and results in the following log entry and all connections
are disconnected, also connections from isql which did not do anything in the mean time)

HKNB6 Mon Jan 16 17:38:54 2017
    Modifying procedure CALC_VAL which is currently in use by active user requests


HKNB6 Mon Jan 16 17:39:03 2017
    Database: C:\DB\BUG.FDB
    internal Firebird consistency check (invalid SEND request (167), file: JrdStatement.cpp line: 325)


i set the transaction setting in ibexpert as follows
isc_tpb_read_committed
isc_tpb_rec_version
isc_tpb_wait

attached database is used, but i can reproduce the error also on another very big database

1. step: open the table tbl in table editor and open data page
2. leave it open
3. change sourcecode of procedure calc_val (for example change the multiplication factor)
4. recompile procedure
5. go back to table tbl data page
6. commit transaction to refresh data
7. this error message will come

 internal Firebird consistency check (invalid SEND request (167), file: JrdStatement.cpp line: 325)

the calc_val procedure is used for computed by column


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Holger Klemt added a comment - 17/Jan/17 10:53 AM
sample database

Vlad Khorsun added a comment - 24/Jan/17 12:32 PM
Simplified test case

>isql BUG.FDB -user sysdba
Database: BUG.FDB, User: SYSDBA
SQL> select count(*), sum(tbl_val) from tbl;

                COUNT SUM
===================== =====================
                    7 280

SQL>
SQL> set term ^;
SQL> alter procedure calc_val (id bigint) returns (val bigint)
CON> as
CON> begin val = id * 10; suspend; end
CON> ^
SQL> set term ;^
SQL>
SQL> select count(*), sum(tbl_val) from tbl;

                COUNT SUM
===================== =====================
                    7 280

SQL> commit;
SQL> select count(*), sum(tbl_val) from tbl;

                COUNT SUM
===================== =====================
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (invalid SEND request (167), file: JrdStatement.cpp line: 324)
SQL> Statement failed, SQLSTATE = XX000
internal Firebird consistency check (can't continue after bugcheck)
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (can't continue after bugcheck)

Pavel Zotov added a comment - 07/Feb/17 07:15 AM
It seems that fix works only in 3.0.2 but not in 4.0.
Consider script from attached "c5457-1.sql.7z" (it almost the same as isql -x plus statementts shown by Vlad).

On WI-V3.0.2.32683 (07-feb-2017) it works OK.

On WI-T4.0.0.522 (03-feb-2017) and WI-T4.0.0.530 (07-feb-2017) it raises:
===
select count(*), sum(val) from test;
                COUNT SUM
===================== =====================
                   10 715
commit;
select count(*), sum(val) from test;
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
===

Dmitry Yemanov added a comment - 07/Feb/17 08:37 AM - edited
I cannot reproduce the crash. Tried v4 embedded and superserver, debug and release builds. I prefixed that script with the CREATE DATABASE command.

Pavel Zotov added a comment - 07/Feb/17 08:55 AM
I've issued command 'create database ...' outside from ISQL, i.e. in the OS command prompt + piping.
And I *do* get crash - see attached screen from cmd.exe

(May be it's because my FM is 32 bit and is working on Win XP ?..)

Pavel Zotov added a comment - 07/Feb/17 08:57 AM
PS. Changed parameters in firebird.conf:

C:\MIX\firebird\QA\fbt-repo\tmp>findstr /r /c:"^[^#;]" C:\MIX\firebird\fb40\firebird.conf | sort
AuthClient = Legacy_Auth,Srp,Win_Sspi
AuthServer = Legacy_Auth,Srp
DeadlockTimeout = 1
FileSystemCacheThreshold = 65536K
IpcName = fb40ss
LockHashSlots = 22111
MaxUnflushedWrites = -1
MaxUnflushedWriteTime = -1
MaxUserTraceLogSize = 99999
RemoteServicePort = 3400
Servermode = Classic
TempCacheLimit = 2147483647
TempDirectories = c:\temp
UdfAccess = Restrict UDF;C:\WINNT\system32
UserManager = Legacy_UserManager
WireCrypt = Disabled

Pavel Zotov added a comment - 07/Feb/17 09:19 AM
> (May be it's because my FM is 32 bit and is working on Win XP ?..)

Looks unreal but seems it's indeed like this.
No problems on Win 8.1 FB-4 64 bit,, checked builds 511 & 530.

Enigma... :-/

Vlad Khorsun added a comment - 07/Feb/17 09:28 AM
I confirm crash of 32-bit embedded release build. No crash in debug build.