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

[ILink][browser][debug] Microsoft.CodeAnalysis.Operations.DynamicMemberReferenceOperation #94016

Closed
pavelsavara opened this issue Oct 26, 2023 · 5 comments · Fixed by #94058
Closed
Assignees
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Oct 26, 2023

Error Blob

{
  "ErrorMessage": "Microsoft.CodeAnalysis.Operations.DynamicMemberReferenceOperation",
  "BuildRetry": false,
  "ExcludeConsoleLog": true
}

Reproduction Steps

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=451726&view=logs&j=25ff4a1f-a33e-587c-1adf-e8bafe0c741d&t=652ede7b-14bb-5de9-c266-e48d99622f63

wasm/browser target with Debug configuration
.\build.cmd -bl -os browser -subset mono+libs -c Debug

Process terminated. Assertion failed. [C:\Dev\runtime\src\mono\wasm\host\WasmAppHost.csproj]
Microsoft.CodeAnalysis.Operations.DynamicMemberReferenceOperation: C:\Dev\runtime\src\mono\wasm\host\DevServer\WebAssemblyNetDebugProxyAppBuilderExtensions.cs: (200,12)-(200,32) [C:\Dev\runtime\src\mono\wasm\host\WasmAppHost.csproj]
  at ILLink.RoslynAnalyzer.DataFlow.LocalDataFlowVisitor`2.ProcessSingleTargetAssignment(IOperation targetOperation, IAssignmentOperation operation, LocalDataFlowState`2 state, Boolean merge) in C:\Dev\runtime\src\tools\illink\src\ILLink.RoslynAnalyzer\DataFlow\LocalDataFlowVisitor.cs:line 302
  at ILLink.RoslynAnalyzer.DataFlow.LocalDataFlowVisitor`2.ProcessAssignment(IAssignmentOperation operation, LocalDataFlowState`2 state) in C:\Dev\runtime\src\tools\illink\src\ILLink.RoslynAnalyzer\DataFlow\LocalDataFlowVisitor.cs:line 326

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=451726
Error message validated: Microsoft.CodeAnalysis.Operations.DynamicMemberReferenceOperation
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 10/26/2023 10:41:20 AM UTC

Report

Build Definition Step Name Console log Pull Request
451726 dotnet/runtime Build product Log #94013

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 1 1
@pavelsavara pavelsavara added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab area-Tools-ILLink .NET linker development as well as trimming analyzers labels Oct 26, 2023
@pavelsavara pavelsavara added this to the 9.0.0 milestone Oct 26, 2023
@ghost
Copy link

ghost commented Oct 26, 2023

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

Issue Details

Error Blob

{
  "ErrorMessage": "Microsoft.CodeAnalysis.Operations.DynamicMemberReferenceOperation",
  "BuildRetry": false,
  "ExcludeConsoleLog": true
}

Reproduction Steps

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=451726&view=logs&j=25ff4a1f-a33e-587c-1adf-e8bafe0c741d&t=652ede7b-14bb-5de9-c266-e48d99622f63

wasm/browser target with Debug configuration
.\build.cmd -bl -os browser -subset mono+libs -c Debug

Process terminated. Assertion failed. [C:\Dev\runtime\src\mono\wasm\host\WasmAppHost.csproj]
Microsoft.CodeAnalysis.Operations.DynamicMemberReferenceOperation: C:\Dev\runtime\src\mono\wasm\host\DevServer\WebAssemblyNetDebugProxyAppBuilderExtensions.cs: (200,12)-(200,32) [C:\Dev\runtime\src\mono\wasm\host\WasmAppHost.csproj]
  at ILLink.RoslynAnalyzer.DataFlow.LocalDataFlowVisitor`2.ProcessSingleTargetAssignment(IOperation targetOperation, IAssignmentOperation operation, LocalDataFlowState`2 state, Boolean merge) in C:\Dev\runtime\src\tools\illink\src\ILLink.RoslynAnalyzer\DataFlow\LocalDataFlowVisitor.cs:line 302
  at ILLink.RoslynAnalyzer.DataFlow.LocalDataFlowVisitor`2.ProcessAssignment(IAssignmentOperation operation, LocalDataFlowState`2 state) in C:\Dev\runtime\src\tools\illink\src\ILLink.RoslynAnalyzer\DataFlow\LocalDataFlowVisitor.cs:line 326
Author: pavelsavara
Assignees: vitek-karas
Labels:

blocking-clean-ci, Known Build Error, area-Tools-ILLink

Milestone: 9.0.0

@JakeYallop
Copy link
Contributor

I'm running into this when trying to build the repo locally. Is there a temporary workaround for this I can use?

./build.cmd -os browser -subset mono+libs

Its a fresh clone (the only extra step I did was to sync main from dotnet/runtime).

@sbomer
Copy link
Member

sbomer commented Oct 26, 2023

@JakeYallop, can you try building with /p:ToolsConfiguration=Release?

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 26, 2023
@JakeYallop
Copy link
Contributor

That did not work unfortunately, same error as before.

@sbomer
Copy link
Member

sbomer commented Oct 26, 2023

Sigh... looks like ToolsConfiguration wasn't working due to the following typo: #94060.
If I fix that typo locally I can build with /p:ToolsConfiguration=Release (or at least get past the initial error - I'm still waiting for the build to finish).

sbomer added a commit that referenced this issue Oct 26, 2023
Fixes the assert from
#94016. #94057
tracks adding full support for this in the analyzer.

We had some existing tests that only covered
IDynamicInvocationOperation. Those have been moved to a shared
testcase (shared by ILLink/NativeAot), and some additional
testcases have been added that include coverage for
IDynamicMemberReference, which was causing the assert.

This includes the same fix for IDynamicIndexerAccessOperation.
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 26, 2023
liveans pushed a commit to liveans/dotnet-runtime that referenced this issue Nov 9, 2023
Fixes the assert from
dotnet#94016. dotnet#94057
tracks adding full support for this in the analyzer.

We had some existing tests that only covered
IDynamicInvocationOperation. Those have been moved to a shared
testcase (shared by ILLink/NativeAot), and some additional
testcases have been added that include coverage for
IDynamicMemberReference, which was causing the assert.

This includes the same fix for IDynamicIndexerAccessOperation.
@ghost ghost locked as resolved and limited conversation to collaborators Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants