Bug 52258 - mono-master-monodroid crashes during BCL build
Summary: mono-master-monodroid crashes during BCL build
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
Depends on:
Reported: 2017-02-02 17:52 UTC by Rodrigo Kumpera
Modified: 2017-03-14 18:05 UTC (History)
3 users (show)

Tags: 2017-02
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rodrigo Kumpera 2017-02-02 17:52:16 UTC

[7:32:01] CSC     [build] gacutil.exe
[7:32:03] Stacktrace:
[7:32:03]   at <unknown> <0xffffffff>
[7:32:03]   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <ce9b6fc9e2c7484c82f15dcbb982f106>:0
[7:32:03]   at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) [0x0001e] in <ce9b6fc9e2c7484c82f15dcbb982f106>:0
[7:32:03] Native stacktrace:
[7:32:03] 	0   mono                                0x000000010892b795 mono_handle_native_crash + 277
[7:32:03] 	1   mono                                0x0000000108994da6 altstack_handle_and_restore + 70
[7:32:03] 	2   ???                                 0x0000000113ed8d9f 0x0 + 4629302687
[7:32:03] 	3   ???                                 0x00000001131ed552 0x0 + 4615755090
[7:32:03] 	4   ???                                 0x00000001131e41e5 0x0 + 4615717349
[7:32:03] 	5   ???                                 0x00000001131673fc 0x0 + 4615205884
[7:32:03] 	6   ???                                 0x0000000113157fdb 0x0 + 4615143387
[7:32:03] Debug info from gdb:
[7:32:03] lldb: unrecognized option `--batch'```
Comment 1 Marek Safar 2017-02-03 11:33:51 UTC
This is quite odd as there should be nothing special on Android BCL build

The wrench failure is due to Android referencing files directly in BCL. I cold not find any crash in the log

I am happy to fix the BCL issue but don't know where (for now)
Comment 2 Zoltan Varga 2017-02-03 20:09:00 UTC
The log doesn't contain any crashes, it fails with:

[4:24:55] Making all in src/Mono.Data.Sqlite
[4:24:55] perl generate-csproj.pl "arm64-v8a armeabi armeabi-v7a x86 x86_64" < Mono.Data.Sqlite.csproj.in > Mono.Data.Sqlite.csproj.tmp
[4:24:55] sed "s#@SQLITE_LIBS@#/Users/builder/data/lanes/1845/63df1eab/source/monodroid/external/sqlite-xamarin/src/main/libs#" Mono.Data.Sqlite.csproj.tmp > Mono.Data.Sqlite.csproj
[4:24:55] rm Mono.Data.Sqlite.csproj.tmp
[4:24:55] make[2]: *** No rule to make target `../../../mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/MonoPInvokeCallbackAttribute.cs', needed by `bin/Debug/Mono.Data.Sqlite.dll'.  Stop.
[4:24:55] make[1]: *** [all-recurse] Error 1
Comment 3 Zoltan Varga 2017-02-03 20:09:48 UTC
Which file was removed by mono 09774416fd9032d1beef725f68856adc23d51ab8.
Comment 4 Zoltan Varga 2017-02-03 20:35:33 UTC
diff --git a/src/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj.in b/src/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj.in
index 384f9ca..7b08da2 100644
--- a/src/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj.in
+++ b/src/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj.in
@@ -59,7 +59,7 @@
     <Compile Include="..\..\..\mono\mcs\class\Mono.Data.Sqlite\Assembly\AssemblyInfo.cs">
-    <Compile Include="..\..\..\mono\mcs\class\Mono.Data.Sqlite\Mono.Data.Sqlite_2.0\MonoPInvokeCallbackAttribute.cs">
+    <Compile Include="..\..\..\mono\mcs\class\System\Mono.Util\MonoPInvokeCallbackAttribute.cs">
     <Compile Include="..\..\..\mono\mcs\class\Mono.Data.Sqlite\Mono.Data.Sqlite_2.0\SQLite3.cs">
Comment 5 Marek Safar 2017-02-06 12:22:29 UTC
Rodrigo where did you see the crash
Comment 6 Rodrigo Kumpera 2017-02-06 19:54:13 UTC
Sorry guys!

Here's the actual crash: https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=1845&host_id=142&revision_id=853600

It happens in about 5% of the builds.
Comment 7 Marek Safar 2017-02-13 15:37:36 UTC
This looks like roslyn caused runtime crash but it's odd it's happening in monodroid context only
Comment 8 Marek Safar 2017-03-14 18:05:26 UTC
Closing as Monodroid builds again