377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
Deadlocks, race conditions, ThreadPool starvation, async-over-sync, sync-over-async, blocking in ASP.NET Core, unbounded concurrency and backpressure.
Deadlock conditions, lock-ordering and async deadlocks, diagnosis with dotnet-dump (syncblk, clrstack, parallelstacks, dumpasync) and prevention.
Check-then-act and read-modify-write races, non-thread-safe collections, async interleaving, lost updates in databases, and detection and fixes.
Starvation symptoms, Kestrel heartbeat warnings, dotnet-counters and dotnet-trace evidence, dump analysis, root causes and short- versus long-term fixes.
Fake async wrappers, why they do not scale on servers, when offloading is right (UI responsiveness), and how to integrate blocking legacy SDKs safely.
Blocking on tasks with .Result, .Wait and GetResult; hidden places such as constructors, DI factories, Dispose and sync interfaces; async initialisation patterns and safe boundaries.
Synchronous I/O and AllowSynchronousIO, EF Core sync APIs, HttpClient.Send, Thread.Sleep, long locks, heavy synchronous logging; detection with analysers, traces and load tests.
Unbounded Task.WhenAll, Task.Run per request, unlimited queues and connections; Little's law; limits with SemaphoreSlim, Parallel.ForEachAsync, bounded channels, rate limiting middleware and bulkheads.
Backpressure strategies (block, buffer, drop, reject), bounded channels, pull-based streams, broker prefetch and concurrency settings, HTTP 429/503 with Retry-After, and metrics.