Regression in FB 4.x when PSQL code has recursive SP calls: crash instead of SQLSTATE = 54001 ("Too many concurrent executions...") -----------------------------------------------------------------------------------------------------------------------------------
Key: CORE-6445 URL: http://tracker.firebirdsql.org/browse/CORE-6445 Project: Firebird Core Issue Type: Bug Components: Engine Reporter: Pavel Zotov Run following code: =============== SET BAIL ON; shell del c:\temp\tmp4test.fdb 2>nul; create database 'localhost:c:\temp\tmp4test.fdb' user 'SYSDBA' password 'masterkey'; commit; set term ^; create or alter procedure sp_level_0 as begin end ^ create or alter procedure sp_level_2 as begin execute procedure sp_level_0; end ^ create or alter procedure sp_level_1 as begin execute procedure sp_level_2; end ^ alter procedure sp_level_0 as begin execute procedure sp_level_1; end ^ set term ;^ commit; connect 'localhost:c:\temp\tmp4test.fdb' user 'SYSDBA' password 'masterkey'; set echo on; execute procedure sp_level_1; rollback; ============== On 4.0.0.2265 out will be: ===== execute procedure sp_level_1; Statement failed, SQLSTATE = 08006 Error reading data from the connection. ===== Expected (and got on FB 2.5.9.27152 and 3.0.8.33390): ===== execute procedure sp_level_1; Statement failed, SQLSTATE = 54001 Too many concurrent executions of the same request -At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedure 'SP_LEVEL_0' line: 3, col: 5 At procedure 'SP_LEVEL_2' line: 3, col: 5 At procedure 'SP_LEVEL_1' line: 3, col: 5 At procedur... Stack traces are in attached .7z files. PS. And one more issue. Every odd (or even ?) run of this code leads to crash NOT instantly but after ~30 seconds. This occurs regardless whether i restart FB service before it or no. This is log of console when output was provided with timestamps by mtee.exe utility: run-1: ==== 23:33:43.324 execute procedure sp_level_1; 23:33:43.937 Statement failed, SQLSTATE = 08006 23:33:43.938 Error reading data from the connection. run-2: ==== 23:33:58.673 execute procedure sp_level_1; 23:34:25.133 Statement failed, SQLSTATE = 08006 23:34:25.133 Error reading data from the connection. run-3: ==== 23:34:42.804 execute procedure sp_level_1; 23:34:43.629 Statement failed, SQLSTATE = 08006 23:34:43.629 Error reading data from the connection. run-4: ==== 23:34:52.307 execute procedure sp_level_1; 23:35:18.839 Statement failed, SQLSTATE = 08006 23:35:18.839 Error reading data from the connection. PPS. firebird.conf: ==== AuthClient = Srp, Srp256, ExtAuth, Win_Sspi, Legacy_Auth AuthServer = Srp, Srp256, ExtAuth, Win_Sspi, Legacy_Auth BugCheckAbort = 1 DefaultDbCachePages = 20000 ExtConnPoolLifeTime = 10 ExtConnPoolSize = 10 ExternalFileAccess = Full FileSystemCacheThreshold = 65536K IpcName = fb40_SS KeyHolderPlugin = KeyHolder LockHashSlots = 22111 LockMemSize = 5M MaxUnflushedWrites = -1 MaxUnflushedWriteTime = -1 ReadConsistency = 0 RemoteServicePort = 3400 ServerMode = Super TempBlockSize = 2M TempCacheLimit = 2147483647 TempDirectories = d:\temp UDFAccess = Restrict UDF UserManager = Srp, Legacy_UserManager WireCrypt = Enabled WireCryptPlugin = ChaCha, Arc4 ==== -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel