[Mono-dev] A segement fault on PPC host (Mono-devel-list Digest, Vol 128, Issue 9)

Jo Shields directhex at apebox.org
Mon Dec 28 12:08:24 UTC 2015



On 28/12/15 09:37, Pin Cheng wrote:
> Hi there,
> I am trying to porting Mono 4.2.1 into aix 6.1, it was compiled in 32bits mode.
> At present, I faced a segment fault at :
> return runtime_invoke (obj, params, exc, info->compiled_method);
> this is line is the last one in function mono_jit_runtime_invoke.
> It seems  'runtime_invoke' could not be invoked so it leads to core dump.  The call stack is following:
> #0  0x7c0802a4 in ?? ()
> #1  0x102ff224 in mono_jit_runtime_invoke (method=0x200def38, obj=0x30400038, params=0x2ff22800, exc=0x0) at mini-runtime.c:2343
> #2  0x100db4d8 in mono_runtime_invoke (method=0x200def38, obj=0x30400038, params=0x2ff22800, exc=0x0) at object.c:2783
> #3  0x10184580 in create_exception_two_strings (klass=0x200dca60, a1=0x30400010, a2=0x0) at exception.c:142
> #4  0x10184624 in mono_exception_from_name_two_strings (image=0x2009cad8, name_space=0x1046e2cc <__popcount_tab+15548> "System",
>     name=0x1046e2d4 <__popcount_tab+15556> "OutOfMemoryException", a1=0x30400010, a2=0x0) at exception.c:165
> #5  0x1017d358 in create_domain_objects (domain=0x20099078) at appdomain.c:186
> #6  0x1017d630 in mono_runtime_init (domain=0x20099078, start_cb=@0x200230e0: 0x102fb84c <mono_thread_start_cb>,
>     attach_cb=@0x200230ec: 0x102fb988 <mono_thread_attach_cb>) at appdomain.c:265
> #7  0x103012c0 in mini_init (filename=0x2ff22ce6 "./hello.exe", runtime_version=0x0) at mini-runtime.c:3140
> #8  0x10013db4 in mono_main (argc=2, argv=0x2ff22c48) at driver.c:1906
> #9  0x10000a20 in mono_main_with_options (argc=2, argv=0x2ff22c48) at main.c:91
> #10 0x10000aa8 in main (argc=2, argv=0x2ff22c48) at main.c:122
> 
> Hello.exe is a simple C# program compiled on linux platform.
> public class HelloWorld
> {
>     static public void Main ()
>     {
>     }
> }
> 
> I think the runtime_invoke is just a invoke wrapper, the actual function is info->compiled_method.
> I could print out those function debug info:
> invoker:  (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr) + 0x0 (303cdde8 303cdf50) [20099078 - hello.exe]
> compiled method:  System.OutOfMemoryException:.ctor (string) + 0x0 (303cdd80 303cddcc) [20099078 - hello.exe]
> 
> My question are:
> 1. why use a invoker wrapper? Where did runtime_invoke_void__this___object comes from?
> 2.  I guess JIT could not compile such runtime_invoke_void__this___object (object,intptr,intptr,intptr) correctly. But how could I find out the problem place?
> Should I inspect the native definition places. Such as cpu-ppc.md and mini-ppc.c and so on. Is my direction correct? Is there any another simpler way to resolve the problem?
> 
> I am new to Mono, many thing I need to learn. Please help me.
> Thank you in advance!

Last I checked, Big-endian 32-bit PowerPC was pretty ropey - and 64-bit
BE PPC doesn't work with 4.2.1 (works on git master), so you may be
running into architecture issues rather than OS issues



More information about the Mono-devel-list mailing list