Skip to content
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

Freezes When Blazor WebAssembly publish #93076

Open
1 task done
Ishikawa-Tatsuya opened this issue Oct 5, 2023 · 18 comments
Open
1 task done

Freezes When Blazor WebAssembly publish #93076

Ishikawa-Tatsuya opened this issue Oct 5, 2023 · 18 comments
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Milestone

Comments

@Ishikawa-Tatsuya
Copy link

Ishikawa-Tatsuya commented Oct 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When I try to deploy my Blazor WebAssembly from Visual Studio to Azure, it freezes midway through.
Here is the information that will be displayed in the output window at the end.

--enable-serialization-discovery --skip-unresolved true --notrimwarn --link-attributes "C:\Program Files\dotnet\sdk\7.0.401\Sdks\Microsoft.NET.ILLink.Tasks\build\6.0_suppressions.xml"

When I tried the dotnet publish command, it also freezes.

After adding the following to WebAssembly's csproj, the problem no longer occurs, so I think it is stuck in the middle of trimming.

<PublishTrimmed>false</PublishTrimmed>

The dll referenced by WebAssembly makes heavy use of reflection.
That dll is also created by me and also references Microsoft.CodeAnalysis.CSharp.

Since it is a commercial software, I cannot attach those codes.
Also, since I have not determined which code caused the problem, I cannot attach the minimum reproduction environment.

WebAssembly and the dlls it references are made with .Net6.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/aspnetcore Oct 5, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 5, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 5, 2023
@vcsjones vcsjones added area-Tools-ILLink .NET linker development as well as trimming analyzers and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 6, 2023
@ghost
Copy link

ghost commented Oct 6, 2023

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

Issue Details

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When I try to deploy my Blazor WebAssembly from Visual Studio to Azure, it freezes midway through.
Here is the information that will be displayed in the output window at the end.

--enable-serialization-discovery --skip-unresolved true --notrimwarn --link-attributes "C:\Program Files\dotnet\sdk\7.0.401\Sdks\Microsoft.NET.ILLink.Tasks\build\6.0_suppressions.xml"

When I tried the dotnet publish command, it also freezes.

After adding the following to WebAssembly's csproj, the problem no longer occurs, so I think it is stuck in the middle of trimming.

<PublishTrimmed>false</PublishTrimmed>

The dll referenced by WebAssembly makes heavy use of reflection.
That dll is also created by me and also references Microsoft.CodeAnalysis.CSharp.

Since it is a commercial software, I cannot attach those codes.
Also, since I have not determined which code caused the problem, I cannot attach the minimum reproduction environment.

WebAssembly and the dlls it references are made with .Net6.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Author: Ishikawa-Tatsuya
Assignees: -
Labels:

untriaged, area-Tools-ILLink

Milestone: -

@vitek-karas
Copy link
Member

Can you please share the version of the SDK you're using?
Also - the version of the ILLink tool - this is probably easiest to get by running dotnet publish /bl and then opening the msbuild.binlog with the https://msbuildlog.com/. In it search for the "$task ILLink".

If you look at the running processes when the publish is "hung", do you see a dotnet process which consumes CPU all the time? Can you try attaching a debugger (a new instance of VS) to that process and break into it - it should show you the callstack of where it's stuck - that would helps us a lot (note that this callstack should not contain any information about the app being built, it should be purely info about the trimmer tool)

@Ishikawa-Tatsuya
Copy link
Author

Ishikawa-Tatsuya commented Oct 9, 2023

Thank you.
I followed the steps you provided and opened msbuild.binlog in MSBuild Structured Log Viewer.

Searching for $task ILLink in Search Log
0 results. Search took: 00:00:00.0000668
was displayed.
The log may not be output because ILLink has not completed its operation.
MSBuild version was "17.7.3+8ec440e68".

Two dotnet.exe's were consuming CPU while it was hanging.
I'll attach the call stacks for both, although it's long.

