Issue Details (XML | Word | Printable)

Key: CORE-3740
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Paul Beach
Reporter: Brent Rowland
Votes: 1
Watchers: 5

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

SELECT using IN list with 153 or more elements causes crash.

Created: 24/Jan/12 07:55 PM   Updated: 29/May/15 12:18 PM
Component/s: Build Issues / Porting
Affects Version/s: 2.5.1
Fix Version/s: 2.5.2

Environment: Mac 10.7,

QA Status: Done successfully
Test Details:
Note-1. Firebird 2.5.0 and 2.5.1 -- also WORK fine on the following script
(despite ticket's issue "affected version(s) 2.5.1"), so these versions also can be tested here.
Note-2. As of march-2015 (build, there is some kind of regression in performance
of parsing huge literal lists in comparison with all 2.5.x versions, see CORE-4728.

 Description  « Hide
Easily reproduced by filling simple table with enough rows and executing select statement.

brent$ isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database "localhost:/var/fbdata/macbug.fdb" user "sysdba" password "masterkey";
SQL> create sequence foo_seq;
SQL> create table foos (id int);
SQL> insert into foos select gen_id(foo_seq, 1) from rdb$relation_fields;
SQL> select count(*) from foos;


SQL> select * from foos where id in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153);

Statement failed, SQLSTATE = 08006
Error reading data from the connection.

firebird.log contains:

BackInSilver Wed Nov 30 07:41:25 2011
        /Library/Frameworks/Firebird.framework/Resources/bin/fbguard: /Library/Frameworks/Firebird.framework/Resources/English.lproj/var/bin/fb_smp_server terminated due to startup error (2)

This is only on Mac, never on Linux.

brent$ isql -z
ISQL Version: UI-V2.5.1.26351 Firebird 2.5

Firebird 2.5.0 crashed with 417 or more elements.
Firebird 2.1.3 crashed with 413 or more elements.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Paul Beach added a comment - 08/Aug/12 01:08 PM
This is a gcc optimisation issue, we build the 64bit default version of Firebird with -O3 set, removing this from the compile command line resolves the problem.