Re: Timeout failure running Mono 4.0.3.19

Alex J Lennon <[email protected]>
Newsgroups gmane.comp.gnome.mono.general
Message-ID <[email protected]>

On 27/07/2015 16:50, Alex J Lennon wrote:
> Hi,
>
> I'm running 'make check' on Mono 4.0.3.19, building natively on Ubuntu
> 14.04.2 using meta-mono. (The Mono build itself is fine)
>
> I get to "Running tests:" then a couple of "F"'s as the dots progress,
> then the test hangs for a while and I get the following.
>
> ---
>
> Running tests:
> .....................................................................................................................F..............................................................................................................................................................................................................................................F.........................................................................
>
> running tests timed out:
>
> 430
> threadpool-exceptions5.exe
> =============== threadpool-exceptions5.exe.stdout ===============
>
> =============== EOF ===============
> =============== threadpool-exceptions5.exe.stderr ===============
>
> =============== EOF ===============
>
> ---
>
> The stdout and stderr files are empty.
>
> Can anybody advise why this is occurring - i.e. I understand the test is
> failing but it looks like the test runner is failing too instead of just
> giving an 'F' and continuing - or where I need to look to address it?
>

I think I can see how the problem is arising. The threadpool-exceptions5
test is blocking when the environment variable LC_ALL=C.

This is because calling ToString() on the passed exception object in
OnUnhandledException() results in the instantiation of a default
CultureInfo which in turn then tries to retrieve the locale with
get_posix_locale()

get_posix_locale() returns a null when the LC_ALL=C so
CultureInfo::CreateSpecificCulture throws an ArgumentNullException which
is caught in CultureInfo::ConstructCurrentCulture

Unfortunately even though the exception is caught internally it causes a
problem in call_unhandled_exception_delegate in metadata/object.c
resulting in display of "exception inside UnhandledException handler:"
and the code blocking

...

A workaround is to instantiate the default CultureInfo  early on in main
so that the ArgumentNullException does not occur in the
UnhandledException handler.

e.g.

       static int Main ()
        {
              var c = CultureInfo.InstalledUICulture;
              ...

However this seems a bad solution as it doesn't address the underlying
problem that a caught exception ocurring somewhere within a
OnUnhandledException() code-path causes blocking.

I would have thought that a caught exception should not trigger that
codepath in object.c so it looks to me as though there may be something
in the call_unhandled_exception_delegate code in object.c that might
need to be addressed? I would also have thought that when this code-path
does execute we should eventually drop out of Mono not hang.

Regards,

Alex

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.