[Mono-dev] GC segfault on ARM

Tomi Valkeinen tomba at bat.org
Thu Aug 18 09:43:42 EDT 2005


Hi again,

>> currently have a functional big endian ARM linux system that I have used
>> to successfully build the ARM JIT.  However, upon attempting to run a
>> CIL executable, mono immediately segfaults.  A backtrace indicates that
>> the segfault occurs in the Boehm GC:
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread 16384 (LWP 32700)]
>> GC_push_all_eager (bottom=0x0, top=0x1990a8 "") at mark.c:1468
>> 1468            q = *p;
>> (gdb) bt
>> #0  GC_push_all_eager (bottom=0x0, top=0x1990a8 "") at mark.c:1468
>> #1  0x000b9ef8 in pthread_push_all_stacks () at pthread_stop_world.c:266
>> #2  0x000b9fac in GC_push_all_stacks () at pthread_stop_world.c:297
>> #3  0x000b5848 in GC_push_roots (all=1, cold_gc_frame=0xbefffa4c "")
>>    at mark_rts.c:643
>> #4  0x000b4c60 in $a () at mark.c:326
>> #5  0x000b4c60 in $a () at mark.c:326
>> Previous frame identical to this frame (corrupt stack?)
>
> I get quite similar backtrace when running the SVN version on our ARM11-based 
> little-endian board:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 395)]
> 0x001147b0 in GC_push_all_eager ()
> (gdb) bt
> #0  0x001147b0 in GC_push_all_eager ()
> #1  0x00114844 in GC_push_all_stack ()
> #2  0x0011e320 in pthread_push_all_stacks ()
> #3  0x0011e3ec in GC_push_all_stacks ()
> #4  0x00119164 in GC_default_push_other_roots ()
> #5  0x001164b0 in GC_push_roots ()
> #6  0x00112ab8 in $a ()
>
> Tomi Valkeinen

I got the GC running after changing the method of finding the stack bottom 
from HEURISTIC1 to LINUX_STACKBOTTOM (gcconfig.h:1755). I don't know why 
LINUX_STACKBOTTOM wasn't used on arm linux by default, the code looks 
arm-runnable to me.

Of course your problem may be something totally different =).

Oh, and if you are using an ARM11 based board, you may also want to fix 
the swp-bug (http://bugzilla.ximian.com/show_bug.cgi?id=75114)

  Tomi Valkeinen



More information about the Mono-devel-list mailing list