[Mono-devel-list] Problem with 0.2[01] and GC on OS X
Jonathan Hogg
jonathan at onegoodidea.com
Tue Mar 4 18:24:11 EST 2003
Hi all,
I seem to be having a problem with the mono interpreter on Mac OS X since
0.20. If I compile it with the Boehm GC I get what looks like some kind of
infinite recursion leading to a stack overflow. This occurs before any
useful work gets done, i.e., before it seems to have executed any of the
assembly.
Running with tracing I see:
-----
% /sw/bin/mint --trace /sw/bin/mcs.exe
** (/sw/bin/mcs.exe:16850): WARNING **: Using non-atomic functions!
(2976608) Entering 00 System.AppDomain:DoAssemblyLoad (0x3f2e70 [0x3f3f20]
)
(2976608) Entering 00 System.EventArgs:.cctor ()
(2976608) Entering 00 System.EventArgs:.ctor (0x3f3e90 )
(2976608) Entering 00 System.Object:.ctor (0x3f3e90 )
(2976608) Leaving 00 System.Object:.ctor =>
(2976608) Leaving 00 System.EventArgs:.ctor =>
(2976608) Leaving 00 System.EventArgs:.cctor =>
(2976608) Entering 00 System.MulticastDelegate:op_Equality ([0x0] [0x0]
)
(2976608) Leaving 00 System.MulticastDelegate:op_Equality => [1]
(2976608) Leaving 00 System.AppDomain:DoAssemblyLoad =>
(2976608) Entering 00 System.AppDomain:DoAssemblyLoad (0x3f2e70 [0x3f3e70]
)
(2976608) Entering 00 System.MulticastDelegate:op_Equality ([0x0] [0x0]
)
(2976608) Leaving 00 System.MulticastDelegate:op_Equality => [1]
(2976608) Leaving 00 System.AppDomain:DoAssemblyLoad =>
(2976608) Entering 00 System.AppDomain:DoAssemblyLoad (0x3f2e70 [0x3f3e40]
)
(2976608) Entering 00 System.MulticastDelegate:op_Equality ([0x0] [0x0]
)
(2976608) Leaving 00 System.MulticastDelegate:op_Equality => [1]
(2976608) Leaving 00 System.AppDomain:DoAssemblyLoad =>
zsh: bus error /sw/bin/mint --trace /sw/bin/mcs.exe
%
-----
And taking a quick peek with gdb I get:
-----
% gdb /sw/bin/mint
GNU gdb 5.3-20021014 (Apple version gdb-250) (Sat Dec 7 02:14:27 GMT 2002)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-macos10".
Reading symbols for shared libraries .. done
(gdb) run /sw/bin/mcs.exe
Starting program: /Applications/Fink/sw/bin/mint /sw/bin/mcs.exe
[Switching to process 16858 thread 0xb03]
Reading symbols for shared libraries . done
Reading symbols for shared libraries ....... done
** (/sw/bin/mcs.exe:16858): WARNING **: Using non-atomic functions!
** (/sw/bin/mcs.exe:16858): WARNING **: The handle daemon didnt start up
properly
** (/sw/bin/mcs.exe:16858): WARNING **: Failed to attach shared memory!
Falling back to non-shared handles
[Switching to process 16858 thread 0x1403]
Program received signal EXC_BAD_ACCESS, Could not access memory.
[Switching to process 16858 thread 0x1403]
0x005377f0 in GC_clear_stack_inner (arg=0x3f7fc0 "", limit=3221225072) at
misc.c:270
270 misc.c: No such file or directory.
in misc.c
(gdb) where
#0 0x005377f0 in GC_clear_stack_inner (arg=0x3f7fc0 "", limit=3221225072)
at misc.c:270
#1 0x00537828 in GC_clear_stack_inner (arg=0x3f7fc0 "", limit=3221225072)
at misc.c:275
[... 1000 lines removed ...]
#551 0x00537828 in GC_clear_stack_inner (arg=0x3f7fc0 "", limit=3221225072)
at misc.c:275
#552 0x00537828 in GC_clear_stack_inner (arg=0x3f7fc0 "", limit=3221225072)
at misc.c:275
#553 0x005379f4 in GC_clear_stack (arg=0x3f7fc0 "") at misc.c:346
#554 0x00531f20 in GC_malloc (lb=48) at malloc.c:295
#555 0x00019864 in mono_object_allocate (size=48) at object.c:843
#556 0x00019b7c in mono_object_new_alloc_specific (vtable=0x2b9374) at
object.c:932
#557 0x00019b34 in mono_object_new_specific (vtable=0x2b9374) at
object.c:926
#558 0x00019920 in mono_object_new (domain=0x3f4f30, klass=0xb82a20) at
object.c:882
#559 0x00026b88 in mono_exception_from_name (image=0x2bcf20,
name_space=0xa0e0c "System", name=0xa2560 "NullReferenceException") at
exception.c:38
#560 0x00026f88 in mono_get_exception_null_reference () at exception.c:132
#561 0x0001409c in main_thread_handler (user_data=0xbffffa10) at
interp.c:4449
#562 0x0004912c in start_wrapper (data=0x2d6ad0) at threads.c:180
#563 0x00090388 in timed_thread_start_routine (args=0x2d6af0) at
timed-thread.c:94
#564 0x90020d48 in _pthread_body ()
(gdb)
-----
This is running the fink installed version of mono, which happens to be
compiled with GC. I have tried both with my own build and the results are
the same. If I compile without GC then it runs fine.
This seems to have been introduced since 0.19 which I was able to build and
run with GC.
Now since mono has been put into fink (by someone on this list if I recall
from the archives) - I'm guessing that someone has managed to get it to
work. So does anyone have any ideas? Is there any other information I can
usefully pull out?
Cheers,
Jonathan
--
jonathan hogg, one good idea ltd, 131 queen margaret dr., glasgow g20 8pd
http://www.onegoodidea.com/ tel:+44-(0)7976-614338 fax:+44-(0)7970-537451
More information about the Mono-devel-list
mailing list