Bugzilla – Bug 342608
XSP and CreateThread
Last modified: 2007-12-08 18:37:27 UTC
I have the same problem of this bug, but on SVN version (89829): Bug 321772 - CreateThread: error creating thread handle. ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: CreateThread: error creating thread handle ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: CreateThread: error creating thread handle ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_handle_ref: Attempting to ref unused handle 0x40a ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_handle_ref: Attempting to ref unused handle 0x40a ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_handle_unref: Attempting to unref unused handle 0x40a ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_handle_ref: Attempting to ref unused handle 0x40a ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_handle_ref: Attempting to ref unused handle 0x40a ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_handle_unref: Attempting to unref unused handle 0x40a ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_thread_abandon_mutexes: error looking up thread handle 0x1866 ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_thread_set_termination_details: error looking up thread handle 0x1866 ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_thread_abandon_mutexes: error looking up thread handle 0x1869 ** (/usr/lib/mono/2.0/xsp2.exe:3171): WARNING **: _wapi_thread_set_termination_details: error looking up thread handle 0x1869 in the versions of 2 weeks it does it there is not this mistake.
New exception with svn:90250 ** (/usr/lib/mono/2.0/xsp2.exe:14803): WARNING **: CreateThread: error creating thread handle Handling exception type ExecutionEngineException Message is Couldn't create thread IsTerminating is set to True ** (/usr/lib/mono/2.0/xsp2.exe:14803): WARNING **: _wapi_thread_abandon_mutexes: error looking up thread handle 0xb05 ** (/usr/lib/mono/2.0/xsp2.exe:14803): WARNING **: _wapi_thread_set_termination_details: error looking up thread handle 0xb05
With: Mono JIT compiler version 1.2.6 (/trunk/ r90627) ** (/usr/lib/mono/2.0/xsp2.exe:25633): WARNING **: CreateThread: error creating thread handle Handling exception type ExecutionEngineException Message is Couldn't create thread IsTerminating is set to True ** (/usr/lib/mono/2.0/xsp2.exe:25633): WARNING **: _wapi_thread_abandon_mutexes: error looking up thread handle 0xa1c ** (/usr/lib/mono/2.0/xsp2.exe:25633): WARNING **: _wapi_thread_set_termination_details: error looking up thread handle 0xa1c
I can reproduce the problem. I am running both XSP, MONO and MCS from svn (90742). The error message from xsp2.exe is: ** (/home/servers/xsp/bin/xsp2.exe:30261): WARNING **: CreateThread: error creating thread handle ** (/home/servers/xsp/bin/xsp2.exe:30261): WARNING **: _wapi_thread_abandon_mutexes: error looking up thread handle 0x141b ** (/home/servers/xsp/bin/xsp2.exe:30261): WARNING **: _wapi_thread_set_termination_details: error looking up thread handle 0x141b The xsp2.exe process had been running for about 12 hours and had received almost no traffic and only to this very simple aspx-page: <% Response.Write ("Hello world!" + DateTime.Now); %>
This seems to be same problem as bug 341244. Ole: Could you try the test case attached to that bug and report your findings?
I get the following results: -bash-3.1$ ./print_wapi_counts.sh Threads: 3617, exited: 3608 Threads: 3618, exited: 3609 Threads: 3619, exited: 3612 Threads: 3619, exited: 3613 Threads: 3621, exited: 3613 Threads: 3622, exited: 3615 Threads: 3622, exited: 3616 Threads: 3623, exited: 3616 Threads: 3624, exited: 3617 Threads: 3624, exited: 3618 Threads: 3626, exited: 3618 Threads: 3627, exited: 3620 Threads: 3627, exited: 3621 Threads: 3628, exited: 3621 Threads: 3629, exited: 3622 Threads: 3629, exited: 3623 Threads: 3631, exited: 3623 Threads: 3632, exited: 3625 Threads: 3633, exited: 3626 Threads: 3633, exited: 3627 Threads: 3634, exited: 3627 Threads: 3635, exited: 3628 These results were from an instance that had been running for perhaps 10 hours and received <50 requests in total. Some additional information that might be useful: This is from "ps aux": USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND xsp 32470 0.0 2.8 236096 28800 ? Sl 09:28 0:11 mono /home/servers/xsp/bin/xsp2.exe --root /home/servers/xsp/www --nonstop I restarted the process and got these results: Threads: 3664, exited: 3647 Threads: 3665, exited: 3651 Threads: 3665, exited: 3652 Threads: 3666, exited: 3652 Threads: 3667, exited: 3653 Threads: 3667, exited: 3654 Threads: 3669, exited: 3654 Threads: 3670, exited: 3656 Threads: 3671, exited: 3657 Threads: 3671, exited: 3658 Threads: 3672, exited: 3658 -bash-3.1$ uname -a Linux manaan.scisoft.dk 2.6.22.9-61.fc6 #1 SMP Thu Sep 27 18:07:59 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux -bash-3.1$ cat redhat-release Fedora Core release 6 (Zod)
*** This bug has been marked as a duplicate of bug 342640 ***