Skip to content

Commit

Permalink
Bump to dotnet/installer@3ebe0ca9 6.0.100-preview.6.21276.2 (dotnet#5954
Browse files Browse the repository at this point in the history
)

Changes: dotnet/installer@f442964...3ebe0ca
Changes: dotnet/linker@7a5c445...620b243
Changes: dotnet/runtime@6430375...5a26d12

Context: https://github.com/dotnet/sdk/blob/1f544a59270cecb2947e50a01f7056c685b4e319/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L389-L392
Context: dotnet#5954 (comment)
Context: dotnet#5669 (comment)
 
Updates:
 
  * Microsoft.Dotnet.Sdk.Internal:
    [from 6.0.100-preview.5.21266.3 to 6.0.100-preview.6.21276.2][0]

  * Microsoft.NET.ILLink.Tasks:
    [from 6.0.100-preview.5.21264.1 to 6.0.100-preview.6.21275.1][1]

  * Microsoft.NETCore.App.Ref:
    [from 6.0.0-preview.5.21265.5 to 6.0.0-preview.6.21274.1][2]
 
Update `.apkdesc` files, as `System.Net.Quic.dll` is now included
in the Xamarin.Forms sample.

Fix `azure-pipelines.yaml` so that if (when) the
`Mono.Android.NET_Tests` unit tests fail, the corresponding `.apk`
or `.aab` file is uploaded for our later investigation; see also
commit af7f7f5, which contained a "typo" such that .NET 6 packages
*weren't* uploaded on unit test failure, as they used the wrong
target framework identifier in the path.

Finally, and most annoying of all, the `$(InvariantGlobalization)`
MSBuild property should *not* default to `false` in .NET 6 projects,
as was introduced in commit 9ac280c, but instead should default
to *the empty string*.

The problem is due to [`Microsoft.NET.Sdk.targets`][3]:

	<RuntimeHostConfigurationOption
	    Condition=" '$(InvariantGlobalization)' != '' "
	    Include="System.Globalization.Invariant"
	    Value="$(InvariantGlobalization)"
	    Trim="true"
	/>

The above fragment sets `%(RuntimeHostConfigurationOption.Trim)` to
`True` for `System.Globalization.Invariant` whenever
`$(InvariantGlobalization)` is *not* the empty string.

The value `false` is *not* the empty string.

This caused `System.Globalization.Invariant`-related trim features
to be enabled, which had the unfortunate and unanticipated side effect
of causing ICU to *not* be properly initialized when running the
`Mono.Android.NET_Tests` unit test apps, which resulted in a SIGSEGV:

	libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 31880 (droid.NET_Tests), pid 31880 (droid.NET_Tests)
	crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
	tombstoned: received crash request for pid 31880
	crash_dump64: performing dump of process 31880 (target tid = 31880)
	DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
	DEBUG   : Build fingerprint: 'google/redfin/redfin:11/RQ1A.201205.011/6966805:user/release-keys'
	DEBUG   : Revision: 'MP1.0'
	DEBUG   : ABI: 'arm64'
	DEBUG   : Timestamp: 2021-05-26 15:21:42-0400
	DEBUG   : pid: 31880, tid: 31880, name: droid.NET_Tests  >>> Mono.Android.NET_Tests <<<
	DEBUG   : uid: 10282
	DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
	DEBUG   : Cause: null pointer dereference
	DEBUG   :     x0  b400007c4de52530  x1  0000007fcc4cbeec  x2  fffffffffffffff0  x3  b400007d2de37c80
	DEBUG   :     x4  b400007d2de37cf0  x5  0000000000000004  x6  0000007c2225ddac  x7  0000007fcc4cbfe0
	DEBUG   :     x8  0000000000000000  x9  000000001333c921  x10 0000000000000000  x11 000000002de37cf0
	DEBUG   :     x12 000000002a742e66  x13 0000000000000012  x14 0000000000000200  x15 0000000000000011
	DEBUG   :     x16 0000007bd6adb810  x17 0000007ed2056240  x18 0000007ed3b94000  x19 0000007fcc4cc040
	DEBUG   :     x20 b400007c4de52530  x21 b400007c4de52530  x22 0000000000000000  x23 b400007d7de490c0
	DEBUG   :     x24 0000000000000001  x25 0000007bd58055c0  x26 0000007bd5cc0130  x27 0000007ed33ab000
	DEBUG   :     x28 0000007bd6af1000  x29 0000007fcc4cbf00
	DEBUG   :     lr  0000007bd69119c8  sp  0000007fcc4cbee0  pc  0000000000000000  pst 0000000080001000
	…
	DEBUG   : backtrace:
	DEBUG   :       #00 pc 0000000000000000  <unknown>
	DEBUG   :       #1 pc 000000000014e9c4  /data/app/~~oruJhhqj_EC_NWSaIGF_RQ==/Mono.Android.NET_Tests-G1iNxUwmGyu-tDRqYcK94g==/lib/arm64/libmonosgen-2.0.so (GlobalizationNative_GetSortHandle+76) (BuildId: 869ce5526fa884035199acac4ddc81bb6eeaf134)
	DEBUG   :       #2 pc 000000000000ddbc  <anonymous:7c22250000>

While we've (inadvertently) had `%(Trim)` enabled for over three
months now, the *trigger* for this particular crash appears to be
commit dotnet/runtime@bc27d49, which moved ICU initialization outside
of the `GlobalizationMode` static constructor and into a new
`GlobalizationMode.Settings` static constructor…which wasn't executed.