postscript
I think there are two dotnet.exes because I ran dotnet publish twice during the investigation. I closed the command prompt, but I think dotnet.exe remained.

	System.Private.CoreLib.dll!System.Collections.Generic.Dictionary<int, Mono.Linker.Dataflow.ValueBasicBlockPair>.FindValue(int key) 行 1025	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 70	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.AddIfNotPresent(ILLink.Shared.DataFlow.SingleValue value, out int location) 行 954	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.UnionWith(System.Collections.Generic.IEnumerable<ILLink.Shared.DataFlow.SingleValue> other) 行 469	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.HashSet(System.Collections.Generic.IEnumerable<ILLink.Shared.DataFlow.SingleValue> collection, System.Collections.Generic.IEqualityComparer<ILLink.Shared.DataFlow.SingleValue> comparer) 行 176	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.DeepCopy() 行 286	C#
 	illink.dll!Mono.Linker.Dataflow.TrimAnalysisMethodCallPattern.TrimAnalysisMethodCallPattern(Mono.Cecil.Cil.Instruction operation, Mono.Cecil.MethodReference calledMethod, ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue> instance, System.Collections.Immutable.ImmutableArray<ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>> arguments, Mono.Linker.MessageOrigin origin) 行 41	C#
 	illink.dll!Mono.Linker.Dataflow.ReflectionMethodBodyScanner.HandleCall(Mono.Cecil.Cil.MethodBody callingMethodBody, Mono.Cecil.MethodReference calledMethod, Mono.Cecil.Cil.Instruction operation, Mono.Linker.Dataflow.ValueNodeList methodParams, out ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue> methodReturnValue) 行 177	C#
 	illink.dll!Mono.Linker.Dataflow.MethodBodyScanner.HandleCall(Mono.Cecil.Cil.MethodBody callingMethodBody, Mono.Cecil.Cil.Instruction operation, System.Collections.Generic.Stack<Mono.Linker.Dataflow.StackSlot> currentStack, System.Collections.Generic.Dictionary<Mono.Cecil.Cil.VariableDefinition, Mono.Linker.Dataflow.ValueBasicBlockPair> locals, ref Mono.Linker.Dataflow.InterproceduralState interproceduralState, int curBasicBlock) 行 993	C#
 	illink.dll!Mono.Linker.Dataflow.MethodBodyScanner.Scan(Mono.Linker.MethodIL methodIL, ref Mono.Linker.Dataflow.InterproceduralState interproceduralState) 行 520	C#
 	illink.dll!Mono.Linker.Dataflow.ReflectionMethodBodyScanner.Scan(Mono.Linker.MethodIL methodIL, ref Mono.Linker.Dataflow.InterproceduralState interproceduralState) 行 82	C#
 	illink.dll!Mono.Linker.Dataflow.MethodBodyScanner.InterproceduralScan(Mono.Linker.MethodIL startingMethodIL) 行 208	C#
 	illink.dll!Mono.Linker.Dataflow.ReflectionMethodBodyScanner.InterproceduralScan(Mono.Linker.MethodIL methodIL) 行 74	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.MarkReflectionLikeDependencies(Mono.Linker.MethodIL methodIL, bool requiresReflectionMethodBodyScanner) 行 4000	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.MarkMethodBody(Mono.Cecil.Cil.MethodBody body) 行 3702	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.ProcessMethod(Mono.Cecil.MethodDefinition method, Mono.Linker.DependencyInfo reason, Mono.Linker.MessageOrigin origin) 行 3381	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.ProcessQueue() 行 547	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() 行 437	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.Process() 行 375	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.Process(Mono.Linker.LinkContext context) 行 173	C#
 	illink.dll!Mono.Linker.Pipeline.Process(Mono.Linker.LinkContext context) 行 188	C#
 	illink.dll!Mono.Linker.Driver.Run(Mono.Linker.ILogger customLogger) 行 885	C#
 	illink.dll!Mono.Linker.Driver.Main(string[] args) 行 48	C#
	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 284	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 45	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.FindItemIndex(ILLink.Shared.DataFlow.SingleValue item) 行 289	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues.Equals(ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.EnumerableValues other) 行 37	C#
 	illink.dll!ILLink.Shared.TrimAnalysis.ArrayValue.Equals(ILLink.Shared.TrimAnalysis.ArrayValue otherArr) 行 72	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.GenericEqualityComparer<ILLink.Shared.DataFlow.SingleValue>.Equals(ILLink.Shared.DataFlow.SingleValue x, ILLink.Shared.DataFlow.SingleValue y) 行 77	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.AddIfNotPresent(ILLink.Shared.DataFlow.SingleValue value, out int location) 行 954	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.UnionWith(System.Collections.Generic.IEnumerable<ILLink.Shared.DataFlow.SingleValue> other) 行 469	C#
 	System.Private.CoreLib.dll!System.Collections.Generic.HashSet<ILLink.Shared.DataFlow.SingleValue>.HashSet(System.Collections.Generic.IEnumerable<ILLink.Shared.DataFlow.SingleValue> collection, System.Collections.Generic.IEqualityComparer<ILLink.Shared.DataFlow.SingleValue> comparer) 行 176	C#
 	illink.dll!ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>.DeepCopy() 行 286	C#
 	illink.dll!Mono.Linker.Dataflow.TrimAnalysisMethodCallPattern.TrimAnalysisMethodCallPattern(Mono.Cecil.Cil.Instruction operation, Mono.Cecil.MethodReference calledMethod, ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue> instance, System.Collections.Immutable.ImmutableArray<ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue>> arguments, Mono.Linker.MessageOrigin origin) 行 41	C#
 	illink.dll!Mono.Linker.Dataflow.ReflectionMethodBodyScanner.HandleCall(Mono.Cecil.Cil.MethodBody callingMethodBody, Mono.Cecil.MethodReference calledMethod, Mono.Cecil.Cil.Instruction operation, Mono.Linker.Dataflow.ValueNodeList methodParams, out ILLink.Shared.DataFlow.ValueSet<ILLink.Shared.DataFlow.SingleValue> methodReturnValue) 行 177	C#
 	illink.dll!Mono.Linker.Dataflow.MethodBodyScanner.HandleCall(Mono.Cecil.Cil.MethodBody callingMethodBody, Mono.Cecil.Cil.Instruction operation, System.Collections.Generic.Stack<Mono.Linker.Dataflow.StackSlot> currentStack, System.Collections.Generic.Dictionary<Mono.Cecil.Cil.VariableDefinition, Mono.Linker.Dataflow.ValueBasicBlockPair> locals, ref Mono.Linker.Dataflow.InterproceduralState interproceduralState, int curBasicBlock) 行 993	C#
 	illink.dll!Mono.Linker.Dataflow.MethodBodyScanner.Scan(Mono.Linker.MethodIL methodIL, ref Mono.Linker.Dataflow.InterproceduralState interproceduralState) 行 520	C#
 	illink.dll!Mono.Linker.Dataflow.ReflectionMethodBodyScanner.Scan(Mono.Linker.MethodIL methodIL, ref Mono.Linker.Dataflow.InterproceduralState interproceduralState) 行 82	C#
 	illink.dll!Mono.Linker.Dataflow.MethodBodyScanner.InterproceduralScan(Mono.Linker.MethodIL startingMethodIL) 行 208	C#
 	illink.dll!Mono.Linker.Dataflow.ReflectionMethodBodyScanner.InterproceduralScan(Mono.Linker.MethodIL methodIL) 行 74	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.MarkReflectionLikeDependencies(Mono.Linker.MethodIL methodIL, bool requiresReflectionMethodBodyScanner) 行 4000	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.MarkMethodBody(Mono.Cecil.Cil.MethodBody body) 行 3702	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.ProcessMethod(Mono.Cecil.MethodDefinition method, Mono.Linker.DependencyInfo reason, Mono.Linker.MessageOrigin origin) 行 3381	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.ProcessQueue() 行 547	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() 行 437	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.Process() 行 375	C#
 	illink.dll!Mono.Linker.Steps.MarkStep.Process(Mono.Linker.LinkContext context) 行 173	C#
 	illink.dll!Mono.Linker.Pipeline.Process(Mono.Linker.LinkContext context) 行 188	C#
 	illink.dll!Mono.Linker.Driver.Run(Mono.Linker.ILogger customLogger) 行 885	C#
 	illink.dll!Mono.Linker.Driver.Main(string[] args) 行 48	C#

