Wiki: Clarizen adventures with the wild GC in the holiday season

For agents: Markdown version · Wiki index · Explore

Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

Summary

The speaker shares a debugging adventure involving severe performance degradation and high Garbage Collection times during the holiday season in a large .NET enterprise system. Despite monitoring CPU and metrics, the team struggled to find the root cause of long request times and freezing background jobs. After deep investigation into crash dumps and source code, they discovered that an antivirus DLL was injecting code at runtime and causing a heap corruption. Removing the antivirus completely resolved the issue, highlighting the importance of deep diagnostic tools and unexpected external interference.

Key points

  • 2:15 The CEO reported extremely slow dashboard loading times during the holiday season while monitoring tools showed normal system behavior.
  • 4:20 Log analysis revealed that specific jobs were taking close to 13 minutes to complete while others finished normally.
  • 5:22 Metric analysis showed high processor queue lengths and that the CPU was spending nearly 100% of its time on Garbage Collection.
  • 7:23 The .NET Garbage Collection mechanism normally handles short-lived objects quickly in Generation 0, but older generations were causing massive pauses.
  • 9:27 Consulting an expert and using profiling tools like PerfView showed abnormal pause times and behaviors in Generation 0 collections.
  • 11:34 Analyzing a server crash dump revealed thread deadlocks in the GC marking phase, pointing to a heap corruption caused by an antivirus DLL.
  • 12:38 Completely removing the antivirus software from the affected machine immediately resolved the GC performance issue.

Takeaways

  • Invest in robust application monitoring and alerting to quickly detect anomalies like unexpected Garbage Collection spikes.
  • Do not overlook external software like antivirus tools when investigating low-level runtime issues and memory corruption.
  • Empower developers with advanced diagnostic skills and automated dump analysis tools to speed up root-cause investigation.

Questions this talk answers

  • How do you diagnose high Garbage Collection overhead and CPU time in a .NET application?
  • What steps should you take when standard monitoring tools fail to explain a major production slowdown?
  • How can external software like antivirus programs interfere with application memory and runtime behavior?

Technologies

.NET, Kibana, PerfView

Tags

debugging, dotnet, garbage collection, memory management, monitoring, performance tuning