Re: [Mono-dev] xbuild crash with mono 4.6.1?

2016-10-20 Thread David Evans
Project isn’t available, but I can try to catch it in the act since it’s 
occurring regularly. I’ll reply to you directly if / when I’m able to set that 
up. Thx!

From: Vlad Brezae [mailto:vlb...@microsoft.com]
Sent: Wednesday, October 19, 2016 5:20 PM
To: David Evans 
Cc: mono-devel-l...@lists.ximian.com
Subject: Re: [Mono-dev] xbuild crash with mono 4.6.1?

Hey David,

  Would it be possible to repro this issue ? Is this project available 
somewhere ?

  If it’s not an OOM issue, then additional debugging would be 
required. Judging from the stacktrace and source code, 
mono_valloc/mono_valloc_aligned fails for whatever reason. Either desc is 
corrupted (it would be useful to know the contents of the memory there) and we 
are trying to allocate invalid amounts of memory, or the mmap behind the scenes 
fails for other reasons (in which case it would be useful to know the errno 
value). This information should not be too hard to find by attaching with 
lldb/gdb (MONO_DEBUG=suspend-on-sigsegv can be passed if the debugger does not 
attach automatically).

 Ideally it would be nice to see this crash myself, but I’m not sure 
whether this is possible.

Thanks,
Vlad

From: David Evans 
>
Date: Thursday, 20 October 2016 at 02:20
To: Vlad Brezae >, mono-devel 
>
Subject: RE: [Mono-dev] xbuild crash with mono 4.6.1?

Thanks, Vlad. I did check that first and though xbuild uses an insane amount of 
memory there still was tons left when it crashed. I did some profiling 
yesterday to confirm and it’s crashing when there are still gigs of physical 
memory available plus all of the swap. Which is why I suspected some kind of 
heap corruption as a more likely cause.

I just noticed that I was testing against the 4.6.1.3 source package, I can try 
4.6.1.5 as well. I can also try earlier builds of 4.x to see where it might 
have been introduced, but that will take me some time. Sounds like this is not 
a known issue to folks here?

I did just find two open Bugzilla reports that looks similar but not exactly 
the same, against 4.6.0, but without any resolution or diagnosis yet. I just 
added notes to these:
https://bugzilla.xamarin.com/show_bug.cgi?id=44970

And also this building in XS reported for 4.6.0:
https://bugzilla.xamarin.com/show_bug.cgi?id=44355

Thanks,
David

From: Vlad Brezae [mailto:vlb...@microsoft.com]
Sent: Tuesday, October 18, 2016 2:11 PM
To: David Evans 
>; 
mono-devel 
>
Subject: Re: [Mono-dev] xbuild crash with mono 4.6.1?

Hello David,

Based on the crash site, it would seem that we fail to allocate memory from 
the OS, which means we have an OOM situation, which we poorly handle as of 
right now.

 Could you check whether this is the case, whether there are mono instances 
that use more memory than expected. You could consider trying to limit the heap 
from growing too much by passing MONO_GC_PARAMS=soft-heap-limit=, 
unless something is leaking.

Vlad

From: Mono-devel-list 
>
 on behalf of David Evans 
>
Date: Tuesday, 18 October 2016 at 20:50
To: mono-devel 
>
Subject: [Mono-dev] xbuild crash with mono 4.6.1?

I just started building and testing with mono 4.6.1 and I’m seeing an 
intermittent crash (memory corruption?) now during the build. Happens for me 
about one time out of ten. Anyone else seeing this or is there a solution 
already available that I could patch with? We have a fairly large project which 
uses a lot of memory, but I haven’t seen anything like this building with 
4.0.4.1 or when I tried out 4.2.x or 4.3.x Thanks!

Appears to be crashing in sgen when allocating, hence my corruption guess.
Full traces here:

Re: [Mono-dev] Problem with mcs build

2016-10-20 Thread Marek Safar
That's just a warning you can safely ignore. What is more important is that
basic.exe failed with error code which at this point looks like some sort
of runtime error/problem.

Marek
​
___
Mono-devel-list mailing list
Mono-devel-list@lists.dot.net
http://lists.dot.net/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Problem with mcs build

2016-10-20 Thread Cyd Haselton
Did some searching last night and came across this link:
http://koushd.blogspot.com/2009/01/building-mono-for-android.html

It has recommendations for building on Android.

I ran distclean, then re-ran configure with the recommended switches.  The
build still fails, but without the unhandled exception error…just the
'warning: SDK path could not be resolved.'

