[Mono-devel-list] Mono 0.2x, mcs build problem on Mac OS X

Emmanuel Poitier epoitier at openlinksw.co.uk
Tue May 13 10:36:51 EDT 2003


Hi,

I am currently currently confronted against two problems. Is someone 
will be kind enough to help me solving these
issues. My build platform is a Mac OS X (10.2.6).

1. when I compile the mono (mint interpreter) with the Boehm GC 
library, I noticed that the runtime always hang when executing
any applications (even the simple hello.cs). This problems seems to 
have been introduces in Mono 0.2x versions, and could test successfully
Mono 0.19 with the Boehm GC enabled. You can find below a gdb stack 
trace when the 'bus error' occurs :

#0  GC_clear_stack_inner (arg=0x4f9ff0 "", limit=3221225072) at 
misc.c:270
#1  0x00496be0 in GC_clear_stack_inner (arg=0x4f9ff0 "", 
limit=3221225072) at misc.c:275
......
#549 0x00496be0 in GC_clear_stack_inner (arg=0x4f9ff0 "", 
limit=3221225072) at misc.c:275
#550 0x00492758 in GC_gcj_malloc (lb=14, 
ptr_to_struct_containing_descr=0x3bf52c) at gcj_mlc.c:164
#551 0x0001b84c in mono_string_new_size (domain=0x4f2ed8, len=0) at 
object.c:1465
#552 0x0001b770 in mono_string_new_utf16 (domain=0x4f2ed8, 
text=0x6b0b22, len=0) at object.c:1441
#553 0x0001c250 in mono_ldstr (domain=0x4f2ed8, image=0x3c3230, 
idx=4061) at object.c:1776
#554 0x00004f3c in calc_offsets (image=0x3c3230, method=0x7e69b0) at 
interp.c:905
#555 0x000062fc in ves_exec_method (frame=0xf0080470) at interp.c:1305
#556 0x00005b5c in interp_mono_runtime_invoke (method=0x7e69b0, 
obj=0x0, params=0x0, exc=0xf0080594) at interp.c:1215
#557 0x0001979c in mono_runtime_invoke (method=0x7e69b0, obj=0x0, 
params=0x0, exc=0xf0080594) at object.c:637
#558 0x00017c28 in mono_runtime_class_init (klass=0x3cafa0) at 
object.c:78
#559 0x00018f64 in mono_class_vtable (domain=0x4f2ed8, class=0x3cafa0) 
at object.c:467
#560 0x0001b82c in mono_string_new_size (domain=0x4f2ed8, len=60) at 
object.c:1462
#561 0x0001b770 in mono_string_new_utf16 (domain=0x4f2ed8, 
text=0x6b4f13, len=60) at object.c:1441
#562 0x0001c250 in mono_ldstr (domain=0x4f2ed8, image=0x3c3230, 
idx=21454) at object.c:1776
#563 0x00004f3c in calc_offsets (image=0x3c3230, method=0x7e5eb0) at 
interp.c:905
#564 0x000062fc in ves_exec_method (frame=0xf0080b90) at interp.c:1305
#565 0x00005b5c in interp_mono_runtime_invoke (method=0x7e5eb0, 
obj=0x4f8f88, params=0x0, exc=0x0) at interp.c:1215
#566 0x0001979c in mono_runtime_invoke (method=0x7e5eb0, obj=0x4f8f88, 
params=0x0, exc=0x0) at object.c:637
#567 0x00017b60 in mono_runtime_object_init (this=0x4f8f88) at 
object.c:56
#568 0x0002a238 in mono_exception_from_name (image=0x3c3230, 
name_space=0xbfe50 "System", name=0xc173c "NullReferenceException") at 
exception.c:41
#569 0x0002a5e8 in mono_get_exception_null_reference () at 
exception.c:132
#570 0x0001495c in main_thread_handler (user_data=0xbffffc40) at 
interp.c:4467
#571 0x0004dbd8 in start_wrapper (data=0x3e05c0) at threads.c:192
#572 0x00096b10 in timed_thread_start_routine (args=0x3e0630) at 
timed-thread.c:95
#573 0x90020d48 in _pthread_body ()

As soon as I build Mono 0.2x versions without the Boehm GC library, the 
interpreter can execute without problems at all ... or does he ;) (see 
2)
The actual behavior is a stack overflow, caused apparently by a 
recursive call to the GC_clear_stack_inner in the Boehm GC library.


2. when I try to recompile the mcs and the core libraries with the Mono 
0.24 (without Boehm GC) interpreter previously built
and with a mcs 0.24 built on a Linux box, the interpreter simply crash 
with a 'bus error' (I also provided below a gdb stack trace) :

#1  0x000090d8 in ves_exec_method (frame=0x81290008) at interp.c:1703
#2  0x000090d8 in ves_exec_method (frame=0xf0001e10) at interp.c:1703
#3  0x000090d8 in ves_exec_method (frame=0xf00021e0) at interp.c:1703
...
#370 0x000090d8 in ves_exec_method (frame=0xf007ebf0) at interp.c:1703
#371 0x000090d8 in ves_exec_method (frame=warning: 
ppc_frame_chain_valid: stack frame from 0xf005b340 to 0xf007eea0 larger 
than 65536 bytes; assuming invalid
0xf007efc0) at interp.c:1703
warning: ppc_frame_chain_valid: stack frame from 0xf005b340 to 
0xf007eea0 larger than 65536 bytes; assuming invalid

The actual behavior is a stack overflow, caused apparently by a 
recursive call to ves_exec_method.


Also, I saw somewhere (do not remember where exactly), that the Mono 
JIT for ppc is ready, but not yet in the CVS.
Is someone can confirm its current progress, and if it will be possible 
to know when the sources will be available in the CVS,
and if it will be possible to have the patches to make some preliminary 
tests.


If further information are needed, just simply ask me.


Thanks in advance,
Emmanuel Poitier
Software Engineer
OpenLink Software
Tel: +44 (0) 20 8681 7701
Web: http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers




More information about the Mono-devel-list mailing list