-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mono-2018-02] BCL Test suite is regularly crashing with a TypeInitializationException #1561
Comments
@luhenry: Did mono unit tests change in mono/2018-02 to run NUnit tests on a new AppDomain? Nothing stands out to me from:
Here's what I think is happening is as follows:
(5) is where things go "wonky". In normal use, there should be only one JVM in the process. The JVM is "registered" into This is where "something" is going horrifically wrong: Because Since nothing makes sense, and Doing Java calls outside the default AppDomain is not behavior that we've previously supported. (It's arguably something we should support, but we'd need to figure out how, and this hasn't been important enough to figure out yet.) |
@jonpryor AFAIK we haven't change the way we run NUnit tests, especially on devices; @marek-safar @akoeplinger @lexas could you please confirm? As for verifying your hypothesis, would it be possible to Debug.Assert we are currently on the root AppDomain when accessing any |
There were changes to 2017-12 diff: mono/NUnitLite@a8bef89 (only one commit) edit: XA doesn't use
|
Regarding XA doesn't use We may want to look into updating |
Hm, perhaps the |
In largely unrelated observations, log-e9dea303ade84275a91249d678efb5d5.txt contains a truncated stack trace:
The We are thus "losing" some of the stack trace because of this call.
|
@luhenry: Unfortunately we can't easily update That said, I'm not sure we need Thus: @pjcollins: Are you able to build xamarin-android yourself? If so, can you apply this patch, then rebuild and rerun the BCL tests? diff --git a/src/Mono.Android/Android.Runtime/AndroidEnvironment.cs b/src/Mono.Android/Android.Runtime/AndroidEnvironment.cs
index e0ee094..fc443a5 100644
--- a/src/Mono.Android/Android.Runtime/AndroidEnvironment.cs
+++ b/src/Mono.Android/Android.Runtime/AndroidEnvironment.cs
@@ -256,6 +256,10 @@ namespace Android.Runtime {
// DO NOT REMOVE
static SynchronizationContext GetDefaultSyncContext ()
{
+ if (!AppDomain.CurrentDomain.IsDefaultAppDomain ()) {
+ Console.WriteLine ("# jonp: ERROR: Executing GetDefaultSyncContext() from outside the default AppDomain!");
+ Console.WriteLine (new System.Diagnostics.StackTrace (true).ToString ());
+ }
var looper = Android.OS.Looper.MainLooper;
if (Android.OS.Looper.MyLooper() == looper)
return Android.App.Application.SynchronizationContext; |
@jonpryor: This seems to confirm your suspicion:
|
mono/mono@252d61d would explain this crash and is first released in |
…n Android AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which mono@252d61d was introduced. Fixes dotnet/android#1561
…n Android (#8291) AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which 252d61d was introduced. Fixes dotnet/android#1561
…n Android AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which mono@252d61d was introduced. Fixes dotnet/android#1561
…n Android AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which mono@252d61d was introduced. Fixes dotnet/android#1561
…n Android (#8296) AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which 252d61d was introduced. Fixes dotnet/android#1561
…n Android (#8297) AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which 252d61d was introduced. Fixes dotnet/android#1561
Bumps to Java.Interop/master/0afb2b0f Bumps to llvm/master/a9cfb50e. Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=11771 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=15051 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=19436 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=45901 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=56071 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58413 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58413 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58413 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=59184 fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60065 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60225 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60298 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60359 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60568 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60756 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60848 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60862 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60900 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60904 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60986 Fixes: https://github.com/mono/mono/issues/59400 Fixes: mono/mono#6169 Fixes: mono/mono#6187 Fixes: mono/mono#6192 Fixes: mono/mono#6255 Fixes: mono/mono#6264 Fixes: mono/mono#6266 Fixes: mono/mono#6281 Fixes: mono/mono#6283 Fixes: mono/mono#6320 Fixes: mono/mono#6339 Fixes: mono/mono#6343 Fixes: mono/mono#6349 Fixes: mono/mono#6379 Fixes: mono/mono#6383 Fixes: mono/mono#6401. Fixes: mono/mono#6411 Fixes: mono/mono#6414 Fixes: mono/mono#6490 Fixes: mono/mono#6721 Fixes: mono/mono#6767 Fixes: mono/mono#6777 Fixes: mono/mono#6848 Fixes: mono/mono#6940 Fixes: mono/mono#6948 Fixes: mono/mono#6998 Fixes: mono/mono#7016 Fixes: mono/mono#7085 Fixes: mono/mono#7086 Fixes: mono/mono#7095 Fixes: mono/mono#7137 Fixes: mono/mono#7184 Fixes: mono/mono#7240 Fixes: mono/mono#7262 Fixes: mono/mono#7289 Fixes: mono/mono#7338 Fixes: mono/mono#7356 Fixes: mono/mono#7364 Fixes: mono/mono#7378 Fixes: mono/mono#7389 Fixes: mono/mono#7460 Fixes: mono/mono#7535 Fixes: mono/mono#7536 Fixes: mono/mono#7610 Fixes: mono/mono#7624 Fixes: mono/mono#7637 Fixes: mono/mono#7655 Fixes: mono/mono#7657 Fixes: mono/mono#7685 Fixes: mono/mono#7786 Fixes: mono/mono#7792 Fixes: mono/mono#7822 Fixes: mono/mono#7860 Fixes: mono/mono#8089 Fixes: mono/mono#8267 Fixes: mono/mono#8409 Fixes: xamarin/maccore#628 Fixes: xamarin/maccore#629 Fixes: xamarin/maccore#673 Fixes: xamarin/maccore#673 Fixes: #1561
Fixes: #1130 Fixes: #1561 (comment) Fixes: #1845 Fixes: #1951 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=10087 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=11771 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=12850 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=18941 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=19436 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=25444 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=33208 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=58413 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=59184 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=59400 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=59779 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=60065 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=60843 Context: mono/mono#6174 Context: mono/mono#6178 Context: mono/mono#6180 Context: mono/mono#6181 Context: mono/mono#6186 Context: mono/mono#6187 Context: mono/mono#6211 Context: mono/mono#6266 Context: mono/mono#6579 Context: mono/mono#6666 Context: mono/mono#6752 Context: mono/mono#6801 Context: mono/mono#6812 Context: mono/mono#6848 Context: mono/mono#6940 Context: mono/mono#6948 Context: mono/mono#6998 Context: mono/mono#6999 Context: mono/mono#7016 Context: mono/mono#7085 Context: mono/mono#7086 Context: mono/mono#7095 Context: mono/mono#7134 Context: mono/mono#7137 Context: mono/mono#7145 Context: mono/mono#7184 Context: mono/mono#7240 Context: mono/mono#7262 Context: mono/mono#7289 Context: mono/mono#7338 Context: mono/mono#7356 Context: mono/mono#7364 Context: mono/mono#7378 Context: mono/mono#7389 Context: mono/mono#7449 Context: mono/mono#7460 Context: mono/mono#7535 Context: mono/mono#7536 Context: mono/mono#7537 Context: mono/mono#7565 Context: mono/mono#7588 Context: mono/mono#7596 Context: mono/mono#7610 Context: mono/mono#7613 Context: mono/mono#7620 Context: mono/mono#7624 Context: mono/mono#7637 Context: mono/mono#7655 Context: mono/mono#7657 Context: mono/mono#7661 Context: mono/mono#7685 Context: mono/mono#7696 Context: mono/mono#7729 Context: mono/mono#7786 Context: mono/mono#7792 Context: mono/mono#7805 Context: mono/mono#7822 Context: mono/mono#7828 Context: mono/mono#7860 Context: mono/mono#7864 Context: mono/mono#7903 Context: mono/mono#7920 Context: mono/mono#8089 Context: mono/mono#8143 Context: mono/mono#8267 Context: mono/mono#8311 Context: mono/mono#8340 Context: mono/mono#8409 Context: mono/mono#8417 Context: mono/mono#8430 Context: mono/mono#8698 Context: mono/mono#8701 Context: mono/mono#8712 Context: mono/mono#8721 Context: mono/mono#8726 Context: mono/mono#8866 Context: mono/mono#9023 Context: mono/mono#9031 Context: mono/mono#9033 Context: mono/mono#9044 Context: mono/mono#9179 Context: mono/mono#9318 Context: mono/mono#9318 Context: xamarin/maccore#628 Context: xamarin/maccore#629 Context: xamarin/maccore#673
Fixes: #1130 Fixes: #1561 (comment) Fixes: #1845 Fixes: #1951 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=10087 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=11771 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=12850 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=18941 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=19436 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=25444 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=33208 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=58413 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=59184 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=59400 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=59779 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=60065 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=60843 Context: mono/mono#6174 Context: mono/mono#6178 Context: mono/mono#6180 Context: mono/mono#6181 Context: mono/mono#6186 Context: mono/mono#6187 Context: mono/mono#6211 Context: mono/mono#6266 Context: mono/mono#6579 Context: mono/mono#6666 Context: mono/mono#6752 Context: mono/mono#6801 Context: mono/mono#6812 Context: mono/mono#6848 Context: mono/mono#6940 Context: mono/mono#6948 Context: mono/mono#6998 Context: mono/mono#6999 Context: mono/mono#7016 Context: mono/mono#7085 Context: mono/mono#7086 Context: mono/mono#7095 Context: mono/mono#7134 Context: mono/mono#7137 Context: mono/mono#7145 Context: mono/mono#7184 Context: mono/mono#7240 Context: mono/mono#7262 Context: mono/mono#7289 Context: mono/mono#7338 Context: mono/mono#7356 Context: mono/mono#7364 Context: mono/mono#7378 Context: mono/mono#7389 Context: mono/mono#7449 Context: mono/mono#7460 Context: mono/mono#7535 Context: mono/mono#7536 Context: mono/mono#7537 Context: mono/mono#7565 Context: mono/mono#7588 Context: mono/mono#7596 Context: mono/mono#7610 Context: mono/mono#7613 Context: mono/mono#7620 Context: mono/mono#7624 Context: mono/mono#7637 Context: mono/mono#7655 Context: mono/mono#7657 Context: mono/mono#7661 Context: mono/mono#7685 Context: mono/mono#7696 Context: mono/mono#7729 Context: mono/mono#7786 Context: mono/mono#7792 Context: mono/mono#7805 Context: mono/mono#7822 Context: mono/mono#7828 Context: mono/mono#7860 Context: mono/mono#7864 Context: mono/mono#7903 Context: mono/mono#7920 Context: mono/mono#8089 Context: mono/mono#8143 Context: mono/mono#8267 Context: mono/mono#8311 Context: mono/mono#8340 Context: mono/mono#8409 Context: mono/mono#8417 Context: mono/mono#8430 Context: mono/mono#8698 Context: mono/mono#8701 Context: mono/mono#8712 Context: mono/mono#8721 Context: mono/mono#8726 Context: mono/mono#8866 Context: mono/mono#9023 Context: mono/mono#9031 Context: mono/mono#9033 Context: mono/mono#9044 Context: mono/mono#9179 Context: mono/mono#9318 Context: mono/mono#9318 Context: xamarin/maccore#628 Context: xamarin/maccore#629 Context: xamarin/maccore#673
Bumps to mono/llvm:release_60@117a508c Bumps to xamarin/xamarin-android-api-compatibility:master@7ccb4802 $ git diff --shortstat e1af6ea..ab3c897d # mono 1443 files changed, 66049 insertions(+), 45745 deletions(-) $ git diff --shortstat bdb3a116..117a508c # llvm 26794 files changed, 4110589 insertions(+), 754376 deletions(-) $ git diff --shortstat c550d1bd..7ccb4802 # xamarin-android-api-compatibility 2 files changed, 16260 insertions(+), 12347 deletions(-) Incomplete summary of easily `grep`able fixes: Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=11199 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=19436 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=23668 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=26983 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=33728 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=46917 fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60065 Fixes: mono/mono#6173 Fixes: mono/mono#6466 Fixes: mono/mono#6647 Fixes: mono/mono#6834 Fixes: mono/mono#7058 Fixes: mono/mono#7137 Fixes: mono/mono#7260 Fixes: mono/mono#7305 Fixes: mono/mono#7402 Fixes: mono/mono#7525 Fixes: mono/mono#7610 Fixes: mono/mono#7649 Fixes: mono/mono#7655 Fixes: mono/mono#7683 Fixes: mono/mono#7685 Fixes: mono/mono#7716 Fixes: mono/mono#7731 Fixes: mono/mono#7785 Fixes: mono/mono#7828 Fixes: mono/mono#7944 Fixes: mono/mono#7947 Fixes: mono/mono#8036 Fixes: mono/mono#8074 Fixes: mono/mono#8089 Fixes: mono/mono#8112 Fixes: mono/mono#8122 Fixes: mono/mono#8143 Fixes: mono/mono#8149 Fixes: mono/mono#8152 Fixes: mono/mono#8175 Fixes: mono/mono#8177 Fixes: mono/mono#8250 Fixes: mono/mono#8267 Fixes: mono/mono#8273 Fixes: mono/mono#8282 Fixes: mono/mono#8310 Fixes: mono/mono#8311 Fixes: mono/mono#8329 Fixes: mono/mono#8340 Fixes: mono/mono#8372 Fixes: mono/mono#8407 Fixes: mono/mono#8409 Fixes: mono/mono#8422 Fixes: mono/mono#8430 Fixes: mono/mono#8439 fixes: mono/mono#8447 Fixes: mono/mono#8469 Fixes: mono/mono#8504 Fixes: mono/mono#8575 Fixes: mono/mono#8597 Fixes: mono/mono#8623 Fixes: mono/mono#8627 Fixes: mono/mono#8698 Fixes: mono/mono#8701 Fixes: mono/mono#8712 Fixes: mono/mono#8721 Fixes: mono/mono#8726 Fixes: mono/mono#8759 Fixes: mono/mono#8787 Fixes: mono/mono#8820 Fixes: mono/mono#8848 Fixes: mono/mono#8866 Fixes: mono/mono#8897 Fixes: mono/mono#8915 Fixes: mono/mono#8970 Fixes: mono/mono#8979 Fixes: mono/mono#9023 Fixes: mono/mono#9031 Fixes: mono/mono#9033 Fixes: mono/mono#9179 Fixes: mono/mono#9234 Fixes: mono/mono#9262 Fixes: mono/mono#9277 Fixes: mono/mono#9318 Fixes: mono/mono#9542 Fixes: mono/mono#9753 Fixes: mono/mono#9839 Fixes: mono/mono#9869 Fixes: mono/mono#9870 Fixes: mono/mono#9943 Fixes: mono/mono#9996 Fixes: mono/mono#10000 Fixes: mono/mono#10303 Fixes: mono/mono#10447 Fixes: mono/mono#10483 Fixes: mono/mono#10488 Fixes: xamarin/maccore#628 Fixes: xamarin/maccore#673 Fixes: #1561 (comment) Fixes: #1845 Fixes: xamarin/xamarin-macios#4347 Fixes: xamarin/xamarin-macios#4617 Fixes: xamarin/xamarin-macios#4618
Steps to Reproduce
Expected Behavior
Suite runs to completion.
Actual Behavior
I'm seeing the following unhandled exception when executing this suite on many devices against the mono-2018-02 branch, however I don't believe it to be directly related to mono changes based on the JNI related stack trace:
Version Information
Operating System: Mac OS X 10.12.3
Product Name: Xamarin.Android
Branch Name: mono-2018-02
Build Revision: 998d3039edf500b71ccc2a2e0aac076aa62516eb
[Device] Manufacturer: Google, Model: Pixel XL, Version: 8.0.0, ABI: arm64-v8a
[Device] Manufacturer: HUAWEI, Model: VTR-L29, Version: 7.0, ABI: arm64-v8a
[Device] Manufacturer: LENOVO, Model: Lenovo K900_ROW, Version: 4.2.1, ABI: x86
Log File
http://xqa.blob.core.windows.net/gist/log-e9dea303ade84275a91249d678efb5d5.txt
http://xqa.blob.core.windows.net/gist/log-0331d118f1e047a39556bdc81129fd60.txt
http://xqa.blob.core.windows.net/gist/log-73af3bd7f90c4806bc618b515cd5be9e.txt
The text was updated successfully, but these errors were encountered: