Debugging asynchronous scenarios in .NET
summary
Reconstructs async causality by walking runtime objects and continuations to find the actual blocking point: uses WinDbg and Visual Studio to open dumps, inspects ActionBlock internals and finds a completion task faulted with a SocketException that prevents shutdown, and uses SOSX/ref and a custom grunt extension to follow continuations back to the awaiting state machines. Shows thread‑pool starvation where synchronous Task.Wait on Task.Run/LongRunning plus global/local queue behavior inflates threads (observed ~1,466 threads) and the fix is to stop blocking on tasks.
AI-written summary · about
chapters (12)
- 0:00Start
- 3:32Debug Windows and Parallel Stack
- 4:51Check the Source Code
- 5:52The Action Block
- 14:10Retrieve the Address of the Action Block
- 14:35Get the Address of an Object
- 26:41The Source Code of the Node Object
- 30:10Print Exception
- 33:03Timer Information
- 40:48The Windows Calculator
- 43:45What Is a Task Scheduler
- 58:31Conclusion
related talks
58mBack to Basics: Efficient Async and Await
55mAsync internals in .NET
43m.NET: Asyn http client - anatomy and traps
51mAsync Internals in .NET
59mAsynchronous Programming From The Ground Up
01h 02mWriting high performance code in .NET
01h 03mThis is not the Async you are looking for
57mBack to Basics: Efficient Async and Await
