Skip to content

Application freezes during GC  #108144

Open
Open
@FlorianRoudautOrchestrade

Description

Description

One of our Winforms applications, with workstation gc, randomly freezes. The application is running on laptops and doing multithreaded (around 24 or 32 threads) calculations that involves a high memory allocation and deallocation.

Freezes could happens 2 or 3 times a day. The desktop application is running almost 24/7 on the user machine. Ona a usual cycle, we can see with DotMemory that around 35% of the time is spent in GC.

During the freeze we see in the Task Manager that the application is taking around 5GB, while total used is around 40GBand the machine has 64GB available. The Task Manager also shows CPU activity (around 4% on a machine with 24 virtual CPUs).

We have taken dumps and used various tools. Every tool indicates that the process is stuck in a GC cycle. We can analyze the dump using dotnet-dump and the output of clrstack -all is in the file attached.

clrstack.txt

Reproduction Steps

No controlled reproduction available.

Expected behavior

We expect the Garbage colletion to continue and not freeze the application.

Actual behavior

The application is unresponsive

Regression?

No response

Known Workarounds

We are decreasing the number of threads launched. With 8 threads, the freeze happens much less often.

Configuration

.NET Runtime 8.0.8
Windows 11
x64

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-GC-coreclrtracking-external-issueThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directly

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions