Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78782 --- shadow/78782 2006-07-06 17:57:52.000000000 -0400 +++ shadow/78782.tmp.28435 2006-07-06 17:57:52.000000000 -0400 @@ -0,0 +1,317 @@ +Bug#: 78782 +Product: Mono: Runtime +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Blocker +Component: JIT +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Segfault on PPC when using a libgcc_s/libpthread compiled with SSP + +Description of Problem: + + + +Steps to reproduce the problem: +1. Compile libgcc_s (gcc) and libpthread (glibc) with SSP +2. Run mono or compile it + +Actual Results: +Weird segfaults + +Expected Results: +mono working + +How often does this happen? +Always + +Additional Information: +this is with glibc 2.4, gcc 4.1.1 and mono 1.1.13.8. + +When using a mono only with SVN rev 61756 one gets: +if test -w ../mcs; then :; else chmod -R +w ../mcs; fi +cd ../mcs && /usr/bin/make PROFILES='default net_2_0' CC='gcc' all-profiles +make[4]: Entering directory `/build/buildd/mono-1.1.13.8/mcs' +/usr/bin/make profile-do--default--all profile-do--net_2_0--all +make[5]: Entering directory `/build/buildd/mono-1.1.13.8/mcs' +/usr/bin/make PROFILE=basic all +make[6]: Entering directory `/build/buildd/mono-1.1.13.8/mcs' +make[7]: mcs: Command not found +make[7]: *** [build/deps/basic-profile-check.exe] Error 127 +make[7]: Entering directory `/build/buildd/mono-1.1.13.8/mcs' +*** The compiler 'mcs' doesn't appear to be usable. +*** Trying the 'monolite' directory. +make[8]: Entering directory `/build/buildd/mono-1.1.13.8/mcs' + +================================================================= +Got a SIGSEGV while executing native code. This usually indicates +a fatal error in the mono runtime or one of the native libraries +used by your application. +================================================================= + +Stacktrace: + + +================================================================= +Got a SIGSEGV while executing native code. This usually indicates +a fatal error in the mono runtime or one of the native libraries +used by your application. +================================================================= + +Stacktrace: +[and so on] + + +Running in gdb shows that the mono segfault handler dereferences a null +pointer in mono_jit_walk_stack() in exceptions-ppc.c: + MonoJitTlsData *jit_tls = TlsGetValue (mono_jit_tls_id); + MonoLMF *lmf = jit_tls->lmf; + +jit_tls is NULL. + +This seem to be partially fixed by replacing the g_malloc() in +mono_debugger_create() (tramp-ppc.c) and mono_arch_emit_prolog() +(mini-ppc.c) by mono_global_codeman_reserve(). (Thanks to Johannes Berg for +noticing this). + +There's still a segfault but now one gets useful output: + +cd ../mcs && make PROFILES='default net_2_0' CC='gcc' all-profiles +make[3]: Entering directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make profile-do--default--all profile-do--net_2_0--all +make[4]: Entering directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make PROFILE=basic all +make[5]: Entering directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' + +================================================================= +Got a SIGSEGV while executing native code. This usually indicates +a fatal error in the mono runtime or one of the native libraries +used by your application. +================================================================= + +Stacktrace: + + +Native stacktrace: + + /usr/lib/libmono.so.0(mono_handle_native_sigsegv+0x94) [0xfe73c08] + /usr/lib/libmono.so.0 [0xfe35924] + [0x100380] + [(nil)] + /lib/libgcc_s.so.1(_Unwind_ForcedUnwind+0xe4) [0xf945f64] + /lib/libpthread.so.0 [0xfc58458] + /lib/libpthread.so.0(__pthread_unwind+0x44) [0xfc556a4] + /lib/libpthread.so.0 [0xfc4ee34] + /usr/lib/libmono.so.0 [0xff415c8] + /usr/lib/libmono.so.0 [0xff416e8] + /usr/lib/libmono.so.0(GC_start_routine+0x5c) [0xff6201c] + /lib/libpthread.so.0 [0xfc4dab8] + /lib/libc.so.6(__clone+0x84) [0xfac5024] +make[6]: *** [build/deps/basic-profile-check.exe] Aborted +make[6]: *** Datei »build/deps/basic-profile-check.exe« wird gelöscht +make[6]: Entering directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +*** The compiler 'mcs' doesn't appear to be usable. +*** Trying the 'monolite' directory. +make[7]: Entering directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +*** glibc detected *** +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/lt-mono: realloc(): +invalid pointer: 0x30145618 *** +======= Backtrace: ========= +/lib/libc.so.6[0xfa68194] +/lib/libc.so.6(__libc_realloc+0x24c)[0xfa6d11c] +/usr/lib/libglib-2.0.so.0(g_realloc+0x64)[0xfcf80b8] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_arch_emit_epilog+0xac)[0xfe77f20] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_codegen+0x10c)[0xfe38510] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mini_method_compile+0xe54)[0xfe52ed8] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0[0xfe53b5c] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_icall_get_wrapper+0x94)[0xfe53fb8] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0[0xfe4fbd0] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mini_method_compile+0x29c)[0xfe52320] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0[0xfe53b5c] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_icall_get_wrapper+0x94)[0xfe53fb8] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0[0xfe4fbd0] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mini_method_compile+0x29c)[0xfe52320] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0[0xfe53b5c] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0[0xfe53e7c] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_runtime_invoke+0x30)[0xfeb51b4] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_exception_from_name_two_strings+0x134)[0xfef28c8] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_runtime_init+0x15c)[0xfef56d0] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mini_init+0x790)[0xfe34c84] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0(mono_main+0x40c)[0xfe69160] +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/lt-mono[0x100016a0] +/lib/libc.so.6[0xfa0c708] +/lib/libc.so.6[0xfa0c958] +======= Memory map: ======== +00100000-00103000 r-xp 00100000 00:00 0 +0f96e000-0f979000 r-xp 00000000 03:03 55399816 /lib/libnss_files-2.4.so +0f979000-0f988000 ---p 0000b000 03:03 55399816 /lib/libnss_files-2.4.so +0f988000-0f989000 r--p 0000a000 03:03 55399816 /lib/libnss_files-2.4.so +0f989000-0f98a000 rwxp 0000b000 03:03 55399816 /lib/libnss_files-2.4.so +0f99a000-0f9a4000 r-xp 00000000 03:03 55399818 /lib/libnss_nis-2.4.so +0f9a4000-0f9b3000 ---p 0000a000 03:03 55399818 /lib/libnss_nis-2.4.so +0f9b3000-0f9b4000 r--p 00009000 03:03 55399818 /lib/libnss_nis-2.4.so +0f9b4000-0f9b5000 rwxp 0000a000 03:03 55399818 /lib/libnss_nis-2.4.so +0f9c5000-0f9cd000 r-xp 00000000 03:03 55399814 /lib/libnss_compat-2.4.so +0f9cd000-0f9dc000 ---p 00008000 03:03 55399814 /lib/libnss_compat-2.4.so +0f9dc000-0f9dd000 r--p 00007000 03:03 55399814 /lib/libnss_compat-2.4.so +0f9dd000-0f9de000 rwxp 00008000 03:03 55399814 /lib/libnss_compat-2.4.so +0f9ee000-0fb32000 r-xp 00000000 03:03 55399807 /lib/libc-2.4.so +0fb32000-0fb42000 ---p 00144000 03:03 55399807 /lib/libc-2.4.so +0fb42000-0fb43000 r--p 00144000 03:03 55399807 /lib/libc-2.4.so +0fb43000-0fb47000 rwxp 00145000 03:03 55399807 /lib/libc-2.4.so +0fb47000-0fb4a000 rwxp 0fb47000 00:00 0 +0fb5a000-0fb62000 r-xp 00000000 03:03 55399823 /lib/librt-2.4.so +0fb62000-0fb71000 ---p 00008000 03:03 55399823 /lib/librt-2.4.so +0fb71000-0fb72000 r--p 00007000 03:03 55399823 /lib/librt-2.4.so +0fb72000-0fb73000 rwxp 00008000 03:03 55399823 /lib/librt-2.4.so +0fb83000-0fc27000 r-xp 00000000 03:03 55399811 /lib/libm-2.4.so +0fc27000-0fc36000 ---p 000a4000 03:03 55399811 /lib/libm-2.4.so +0fc36000-0fc37000 r--p 000a3000 03:03 55399811 /lib/libm-2.4.so +0fc37000-0fc3b000 rwxp 000a4000 03:03 55399811 /lib/libm-2.4.so +0fc4b000-0fc5d000 r-xp 00000000 03:03 55399821 /lib/libpthread-2.4.so +0fc5d000-0fc6d000 ---p 00012000 03:03 55399821 /lib/libpthread-2.4.so +0fc6d000-0fc6e000 r--p 00012000 03:03 55399821 /lib/libpthread-2.4.so +0fc6e000-0fc6f000 rwxp 00013000 03:03 55399821 /lib/libpthread-2.4.so +0fc6f000-0fc71000 rwxp 0fc6f000 00:00 0 +0fc81000-0fc94000 r-xp 00000000 03:03 55399813 /lib/libnsl-2.4.so +0fc94000-0fca3000 ---p 00013000 03:03 55399813 /lib/libnsl-2.4.so +0fca3000-0fca4000 r--p 00012000 03:03 55399813 /lib/libnsl-2.4.so +0fca4000-0fca5000 rwxp 00013000 03:03 55399813 /lib/libnsl-2.4.so +0fca5000-0fca7000 rwxp 0fca5000 00:00 0 +0fcb7000-0fd5f000 r-xp 00000000 03:03 4231004 +/usr/lib/libglib-2.0.so.0.1200.0 +0fd5f000-0fd6f000 ---p 000a8000 03:03 4231004 +/usr/lib/libglib-2.0.so.0.1200.0 +0fd6f000-0fd72000 rwxp 000a8000 03:03 4231004 +/usr/lib/libglib-2.0.so.0.1200.0 +0fd82000-0fd85000 r-xp 00000000 03:03 55399810 /lib/libdl-2.4.so +0fd85000-0fd94000 ---p 00003000 03:03 55399810 /lib/libdl-2.4.so +0fd94000-0fd95000 r--p 00002000 03:03 55399810 /lib/libdl-2.4.so +0fd95000-0fd96000 rwxp 00003000 03:03 55399810 /lib/libdl-2.4.so +0fda6000-0fdaa000 r-xp 00000000 03:03 4249375 +/usr/lib/libgmodule-2.0.so.0.1200.0 +0fdaa000-0fdb9000 ---p 00004000 03:03 4249375 +/usr/lib/libgmodule-2.0.so.0.1200.0 +0fdb9000-0fdba000 rwxp 00003000 03:03 4249375 +/usr/lib/libgmodule-2.0.so.0.1200.0 +0fdca000-0fdcf000 r-xp 00000000 03:03 4252905 +/usr/lib/libgthread-2.0.so.0.1200.0 +0fdcf000-0fdde000 ---p 00005000 03:03 4252905 +/usr/lib/libgthread-2.0.so.0.1200.0 +0fdde000-0fddf000 rwxp 00004000 03:03 4252905 +/usr/lib/libgthread-2.0.so.0.1200.0 +0fdef000-0ffc1000 r-xp 00000000 fd:06 33579990 +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0.0.0 +0ffc1000-0ffd1000 ---p 001d2000 fd:06 33579990 +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0.0.0 +0ffd1000-0ffdd000 rwxp 001d2000 fd:06 33579990 +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/libmono.so.0.0.0 +0ffdd000-0fff0000 rwxp 0ffdd000 00:00 0 +10000000-10002000 r-xp 00000000 fd:06 33580000 +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/lt-mono +10011000-10012000 rwxp 00001000 fd:06 33580000 +/home/slomo/temp/foo/mono-1.1.13.8/mono/mini/.libs/lt-mono +10012000-10097000 rwxp 10012000 00:00 0 [heap] +30000000-3001d000 r-xp 00000000 03:03 55399804 /lib/ld-2.4.so +3001d000-30022000 rw-p 3001d000 00:00 0 +30022000-30023000 r--p 00000000 03:03 33657954 +/usr/lib/locale/de_DE.utf8/LC_IDENTIFICATION +30023000-30024000 r--p 00000000 03:03 8406096 +/usr/lib/locale/de_DE.utf8/LC_MEASUREMENT +30024000-30025000 r--p 00000000 03:03 33657953 +/usr/lib/locale/de_DE.utf8/LC_TELEPHONE +30025000-30026000 r--p 00000000 03:03 33657952 +/usr/lib/locale/de_DE.utf8/LC_ADDRESS +30026000-30027000 r--p 00000000 03:03 33601819 +/usr/lib/locale/de_DE.utf8/LC_NAME +30027000-30028000 r--p 00000000 03:03 8406092 +/usr/lib/locale/de_DE.utf8/LC_PAPER +30028000-30029000 r--p 00000000 03:03 12646228 +/usr/lib/locale/de_DE.utf8/LC_MESSAGES/SYS_LC_MESSAGES +30029000-3002a000 r--p 00000000 03:03 33596036 +/usr/lib/locale/de_DE.utf8/LC_MONETARY +3002a000-3002b000 r--p 00000000 03:03 33595827 +/usr/lib/locale/de_DE.utf8/LC_TIME +3002b000-3002c000 r--p 00000000 03:03 16777501 +/usr/lib/locale/de_DE.utf8/LC_NUMERIC +3002c000-3002d000 r--p 00000000 03:03 46171002 +/usr/share/locale-langpack/en_GB/LC_MESSAGES/libc.mo +3002d000-3002f000 rwxp 0001d000 03:03 55399804 /lib/ld-2.4.so +3002f000-30106000 r--p 00000000 03:03 8406090 +/usr/lib/locale/de_DE.utf8/LC_COLLATE +30106000-30141000 r--p 00000000 03:03 8389477 +/usr/lib/locale/de_DE.utf8/LC_CTYPE +30141000-30151000 rwxp 30141000 00:00 0 +30151000-30181000 rw-p 30151000 00:00 0 +30181000-30243000 r-xp 00000000 fd:06 281599 +/home/slomo/temp/foo/mono-1.1.13.8/mcs/class/lib/monolite/mcs.exe +30243000-30424000 r-xp 00000000 fd:06 352608 +/home/slomo/temp/foo/mono-1.1.13.8/mcs/class/lib/monolite/mscorlib.dll +30424000-30495000 rw-p 30424000 00:00 0 +30495000-305ca000 rw-s 00000000 fd:06 109548874 +/home/slomo/temp/foo/mono-1.1.13.8/runtime/.wapi/shared_data-odin-Linux-ppc-308-10-0 +305ca000-309b3000 rw-s 00000000 fd:06 109548875 +/home/slomo/temp/foo/mono-1.1.13.8/runtime/.wapi/shared_fileshare-odin-Linux-ppc-40-10-0 +309b3000-309b4000 ---p 309b3000 00:00 0 +309b4000-309b7000 rw-p 309b4000 00:00 0 +309b7000-309bc000 r--p 00000000 03:03 34212906 +/usr/share/locale-langpack/de/LC_MESSAGES/glib20.mo +309bc000-309cc000 rwxp 309bc000 00:00 0 +309cc000-309ec000 rw-p 309cc000 00:00 0 +7fec4000-7fed9000 rw-p 7fec4000 00:00 0 [stack] +make[8]: *** [build/deps/basic-profile-check.exe] Aborted +make[8]: Entering directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +*** The contents of your 'monolite' directory may be out-of-date +*** You may want to try 'make get-monolite-latest' +make[8]: *** [do-profile-check-monolite] Fehler 1 +make[8]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make[7]: *** [do-profile-check] Fehler 2 +make[7]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make[6]: *** [do-profile-check-monolite] Fehler 2 +make[6]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make[5]: *** [do-profile-check] Fehler 2 +make[5]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make[4]: *** [profile-do--basic--all] Fehler 2 +make[4]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make[3]: *** [profiles-do--all] Fehler 2 +make[3]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8/mcs' +make[2]: *** [all-local] Fehler 2 +make[2]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8/runtime' +make[1]: *** [all-recursive] Fehler 1 +make[1]: Leaving directory `/home/slomo/temp/foo/mono-1.1.13.8' +make: *** [all] Fehler 2 + + + +When running it in gdb the backtrace is the following: +Program received signal SIGSEGV, Segmentation fault. +[Switching to Thread 816686304 (zombie)] +0x0f944604 in _Unwind_FindEnclosingFunction () from /lib/libgcc_s.so.1 +(gdb) bt +#0 0x0f944604 in _Unwind_FindEnclosingFunction () from /lib/libgcc_s.so.1 +#1 0x0f94541c in __frame_state_for () from /lib/libgcc_s.so.1 +#2 0x0f945f64 in _Unwind_ForcedUnwind () from /lib/libgcc_s.so.1 +#3 0x0fc58458 in _Unwind_ForcedUnwind () from /lib/libpthread.so.0 +#4 0x0fc556a4 in __pthread_unwind () from /lib/libpthread.so.0 +#5 0x0fc556a4 in __pthread_unwind () from /lib/libpthread.so.0 +#6 0x0fc556a4 in __pthread_unwind () from /lib/libpthread.so.0 +#7 0x0fc556a4 in __pthread_unwind () from /lib/libpthread.so.0 +#8 0x0fc556a4 in __pthread_unwind () from /lib/libpthread.so.0 +#9 0x0fc556a4 in __pthread_unwind () from /lib/libpthread.so.0 +#10 0x0fc556a4 in __pthread_unwind () from /lib/libpthread.so.0 +Previous frame inner to this frame (corrupt stack?) + + +Bye + +PS: this really only happens on PPC, all other archs work fine. And +everything non-mono works fine on PPC too ;) +And this is now with all kinds of PPC, not only PPC64 with 32 bit userland.
_______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