I have a hunch that it's something to do with Mono.CSharp.Location, but
I'll post build logs when I've uploaded them.

On Oct 20, 2016 2:52 AM, "Marek Safar"  wrote:

> You are still missing some of required runtime methods to bootstrap. At
> this stage we don't have great error reporting but for some reason you are
> missing native implementation for required icall.
>
> Marek
>
> On Wed, Oct 19, 2016 at 8:45 PM, Cyd Haselton  wrote:
>
>> Answer to previous question is 'no.' I ran 'make distclean' then ran
>> configure with 'decimal' removed from --enable-minimal. Same error at same
>> point in build process.
>>
>> Any thoughts?
>>
>> On Oct 19, 2016 12:39 PM, "Cyd Haselton"  wrote:
>>
>>> I noticed that the error thrown when the build fails is a
>>> 'MissingMethodException' and that it references
>>> Mono.CSharp.DecimalConstant.Emit.  I disabled decimal in configure with
>>> the --enable-minimal option. Could that be causing the error?
>>>
>>> Here's part of the error:
>>> Unhandled Exception:
>>> Mono.CSharp.InternalErrorException: cs-tokenizer.cs(1664,20):
>>> Mono.CSharp.Tokenizer.adjust_real(System.TypeCode,
>>> Mono.CSharp.Location) ---> Mono.CSharp.InternalErrorException:
>>> cs-tokenizer.cs(1665,3): ---> System.MissingMethodException:
>>> Arg_MissingMethodException   at
>>> Mono.CSharp.DecimalConstant.Emit (Mono.CSharp.EmitContext ec) [0x0002f]
>>> in <117fbdbdcd0745089048f52eb03cb7af>:0
>>>
>>> On Oct 19, 2016 12:25 PM, "Cyd Haselton"  wrote:
>>>
 The clean build still fails, even with the updated monolite.  Do you
 want build logs?

 On Oct 19, 2016 11:49 AM, "Cyd Haselton"  wrote:

> Ran make get-monolite-latest then re-ran make. That failed.  Will run
> make clean, then re-run make now that monolite was updated, but I'm not
> hopeful.
>
> Additional FYI, as a troubleshooting step I symlinked mscorlib.dll to
> the $PREFIX/lib/mono/4.5 location that the build was complaining about.
>
> The build still failed.
>
> On Oct 19, 2016 10:57 AM, "Marek Safar"  wrote:
>
>> Hi,
>>
>> Try to do `make get-monolite-latest` if that will resolve the issue.
>>
>> jay is using C compiler therefore does not need working C# compiler.
>>
>> On Wed, Oct 19, 2016 at 5:54 PM, Cyd Haselton 
>> wrote:
>>
>>> Wouldn't the build of jay fail if the monolite version was out of
>>> sync?
>>>
>>> On Oct 19, 2016 10:01 AM, "Cyd Haselton" 
>>> wrote:
>>>
 The monolite files were included with the source tarball, so
 hopefully they are in line with the runtime.

 I can always run make get-monolite-latest.

 On Oct 19, 2016 8:53 AM, "Marek Safar" 
 wrote:

> Hi,
>
> How did you install monolite? It looks like it's out of sync to
> your runtime.
>
> Marek
>
> On Tue, Oct 18, 2016 at 9:58 PM, Cyd Haselton  > wrote:
>
>> Just in case, I ran 'make clean' and redid the build.
>> Link to build log: http://pastebin.com/TBSUNH4x
>>
>> On Oct 18, 2016 2:20 PM, "Cyd Haselton" 
>> wrote:
>>
>>> From previous conversation:
>>>
>>> On Oct 18, 2016 9:08 AM, "Marek Safar" 
>>> wrote:
>>>
>>> Yes, please
>>>
>>> On Tue, Oct 18, 2016 at 3:53 PM, Cyd Haselton >> @gmail.com >wrote:
>>>
>>> I've already posted full build logs from root source folder.  Do
>>> you want me to also cd to mono, run make and post build logs from 
>>> that?
>>>
>>> I posted full build logs about four replies back; here are the
>>> links:
>>>
>>> autogen.sh:http://pastebin.com/P4LcBWpZ
>>> make: http://pastebin.com/JvdhWhCC
>>>
>>> On Oct 18, 2016 1:23 PM, "Marek Safar" 
>>> wrote:
>>>
 I asked for "full mono build" not for build of mono subfolder

 On Tue, Oct 18, 2016 at 6:17 PM, Cyd Haselton <
 chasel...@gmail.com> wrote:

> That's it. You asked me to build in the mono directory…that's
> the result.