[Mono-list] Timeout failure running Mono 4.0.3.19

Alex J Lennon ajlennon at dynamicdevices.co.uk
Mon Jul 27 20:14:48 UTC 2015



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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20150727/857d7b98/attachment.html>


More information about the Mono-list mailing list