|
[
Permalink
| « Hide
]
Dmitry Yemanov added a comment - 29/Dec/14 12:17 PM
I cannot reproduce the crash (Ubuntu x64, fresh checkout, tried with both embedded and localhost connections). Looks like a stack overflow before reaching the recursion limit of 1000 nested calls. What ulimit -s returns in your system?
Got new strange results on:
ISQL Version: WI-T3.0.0.31529 Firebird 3.0 Beta 2 Server version: WI-T3.0.0.31529 Firebird 3.0 Beta 2 WI-T3.0.0.31529 Firebird 3.0 Beta 2/tcp (balaha)/P13 WI-T3.0.0.31529 Firebird 3.0 Beta 2/tcp (balaha)/P13 The following command will cause crash FB for each odd or even runs ( file 'sss.sql' contains single command: select * from p01(1); ): C:\1INSTALL\FIREBIRD\FB30SNAP>isql -q SQL> create database 'tmp201501081635.fdb'; SQL> set term ^; SQL> create or alter procedure p03(a_i int) returns (z int) as CON> begin CON> z = 0 ; CON> suspend; CON> end^ SQL> commit^ SQL> SQL> create or alter procedure p02(a_i int) returns (z int) as CON> begin CON> z = (select z from p03(:a_i)) + 1; CON> suspend; CON> end^ SQL> commit^ SQL> SQL> create or alter procedure p03(a_i int) returns (z int) as CON> begin CON> z = (select z from p02(:a_i)) + 1; CON> suspend; CON> end^ SQL> commit^ SQL> SQL> create or alter procedure p01(a_i int) returns (z int) as CON> begin CON> z = (select z from p02(:a_i)) + 1; CON> suspend; CON> end^ SQL> commit^ SQL> set term ;^ SQL> exit; --- run # 1 --- C:\1INSTALL\FIREBIRD\FB30SNAP>isql localhost/3333:C:\1INSTALL\FIREBIRD\FB30SNAP\tmp201501081635.fdb -i sss.sql 1>nul Statement failed, SQLSTATE = HY001 Stack overflow. The resource requirements of the runtime stack have exceeded the memory available to it. -At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At p... After line 0 in file sss.sql --- run # 2 --- C:\1INSTALL\FIREBIRD\FB30SNAP>isql localhost/3333:C:\1INSTALL\FIREBIRD\FB30SNAP\tmp201501081635.fdb -i sss.sql 1>nul Statement failed, SQLSTATE = 08006 Error reading data from the connection. After line 0 in file sss.sql Statement failed, SQLSTATE = 08006 Error writing data to the connection. After line 1 in file sss.sql Statement failed, SQLSTATE = 08006 Error writing data to the connection. After line 1 in file sss.sql --- run # 3 --- C:\1INSTALL\FIREBIRD\FB30SNAP>isql localhost/3333:C:\1INSTALL\FIREBIRD\FB30SNAP\tmp201501081635.fdb -i sss.sql 1>nul Statement failed, SQLSTATE = HY001 Stack overflow. The resource requirements of the runtime stack have exceeded the memory available to it. -At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At p... After line 0 in file sss.sql --- run # 4 --- C:\1INSTALL\FIREBIRD\FB30SNAP>isql localhost/3333:C:\1INSTALL\FIREBIRD\FB30SNAP\tmp201501081635.fdb -i sss.sql 1>nul Statement failed, SQLSTATE = 08006 Error reading data from the connection. After line 0 in file sss.sql Statement failed, SQLSTATE = 08006 Error writing data to the connection. After line 1 in file sss.sql Statement failed, SQLSTATE = 08006 Error writing data to the connection. After line 1 in file sss.sql --- run # 5 --- C:\1INSTALL\FIREBIRD\FB30SNAP>isql localhost/3333:C:\1INSTALL\FIREBIRD\FB30SNAP\tmp201501081635.fdb -i sss.sql 1>nul Statement failed, SQLSTATE = HY001 Stack overflow. The resource requirements of the runtime stack have exceeded the memory available to it. -At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At p... After line 0 in file sss.sql --- run # 6 --- C:\1INSTALL\FIREBIRD\FB30SNAP>isql localhost/3333:C:\1INSTALL\FIREBIRD\FB30SNAP\tmp201501081635.fdb -i sss.sql 1>nul Statement failed, SQLSTATE = 08006 Error reading data from the connection. After line 0 in file sss.sql Statement failed, SQLSTATE = 08006 Error writing data to the connection. After line 1 in file sss.sql Statement failed, SQLSTATE = 08006 Error writing data to the connection. After line 1 in file sss.sql . . . etc . . . One more issue: crash occurs only when FB is started *AS SERVICE* rather than application.
No crashes when FB is launched like this: C:\1INSTALL\FIREBIRD\FB30SNAP\firebird.exe -a PS. Checked on: WI-T3.0.0.31532 Image path of service: C:\1INSTALL\FIREBIRD\FB30SNAP\firebird.exe -s FB_30SS -m -i There are two issues at this ticket:
a) stack overflow exception when it was not happens in previous version of Firebird b) crash after stack overflow Issue (a) should be fixed with recent commit (please confirm). Issue (b) is still investigated and will be moved to its own ticket. > a) stack overflow exception when it was not happens in previous version of Firebird
> Issue (a) should be fixed with recent commit (please confirm). I see on WI-T3.0.0.31624 that results became like in FB 2.5 and every run of: SQL> select * from p01(1); -- now produces only messages about "concurrent executions of the same request", i.e.: Statement failed, SQLSTATE = 54001 Too many concurrent executions of the same request -At procedure 'P03' line: 3, col: 3 ... At procedure 'P02' line: 3, col: 3 At procedure 'P03' line: 3, col: 3 At p... Crash after second stack overflow investigated in CORE-4688
|