[Mono-dev] Weird threads (?) problem

Bill Seurer seurer at us.ibm.com
Wed Oct 18 15:38:57 EDT 2006


I have been working on a port of Mono and have run into a weird problem
with the 1.1.17.1 code.  mono (the program) works when it is doing the
bootstrap build of mcs as part of running make (i.e., gnumake) on the whole
thing.  But if I run mono outside of the make process (either directly or
via runtime/mono-wrapper) it always throws an assertion:

   ** ERROR **: file threadpool.c: line 990: assertion failed:
(async_call_klass)

The code that does this is in mono_thread_pool_init:
   ...
   async_call_klass = mono_class_from_name (mono_defaults.corlib, "System",
"MonoAsyncCall");
   g_assert (async_call_klass);

The assertion is NOT thrown when mono is run from inside make as part of
the bootstrap process.

I dumped out the tables that mono_class_from_name uses just before the
above call in mono_thread_pool_init and  "MonoAsyncCall" is there when it
is run from within make but is not when run from outside.   There were a
couple of other missing I am not that familiar with how mono does threading
but could this be some sort of timing problem?  Any ideas?

One more thing, I wrote a makefile that just ran mono on a little test
program and it fails too.  Perhaps there is something environmental that
the make process is doing that lets it work?

Thanks!
--
Bill Seurer     IBM System i5 internal compiler development   Rochester, MN
Business: seurer at us.ibm.com                         Home: Bill at seurer.net
http://w3.rchland.ibm.com/~seurer/                  http://www.seurer.net




More information about the Mono-devel-list mailing list