runtime: Intermittent hang/deadlock in .net core 5.0.400 while debugging

Description

This is a duplicate of https://github.com/dotnet/runtime/issues/42375 as far as symptoms and behavior go but I am still encountering the exact same symptoms on 5.0.400. I can reproduce this on Mac OS and Windows.

When debugging, our dev team encounters sporadic hangs (about 30% of the time). There does not seem to be any specific reproducible pattern of when in the program execution the hang occurs. When it happens, the diagnostics logger stops updating

image

and I cannot break or terminate the program:

image image

If I try to dotnet trace collect on a hung process, dotnet trace hangs as well.

image

I have tried taking and analyzing a memory dump using wpr as described here, but I have not been able to find anything meaningful.

Configuration

Reproduced on 5.0.400 on Mac OS and Windows. In Visual Studio and Rider IDE.

Regression?

This issue seems to have started when we upgraded from netcoreapp3.1 to net5.0

Other information

The amount of logging and amount of asynchronous operations seems to make the issue more/less prevalent. For example, turning down the log level makes the issue happen about 20% of the time instead of 30% of the time.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 72 (34 by maintainers)

Most upvoted comments

hi @hoyosjs - any update on a workaround/resolution?

Ah, I see. You uploaded them to the old issue. You opened a first thread, then a second thread. I closed the older thread and redirected it to the newer one as it had more files.

For future reference, the one that is still open that I was looking at was this.

I’m downloaded them and see they have logs. I’ll check them in the next couple of days and get back to you.

I also experience this issue, usually a couple times a day, with both .NET 5 and .NET 6-rc1, across a few different apps, all ASP.NET Core apps, all on Windows.

Is there anything I can provide to help figure this out?