[Mono-bugs] [Bug 77028][Min] Changed - mono build process segfaults
on powerpc
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Mar 28 23:38:54 EST 2006
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 slomo at ubuntu.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77028
--- shadow/77028 2006-03-05 00:43:59.000000000 -0500
+++ shadow/77028.tmp.11986 2006-03-28 23:38:54.000000000 -0500
@@ -380,6 +380,32 @@
------- Additional Comments From dostrow at gentoo.org 2006-03-05 00:43 -------
Just wanted to confirm this is being seen on Gentoo as well (both mono
1.1.12.1 and 1.1.13.2). I'm also running a ppc64 with a 32bit userland
on a dual-dual-core G5. I have been able to work around the bug by
binding all mono processes (including all builds) to a cpuset
containing only one processor.
+
+------- Additional Comments From slomo at ubuntu.com 2006-03-28 23:38 -------
+Seems like our current workaround has been forgotten to attach here...
+this fixes the build for us and the gentoo/fedora folks so there
+really is a thread-safety bug:
+
+--- mono-1.1.13.2~/mono/mini/main.c 2004-12-10 19:01:25.000000000
+-0500
++++ mono-1.1.13.2/mono/mini/main.c 2006-02-16 12:04:28.000000000
+-0500
+@@ -1,8 +1,15 @@
+ #include "mini.h"
++#include <sched.h>
+
+ int
+ main (int argc, char* argv[])
+ {
++ /* On PowerPC call sched_setaffinity to bind to one CPU only
++ * to work around parallelism bug on G5 SMP */
++ #ifdef __powerpc__
++ unsigned long mask = 1;
++ sched_setaffinity(0, sizeof(mask), &mask);
++ #endif
+ return mono_main (argc, argv);
+ }
+
More information about the mono-bugs
mailing list