|
From: SourceForge.net <no...@so...> - 2004-06-14 09:22:49
|
Bugs item #943087, was opened at 2004-04-27 17:14 Message generated for change (Comment added) made by bullestock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=943087&group_id=9028 Category: Core Engine Group: Confirmed Bug Status: Open Resolution: None Priority: 7 Submitted By: Bjoern Latte (latte) Assigned to: Nobody/Anonymous (nobody) Summary: Events producing high CPU load under certain conditions Initial Comment: Clients using events may get a FB1.5 server to hogging the CPU if connection to clients get lost or are unstable. All further connections to DBserver will perform very poor. High load condition can only be ended by restarting server. Environs: Client PC: Windows XP Pro Server PC: Windows 2000 SP3 and Windows XP Pro SP1 Firebird-1.5.0.4306-Win32 Following procedure will lead to high (99 - 100%) CPU load on FB 1.5 servers: - connect a client to a db and register an event - simulate a bad network connection by disabling NIC on client PC - renanable NIC on client PC, connect to db again and fire the event registered in the first step -> fbserver will go out and grab the CPU, restart of server needed to end condition Source for testapp writen with IBO 4.3.Aa and Delphi 7E and usage description can be found in the attached file. DDL for testapp DB holds only single stored proc as folows: CREATE PROCEDURE EVENT_POSTING ( EVNAME VARCHAR (50)) AS BEGIN POST_EVENT :EVNAME; exit; END ---------------------------------------------------------------------- Comment By: Torsten Martinsen (bullestock) Date: 2004-06-14 11:22 Message: Logged In: YES user_id=382855 I have done some debugging: The high CPU usage is caused by the server going into a loop calling packet_receive() in inet. cpp - the recv() call always returns -1 immmediately when the connection has been lost. Workarounds: 1) Set DummyPacketInterval to a nonzero value in the config file This is probably a bad idea, as the config file explicitly discourages this (NOTE: The article referred to (http: //support.microsoft.com/default.aspx?kbid=296265) concerns an issue which was fixed in Win2000 SP3, and it is unclear how this is related to Firebird). 2) Change the KeepAliveTime registry setting (as described in http://support.microsoft.com/default.aspx?kbid=140325). I used 30000, which seems to work. Both workarounds function by enabling Firebird to detect that the connection has been closed. ---------------------------------------------------------------------- Comment By: Torsten Martinsen (bullestock) Date: 2004-06-12 22:18 Message: Logged In: YES user_id=382855 I have confirmed this bug using a simple C++ test program (using the IBPP library) with the FB server running on - Windows 2000 Server, dual Athlon 1 GHz (only the first CPU goes to 100 %) - Windows XP Professional, Pentium IV 2.5 GHz ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=943087&group_id=9028 |