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
SIMILAR-TO leads FB to crash when checking blob with size > 2Gb for matching to string literal [CORE4893] #5186
Comments
Commented by: @pavel-zotov Link to .zip with stack-traces: https://yadi.sk/d/vY0KnR4LiBP4c 0xFF. Last time something wrong occurs with ability to attach files: I permanently get error from JIRA. |
Commented by: @dyemanov I'd say that built-in functions are not always expected to work with blobs > 2GB. That said, the server surely should not crash but report an error. |
Commented by: @dyemanov Did you check against v2.5? I doubt this is a v3 regression. |
Commented by: @pavel-zotov Something weird one may to see in FB 2.5.5. === set list on;
|
Commented by: @pavel-zotov PPS. Sorry, I forgot to show my firebird.conf: $ cat firebird.confRemoteServicePort = 3255 DefaultDbCachePages = 2048 ExternalFileAccess = Restrict /var/db/fb25
|
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Beta 2 [ 10888 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Cannot be tested Test Details: Test can not be implemented because of huge size of data (more than 2 Gb).
|
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
Doing on LI-V3.0.0.31942 SuperClassic, database with FW = OFF, FB config:
Servermode = SuperClassic
RemoteServicePort = 3330
DefaultDbCachePages = 512
BugCheckAbort=1
AuthClient = Legacy_Auth,Srp,Win_Sspi
AuthServer = Legacy_Auth,Srp
UserManager = Legacy_UserManager
WireCrypt = Disabled
ExternalFileAccess = Restrict /var/db/fb30
FileSystemCacheThreshold = 65536K
LockMemSize = 64M
LockHashSlots = 22111
MaxUserTraceLogSize = 99999
TempCacheLimit = 2147483647
#TempDirectories = /dev/shm;/tmp
TempDirectories = /tmp/firebird
Test:
####
recreate global temporary table gtt(b blob);
recreate sequence g;
commit;
insert into gtt(b) select list( gen_id( g, 1 ) )
from rdb$types,rdb$types,rdb$types,(select 1 k from rdb$types rows 15);
select char_length(b) from gtt;
=====================
2346948497
SQL> select gen_id(g,0) from rdb$database;
=====================
245805960
SQL> select 1 from gtt where b like '%,245805959,%';
============
1
SQL> select 1 from gtt where b similar to '%,2,%'; ----------- worked VERY slowly, was interrupted by Ctrl-C
^C
CONSTANT
Statement failed, SQLSTATE = HY008
operation was cancelled
SQL> select 1 from gtt where b similar to '%,2,%'; ---------- was NOT interrupted, but after ~2 minutes produced:
============
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
Result is reproduced also if cancel last query by Ctrl-C -- see two attached files with stack-trace.
Commits: 28e1874
====== Test Details ======
Test can not be implemented because of huge size of data (more than 2 Gb).
I've cheched on WI-T4.0.0.1598 (08-sep-2019) and got following results:
select 1 from gtt where b like '%,245805959,%';
Current memory = 182333584
Delta memory = 3520
Max memory = 182415760
Elapsed time = 36.354 sec
Buffers = 20000
Reads = 408126
Writes = 19886
Fetches = 815853
select 2 from gtt where b similar to '%,2,%'; -- worked VERY slowly, was interrupted by Ctrl-C
Current memory = 4477299296
Delta memory = 4294965712
Max memory = 6624792864
Elapsed time = 51.449 sec
Buffers = 20000
Reads = 607589
Writes = 0
Fetches = 1214585
select 3 from gtt where b similar to '%,2,%'; -- was NOT interrupted, but after ~2 minutes produced: Error reading data from the connection.
Current memory = 4477299296
Delta memory = 0
Max memory = 6624792864
Elapsed time = 69.458 sec
Buffers = 20000
Reads = 607589
Writes = 0
Fetches = 1214585
So, the problem was gone.
The text was updated successfully, but these errors were encountered: