You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Xamarin.Android.Build.Tests] Retry builds on native crashes (#993)
Sometimes when running `Xamarin.Android.Build.Tests`, mono crashes:
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_obj (intptr,intptr) [0x00000] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at (wrapper alloc) object.AllocSmall (intptr,intptr) <0x000fa>
at System.IO.FileSystemEnumerableIterator`1<TSource_REF>.CreateSearchResult (System.IO.Directory/SearchData,Microsoft.Win32.Win32Native/WIN32_FIND_DATA) [0x00023] in <4fdc5ed61a074cafb49fa42deb20d521>:0
# Actual stack trace doesn't *really* matter, and is basically random
...
Native stacktrace:
0 mono 0x000000010d9df481 mono_handle_native_crash + 257
...
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
This is decidedly Not Good™.
However, a significant percent of the time, the crash *also* isn't
reproducible: a re-run of the build+tests will result in all tests
passing. However, a re-run can take upwards of 2-6 *hours* --
depending mostly on whether the PR has a mono bump -- so it is
undesirable to re-run builds just to see if it's a "random" error.
Instead, update `Builder.BuildInternal()` so that if it determines
that mono crashed -- via the `Got a SIGSEGV…` message -- then we'll
re-try the crashing command. (Just once!)
This should hopefully reduce the number of test failures we need
to investigate.
The *downside* is that the #runtime team would dearly love to know
about these crashes, so *they* can investigate. This is *partially*
supported by emitting the following message into the build output
when a native crash is detected:
Native crash detected! Running the build for … again.
This is less than ideal, and may be improved in the future.
0 commit comments