Skip to content

GC hangs indefinitely on LongRunning #115794

@cleardarkz

Description

@cleardarkz

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Sometimes when running a background worker for a lengthy period of time, it appears that the GC tries to run a collection round, suspends all threads but gets interlocked while trying to free resources

We have experienced this behavior on long running processes, usually a couple of hours or more. I will add that the codebase is using GetAwaiter.Result() extensively, however, it appears that even in this case, there should be some sort of a fallback to when the GC fails to run

I have attached a dump diagram of the latest occurrence. I will be able to provide more logs/dumps as required.

Attempting to reproduce the issue with a sample repo succeeded in behavior but the memory dumps do not look the same, therefor the sample project is not attached to the report

Expected Behavior

Resources allocation exception, process exception, any sort of an error which will resume the .NET internals

Steps To Reproduce

No response

Exceptions (if any)

No exceptions, the process hangs until manually freed (Forceful shutdown)

.NET Version

8.0.409

Anything else?

Image

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions