[Mono-devel-list] FreeBSD 5 and Mac OS X - Some progress
David Morford
david at morford.org
Tue Jul 22 21:36:24 EDT 2003
Thanks for the info Paolo. Inline comments below...
> I don't have a FreeBSD box, so people that have one will need to help
> debug the issue. The version from mono 0.24 apparently hits an issue
> with the smaller default thread stack size on the BSDs, so if you
> start from that, you need to add a call to pthread_attr_setstacksize(),
> see current io-layer/threads.c and recompile. Nobody using *BSDs
> bothered to report to us if that worked, AFAIK.
I've started by working from what is in the FreeBSD-CURRENT ports tree,
0.24, diffed the change 0.24 and the current CVS between threads.c and
changed the second argument for the pthread_attr_setstacksize call to
1MB (1024*1024) and recompiled. This worked it seems. I was able to get
Gtk-sharp 0.9 sources to mostly compile, complaining about corlib being
out of sync along the way, and with a few of the samples failing being
unable to find a few things. Executing the built samples will fail
obviously, with the top of the stack indicating GCHandle failed to
alloc. I rebuilt/reinstalled without libgc and then with the included
libgc with no impact on the built samples problem mentioned above.
Several posts on various lists including freebsd-gnome and wine indicate
the default stack size for thread[0] in FreeBSD is 1MB, following
threads start at 64k. My stacksize limit was set to 64mb (The default
limit it seems in an out of the box install of FreeBSD). Changing the
stacksize limit to unlimited had no impact as far as I could see in the
scenarios I ran.
The next step will be to clean 0.24 from the system and build 0.25 from
source packages with the pthread stacksize set to 1MB then trying mono
with internal GC vs. the libgc 6.2 from the ports tree and bulding/using
gtk-sharp. If that works, I will report my findings and try CVS using
the new build system.
> If libgc is not the culprit, you can try running the compilation under
> gdb and poke around for clues. We are available on the #mono channel
> (irc.gimp.org) if you need some interactive help with that.
Thanks. I only had a short time to look at the issue once I got the
compiler working but running mono under gdb and passing one of the
managed gtk-sharp samples (buttons.exe) generated a sigsegv in
mini.c:mono_thread_start_cb(). I left it there and decided to try with
0.25 and/or CVS. If I get the same results, I'll look into it and can
forward on the stack, threads, mem, et al from gdb if it is something I
can't figure out a resolution to myself.
>>At this point, I'm interested in getting CVS to build correctly and
>>regularly on FreeBSD 5.1 and Mac OS X 10.2/10.3 (Dev Preview) and to
>>keep it that way moving forward. Any plans for a bsd.make or osx.make in
>>mcs/build/platforms at some point? I'm willing to assist anyone working
>
>
> If you contribute it, we'll likely add it to cvs.
Thanks. I'll look into how the CVS tree works for the core modules and
attempt to reconcile that with FreeBSD 5.1 release/current in the next
few weeks and hopefully have something for FreeBSD first with OS X
following.
First step though is getting 0.25/CVS working.
Tks,
Dave
More information about the Mono-devel-list
mailing list