Skip to content

Excessive CPU and memory usage (70+ GB) when running analyzers #118121

@filipnavara

Description

@filipnavara

Version Used: .NET 9.0.6 / Roslyn 4.14.0-3.25279.5+995f12b60535afe75cafbcefada9161d8dc4f31f

Steps to Reproduce:

  1. Open the attached project in Visual Studio, start a build
  2. Observe that the VBCSCompiler process starts taking CPU time and eventually eats gigabytes of memory (70+ GB on my machine, then starts swapping and slows to crawl)
  3. The compilation never finishes

Notably, disabling analyzers in MailClient.Emoji.csproj with <RunAnalyzers>false</RunAnalyzers> workarounds the issue. We didn't experience the issue with .NET 8 SDK when the projects were targeting net8.0 TFM.

Expected Behavior: The build finishes, doesn't consume all the memory.

Actual Behavior: Build doesn't finish and eats all my memory.

Metadata

Metadata

Assignees

Labels

area-Tools-ILLink.NET linker development as well as trimming analyzers

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions