From: Yi Lu <yl...@ra...> - 2011-01-25 18:37:15
|
(***My previous post has been pending, not sure if it is accessible by all. Now I'm posting it again.*** I can provide the database if anyone want to repeat the test) Hello everyone, We ran into an issue with 32-bit FB 2.5 Final Release on 64-bit machine. When the problem occurs, task manager shows fbserver.exe process creates 500~800 threads. Firebird.log will have a chunk of messages saying: XXXX (Server) Fri Jan 21 18:13:28 2011 Operating system call _beginthreadex failed. Error code 8 Oftentimes this is followed by a fbserver crash where fbserver.exe is hung and consumes 0% CPU. Sometimes this message can be found in the firebird.log: XXXX (Server) Thu Jan 21 12:15:20 2010 unable to allocate memory from operating system in spite that the task manager doesn't indicate any memory shortage. We simplified the test case to a command-line, test program with multi-threads and each running a single query. With this tool we tested against servers running various OS and FB versions, added number of test tool threads and kept close watch on number of thread fbserver.exe uses. (In all tests mentioned, the page buffer of the test DB is 65535, firebird was running in super server mode and test programs have about 300 threads in total.) The test results are as follows: 1. Windows server 2008 R2 (64-bit), Firebird 2.1, 8G RAM No crash. maximum number of thread fbserver.exe takes is 362. 2. Windows server 2008 R2 (64-bit), Firebird 2.5 32-bit, 8G RAM Crashed in 10 min. Maximum number of thread fbserver.exe takes is over 500. Error message call _beginthreadex failed can be found in firebird.log 3.Windows server 2008 R2 (64-bit), Firebird 2.5 64-bit, 8G RAM No crash. Maximum number of thread fbserver.exe takes is 820. 4. Windows server 2003(32-bit) SP1, Firebird 2.5 32-bit, 2G RAM No crash. Maximum number of thread fbserver.exe takes is 407. Error message call _beginthreadex failed can be found in firebird.log 5. Windows server 2003(64-bit) SP1, Firebird, 4G RAM Crashed. Maximum number of thread observed is 471. Error message call _beginthreadex failed can be found in firebird.log It appears that the crash always occur when FB2.5 32-bit is running on 64-bit OS. Also we observed that on 64-bit system, FB2.5 32-bit was trying to create a lot more thread than FB2.1 did in the same situation, which we suspect exceeded the limit of thread numbers of the OS and caused the shortage of memory or other system resources. We notice that it is much more likely to crash when 32-bit fbserver.exe has more than 500 threads. Has any one experienced this issue? Any ideas on this problem? Yi Lu -- View this message in context: http://firebird.1100200.n4.nabble.com/32-bit-Firebird-attempting-to-create-large-amount-of-thread-on-64-bit-server-tp3236747p3236747.html Sent from the firebird-devel mailing list archive at Nabble.com. |