On Mar 19, 2012, at 1:32 PM, mcleodia wrote:
> I went away and tried to get the profiler running via environment variables
> as per your suggestion, however I didn't see a way of invoking the profiler
> other than using the command line option '--profile=log:heapshot'.
iirc heapshot is a separate native library, which we don't currently build or
bundle. Oops. :-/
> The next step I took was to strip back our codebase to run just the very core
> network stack (which is cross platform and runs on .NET and Mono),
Brilliant idea.
> I managed to find a leak when repeatedly starting/stopping our network stack
> on a busy network on a mac using mono (with boehm GC).
You should use sgen, as that's what Mono for Android uses. However, with both
boehm and sgen the stack is conservatively scanned, so it's possible that the
GC believes that a value is still being used when it isn't being used.
> Again, sadly, I also ran into the very same problem that we encountered with
> the GC crashes bug we discussed previously
This is very good, actually; if we can repro the issue without needing to run
on an Android device, things get much simpler. :-)
Please file a bug at bugzilla.xamarin.com with instructions on how to
reproduce. :-)
> - it only seems to happen on a busy network with plenty of Upnp devices
> kicking about
:-/
Would it be possible to fire up some extra threads which create UDP traffic on
the appropriate port? (I suspect not; iirc only a single process on a machine
can "own" a port, but running an app on a different machine on the same network
might be able to create enough UPNP-like traffic that the issue is triggered...)
> My next line of attack was to try to get the mono profiler running on the
> mac, and try and chase down the leaked objects but unfortunately the profiler
> requires the use of sgen and as soon as I run it using sgen, both mono 2.10.8
> and the 2.10.9 beta crash out with mono-sgen related stacktraces.
I need to sic the GC guys on this...
> So next I had a shot at compiling and running the latest mono from a fresh
> git clone today, but this crashed out with an EntryPointNotFoundException
> trying to run CreateNLSocket() from libMonoPosixHelper
I'm guessing that you need to set DYLD_LIBRARY_PATH so that your new
libMonoPosixHelper.dylib is found when running your newly built mono. For
example, this is what I set things to for my git build of mono:
export MONO_PREFIX=/Users/jon/Development/mono-HEAD/install
export PATH=$MONO_PREFIX/bin:$PATH
export
PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:/Library/Frameworks/Mono.framework/Libraries/pkgconfig:$PKG_CONFIG_PATH
export ACLOCAL_FLAGS="-I
/Library/Frameworks/Mono.framework/Versions/Current/share/aclocal"
export
DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib:/lib:/usr/lib
Thanks,
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid