[Mono-list] Couldn't create thread exception for ThreadPool.QueueUserWorkItem
Arthur Valadares
arthursv at linux.vnet.ibm.com
Tue Jul 7 16:59:20 EDT 2009
Hi everyone,
I need some help with this crash. I looked up on google and only saw
references to this as an old mono bug, so I'm not sure if this is a bug
or expected behavior. I'm running an application that open a LOT of
threads (I see around 1400 on /proc/./status). It uses ThreadPool's
QueueUserWorkItem quite a lot of times.
>From what I've read, this method should wait for a thread in ThreadPool
to return and use it, but it seems at some point it crashes trying to
create a new thread in ThreadPool. This is the error message I get:
Unhandled Exception: System.ExecutionEngineException: Couldn't create
thread
at (wrapper managed-to-native)
object:__icall_wrapper_mono_delegate_begin_invoke (object,intptr)
at (wrapper delegate-begin-invoke)
System.Threading.WaitCallback:begin_invoke_IAsyncResult__this___object_AsyncCallback_object (object,System.AsyncCallback,object)
at System.Threading.ThreadPool.QueueUserWorkItem
(System.Threading.WaitCallback callBack, System.Object state) [0x00000]
in /home/arthur/mono/mcs/class/corlib/System.Threading/ThreadPool.cs:101
at OpenMetaverse.TexturePipeline.DownloadThread () [0x00000]
If this is expected behavior, should I increase the number of threads in
ThreadPool?
Thank you,
--
Arthur Valadares <arthursv at linux.vnet.ibm.com>
More information about the Mono-list
mailing list