Thread Stacks: OOM Context & Local Variable Leaks
Analyzing thread stacks within a heap dump helps understand what threads were active during an OOM, linking memory-holding objects to specific code paths or thread-local variables.
The top 3
- Top 3 Local Variable Leak Patterns in OOM: Identifies the most frequent coding anti-patterns (e.g., unclosed resources in loops, large objects in method scopes, excessive recursion without base cases) that cause local variable memory accumulation, leading to OutOfMemory errors visible in thread dumps.
- Essential Thread Stack Data for OOM Diagnosis: Pinpoints the critical elements within a thread stack (e.g., thread state, stack depth, method arguments, specific library calls, and object hash codes) that provide direct clues to the OutOfMemory context and potential memory culprits beyond the heap.
- Correlating Thread Stacks & Heap Dumps for OOM: Explains effective techniques to combine thread stack analysis (e.g., identifying active threads, method calls, lock contention) with heap dump inspection (e.g., object graph, GC roots) to precisely locate the source of memory leaks, especially those involving local variables.
Sources
Open the full topic