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

Analyzer 'Microsoft.Interop.Analyzers.CustomMarshallerAttributeAnalyzer' threw an exception of type 'System.InvalidProgramException #106904

Closed
omajid opened this issue Aug 14, 2024 · 4 comments

Comments

@omajid
Copy link
Member

omajid commented Aug 14, 2024

Analyzer

Diagnostic ID: AD0001

Analyzer source

SDK: Built-in CA analyzers in .NET 5 SDK or later

Version: 9.0.100-preview.7.24380.2

Describe the bug

When building the .NET 9 Preview 7 tag using the VMR on RHEL 9 on arm64, I got this error:

CSC : error AD0001: Analyzer 'Microsoft.Interop.Analyzers.CustomMarshallerAttributeAnalyzer' threw an exception of type 'Syst       em.InvalidProgramException' with message 'Common Language Runtime detected an invalid program.'. [/builddir/build/BUILD/dotnet-v9.0.0-preview.7.24405.7-x64-bootstrap/src/sdk/src/BlazorWasmSdk/Tasks/Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.csproj::TargetFramework=net9.0]

This seems to be a random error. It doesn't happen on all arm64 platforms, or on all builds.

Steps To Reproduce

Provide the steps to reproduce the behavior:

  1. git clone https://github.com/dotnet/dotnet
  2. git checkout v9.0.0-preview.7.24405.7
  3. ./prep-source-build.sh
  4. ./build.sh --source-only /p:OfficialBuilder=CentOS /p:MinimalConsoleLogOutput=false /p:ContinueOnPrebuiltBaselineError=true /v:n /p:LogVerbosity=n
  5. Get this error, randomly

Expected behavior

The VMR builds, just like it does most of the time

Actual behavior

This error makes the VMR build fail

Additional context

@buyaa-n
Copy link
Contributor

buyaa-n commented Aug 23, 2024

Moving to runtime as CustomMarshallerAttributeAnalyzer lives there

@buyaa-n buyaa-n transferred this issue from dotnet/roslyn-analyzers Aug 23, 2024
@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 Aug 23, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Aug 23, 2024
@buyaa-n buyaa-n added area-System.Runtime.InteropServices and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 23, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky
Copy link
Member

There's no reason for the analyzer to be throwing an InvalidProgramException as it's just regular C#.

I wouldn't be surprised if the underlying issue for dotnet/dnceng#3305 was related.

@agocke
Copy link
Member

agocke commented Sep 11, 2024

Agreed, marking this as dup of dotnet/dnceng#3305

@agocke agocke closed this as completed Sep 11, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Sep 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

4 participants