@marek-safar marek-safar added this to the 8.0.0 milestone Oct 9, 2023
@marek-safar marek-safar removed the untriaged New issue has not been triaged by the area owner label Oct 9, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Oct 9, 2023
@vitek-karas
Copy link
Member

Thanks a lot for the callstacks.
Unfortunately, I can't seem to figure out how to get it to behave that way locally.

We've had several issues around this code but most of them should be fixed in 7.0.401 which is what you're using. I can only think of one possible way which we've seen so far. The fix for that is basically this: #87634.

The repro for that fix is based on analyzer - which has full method body CFG, which trimmer doesn't use, so it's not directly affected. But the trimmer does use the iterative analysis from interprocedural analysis around compiler generated code. I guess it's possible to create a state similar to the one in the analyzer around that. I played with it for a while, but couldn't make it to break.

@Ishikawa-Tatsuya you could check what code makes this a problem. When you have it under the debugger, go to this frame

	illink.dll!Mono.Linker.Steps.MarkStep.ProcessMethod(Mono.Cecil.MethodDefinition method

And look at the method local variable - it should be the name of the method which is caused the tool to break. For a repro I would expect we would just need just that method - and honestly not anything specific - basically whatever it's doing around arrays.

@sbomer Is there a magical incantation which can be used to run the 8.0 linker in 7.0 SDK targeting a 6.0 app? That way we could validate that this problem is fixed in 8 - without retargeting the app which could be a lot of work I guess.

Separately this raises a question: Should we proactively fix the "hang"/"crash" fixes we've made in 8 to 7.0 linker? Specifically I'm thinking:

@Ishikawa-Tatsuya
Copy link
Author

Ishikawa-Tatsuya commented Oct 9, 2023

I checked ProcessMethod and found out the method being processed there.
InvokeMethod.
Attach the method and related fields and methods.

I then tried changing the related assemblies to 7.0, but it froze as well.

readonly object _obj;
readonly string _member;

public async Task<object?> InvokeMethod(object?[] args)
{
    var method = _obj.GetType().GetMethods()
        .Where(e => e.Name == _member && (e.GetParameters().Length == args.Length ||
            (e.GetParameters().Length == 1 && e.GetParameters()[0].ParameterType.IsArray)))
        .FirstOrDefault();
    if (method == null) throw new Exception("Not found method. " + _member);
    var ps = method.GetParameters();
    if (ps.Length == 1 && ps[0].ParameterType.IsArray) args = new[] { args };
    return await AwaitIfTask(method.ReturnType, method!.Invoke(_obj, args));
}

static async Task<object?> AwaitIfTask(Type type, object? ret)
{
    if (ret is Task task)
    {
        if (type.IsGenericType)
        {
            var helper = (ITaskAwaitHelper)Activator.CreateInstance(typeof(TaskAwaitHelper<>).MakeGenericType(type.GetGenericArguments().First()), new object[] { task })!;
            return await helper.Await();
        }
        else
        {
            await task;
            return null;
        }
    }
    return ret;
}
public interface ITaskAwaitHelper
{
    public Task<object?> Await();
}
public class TaskAwaitHelper<T> : ITaskAwaitHelper
{
    Task<T> _task;
    public TaskAwaitHelper(object core) => _task = (Task<T>)core;
    public async Task<object?> Await()
    {
        var ret = await _task;
        return ret;
    }
}

@Ishikawa-Tatsuya
Copy link
Author

I found that if I rewrite this line, it no longer freezes.

//if (ps.Length == 1 && ps[0].ParameterType.IsArray) args = new[] { args };
// ->
var dstArgs = (ps.Length == 1 && ps[0].ParameterType.IsArray) ? new[] { args } : args;

public async Task<object?> InvokeMethod(object?[] args)
{
    var method = _obj.GetType().GetMethods()
        .Where(e => e.Name == _member && (e.GetParameters().Length == args.Length ||
            (e.GetParameters().Length == 1 && e.GetParameters()[0].ParameterType.IsArray)))
        .FirstOrDefault();
    if (method == null) throw new Exception("Not found method. " + _member);
    var ps = method.GetParameters();

    // !
    var dstArgs = (ps.Length == 1 && ps[0].ParameterType.IsArray) ? new[] { args } : args;

    return await AwaitIfTask(method.ReturnType, method!.Invoke(_obj, dstArgs));
}

I also found that this phenomenon occurred even when I simply added the above code to her BlazorWebAssebly that I had just created.

@vitek-karas
Copy link
Member

Thanks a lot - I can repro it as well. Still looking through what's going on... and why it loops.

@vitek-karas
Copy link
Member

I can also confirm that this doesn't repro on .NET 8 illink - so we've fixed it - somewhere :-). Still don't know which change fixed it though. It looks a little like recursive arrays, but not fully recursive, only in value not actual reference recursive.

@Ishikawa-Tatsuya
Copy link
Author

Thank you. My project plans to replace .NET8 once it is released. Until then, I will deal with it temporarily.

@vitek-karas
Copy link
Member

vitek-karas commented Oct 9, 2023

Really simple repro (Edit: even simpler):

		// Force state machine
		static async Task TestRec ()
		{
			typeof (TestType).RequiresAll (); // Force data flow analysis

			object[] args = null;
			args = new[] { args };
		}

On .NET 7 this hangs both the analyzer and illink.

@vitek-karas
Copy link
Member

It is recursive - but it's an overwrite, so we don't hit the direct recursion (which would have crashed the trimmer). It's only recursive due to the state machine, which will continuously expand the possible values - effectively recursively. I assume that once it hits certain size it "hangs" because just equality is too expensive to compute, but eventually it would likely crash with stack overflow as well.

@Ishikawa-Tatsuya
Copy link
Author

😢
I see, it is weak against array reassignment. This is not a good way of writing, so we will avoid this way of writing in the future.

@vitek-karas
Copy link
Member

This a bug - we need to fix it. There's nothing wrong with the pattern as such, it's just uncovering a limitation in the trim analysis.

vitek-karas added a commit to vitek-karas/runtime that referenced this issue Oct 9, 2023
This adds a test for a repro of dotnet#93076 (reproes only on .NET 7).
@sbomer
Copy link
Member

sbomer commented Oct 9, 2023

Should we proactively fix the "hang"/"crash" fixes we've made in 8 to 7.0 linker?

Yes, I think we should. Did you figure out which change fixed this in 8.0?

@vitek-karas
Copy link
Member

Did you figure out which change fixed this in 8.0?

Not yet - I think the change which prevents nested arrays will fix this as well, but I have to port it first.

@vitek-karas
Copy link
Member

So porting trimmer/analyzer parts of #82818 fixed the problem for trimmer. Analyzer hangs on a different test from the suite - so it's probably the other bug to port.

vitek-karas added a commit that referenced this issue Oct 10, 2023
This adds a test for a repro of #93076 (reproes only on .NET 7).
@vitek-karas
Copy link
Member

I created a PR to port the relevant fix to 7.0: dotnet/linker#3231

@vitek-karas
Copy link
Member

Update: We hope to be able to port 2 more (3 total) stability fixes from 8 to 7: dotnet/linker#3234
That includes the fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
Status: No status
Development

No branches or pull requests

5 participants