Explicitly setting `$(InvariantGlobalization)` to the empty string
*unless* it is the value `true` allows us to avoid setting
`%(RuntimeHostConfigurationOption.Trim)`=True for
`System.Globalization.Invariant`, which in turn avoids whatever set
of linker-induced changes were preventing ICU from being properly
initialized, which avoids the SIGSEGV.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Peppers <[email protected]>
Co-authored-by: Peter Collins <[email protected]>
 
[0]: dotnet/installer@f442964...3ebe0ca
[1]: dotnet/linker@7a5c445...620b243
[2]: dotnet/runtime@6430375...5a26d12
[3]: https://github.com/dotnet/sdk/blob/1f544a59270cecb2947e50a01f7056c685b4e319/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L389-L392
  • Loading branch information
dotnet-maestro[bot] authored May 28, 2021
1 parent 339b79c commit da536fc
Show file tree
Hide file tree
Showing 6 changed files with 531 additions and 524 deletions.
6 changes: 3 additions & 3 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ stages:
testName: Mono.Android.NET_Tests
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration).xml
artifactSource: bin/Test$(XA.Build.Configuration)/net6-android/Mono.Android.NET_Tests-Signed.apk
artifactSource: bin/Test$(XA.Build.Configuration)/net6.0-android/Mono.Android.NET_Tests-Signed.apk
artifactFolder: net6-Default
useDotNet: true

Expand All @@ -800,7 +800,7 @@ stages:
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)Aab.xml
extraBuildArgs: /p:TestsFlavor=Aab /p:AndroidPackageFormat=aab
packageType: Aab
artifactSource: bin/Test$(XA.Build.Configuration)/net6-android/Mono.Android.NET_Tests-Signed.aab
artifactSource: bin/Test$(XA.Build.Configuration)/net6.0-android/Mono.Android.NET_Tests-Signed.aab
artifactFolder: net6-Aab
useDotNet: true

Expand All @@ -811,7 +811,7 @@ stages:
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)Interpreter.xml
extraBuildArgs: /p:TestsFlavor=Interpreter /p:UseInterpreter=True
artifactSource: bin/Test$(XA.Build.Configuration)/net6-android/Mono.Android.NET_Tests-Signed.apk
artifactSource: bin/Test$(XA.Build.Configuration)/net6.0-android/Mono.Android.NET_Tests-Signed.apk
artifactFolder: net6-Interpreter
useDotNet: true

Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-preview.5.21266.3">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-preview.6.21276.2">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>f442964a34125c76240b1bf2d2c53fdb00d53e41</Sha>
<Sha>3ebe0ca9715283842b003a75cf2b3603ca28d964</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.5.21264.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21275.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/mono/linker</Uri>
<Sha>7a5c445a69359415b7ff18b91cd24472ef9509ff</Sha>
<Sha>620b243420f5218be7002fdc04223c05854c60d6</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-preview.5.21265.5" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-preview.6.21274.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>64303750a9198a49f596bcc3aa13de804e421579</Sha>
<Sha>5a26d12c41b866731a195938bf3c162ba4a04ce2</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-preview.5.21266.3</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.100-preview.5.21264.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-preview.6.21276.2</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.100-preview.6.21275.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>5.0.0-beta.20181.7</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>6.0.0-beta.21212.6</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-preview.5.21265.5</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-preview.6.21274.1</MicrosoftNETCoreAppRefPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Trim all characters after first `-` or `+` is encountered. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
<EnableUnsafeUTF7Encoding Condition="'$(EnableUnsafeUTF7Encoding)' == ''">false</EnableUnsafeUTF7Encoding>
<EnableUnsafeBinaryFormatterSerialization Condition="'$(EnableUnsafeBinaryFormatterSerialization)' == ''">false</EnableUnsafeBinaryFormatterSerialization>
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
<!--
FIXME: set $(InvariantGlobalization) to empty unless it is set to true
See: https://github.com/dotnet/sdk/blob/1f544a59270cecb2947e50a01f7056c685b4e319/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L389-L392
-->
<InvariantGlobalization Condition="'$(InvariantGlobalization)' != 'true'"></InvariantGlobalization>
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">true</UseSystemResourceKeys>
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,37 @@
"Size": 54406
},
"assemblies/Mono.Android.dll": {
"Size": 78819
"Size": 78828
},
"assemblies/System.Linq.dll": {
"Size": 10155
},
"assemblies/System.Private.CoreLib.dll": {
"Size": 489247
"Size": 488969
},
"assemblies/System.Runtime.dll": {
"Size": 2265
"Size": 2263
},
"assemblies/UnnamedProject.dll": {
"Size": 3176
"Size": 3160
},
"classes.dex": {
"Size": 316792
},
"lib/arm64-v8a/libmonodroid.so": {
"Size": 346848
"Size": 336656
},
"lib/arm64-v8a/libmonosgen-2.0.so": {
"Size": 3947544
"Size": 3939352
},
"lib/arm64-v8a/libSystem.IO.Compression.Native.so": {
"Size": 776168
"Size": 776216
},
"lib/arm64-v8a/libSystem.Native.so": {
"Size": 75824
"Size": 75872
},
"lib/arm64-v8a/libSystem.Security.Cryptography.Native.Android.so": {
"Size": 162248
"Size": 166408
},
"lib/arm64-v8a/libxamarin-app.so": {
"Size": 11504
Expand All @@ -53,7 +53,7 @@
"Size": 2162
},
"res/drawable-hdpi-v4/icon.png": {
"Size": 4762
"Size": 4791
},
"res/drawable-mdpi-v4/icon.png": {
"Size": 2200
Expand Down
Loading

0 comments on commit da536fc

Please sign in to comment.