Runtime diagnosticsJVMGC & threads

Runtime Diagnostics Interview Questions

Senior backend rounds increasingly hand you evidence, not a blank editor: a heap dump, a GC log, a thread dump from a service that is leaking, pausing, or deadlocked. The skill under test is reading that evidence and finding the root cause — the object holding the heap alive, the allocation churn behind the full-GC storm, the lock order behind the deadlock. Gronex lets you practice those exact investigations on real repositories with reproducible failures, so you rehearse the round instead of memorising flags.

What runtime diagnostics interviews test

The hard part of a production incident is not writing code — it is reading what the runtime is telling you. A heap that grows while traffic is flat points to retention, not load. A service burning CPU in full collections that reclaim nothing is churning, not undersized. A stalled pool with idle CPUs is waiting on itself. These are the failures that page the on-call engineer, and they are exactly what a good interviewer probes.

Every challenge here is a real repository with a reproducible failure and a bundled verify step. You read the evidence — heap dump, GC log, or thread dump — form a hypothesis, fix the retention, contention, or allocation problem, and prove it with the tests. The scenarios run in seconds, with nothing to profile-attach or stand up.

Common patterns in runtime diagnostics rounds

Heap dumps & retention

Reading a heap dump to find the dominator holding memory alive — the difference between a leak and a workload, and where the retained set actually lives.

GC log analysis

Interpreting pause times, allocation rate, promotion, and reclaim ratio from GC logs to tell churn apart from a genuine leak.

Thread dumps & deadlocks

Reading a thread dump to spot a lock-ordering deadlock, a lost wakeup, or a starved pool, then fixing the ordering or handoff.

Lock contention & starvation

Finding coarse locks and nested-task pool starvation that stall throughput, and narrowing the critical section without breaking correctness.

Allocation profiling

Locating hot-path allocations and premature promotion that inflate GC pressure, and reducing them without losing safety guarantees.

Off-heap & native memory

Tracking direct-buffer churn, finalizer/cleaner backlogs, and classloader leaks that never show up in on-heap counters.

Problems to practice

Each is a real repository with a reproducible failure and a failing test suite. Open the brief and fix it — no signup required to read the full problem.

Off-Heap Buffer Churn Full GC Storm

A messaging gateway spends 92% of wall-clock in full collections that reclaim almost nothing. Read the GC logs, find the churn, and stop the storm.

Open the challenge →

Unbounded Cache Heap Exhaustion

A freight pricing service exhausts its heap hours after every restart while reporting healthy hit rates. Bound the cache and prove retention drops.

Open the challenge →

Thread-Local Retention in Pooled Workers

A payment pipeline on a fixed worker pool keeps growing its heap even when idle. Trace the per-request state pinned to pooled threads.

Open the challenge →

Event Listener Registration Leak

A collaboration server's change bus grows between restarts though active sessions stay flat. Find the listeners that register but never unregister.

Open the challenge →

Classloader Leak on Rule-Bundle Reload

A risk-scoring service hot-reloads rule bundles; every generation ever loaded stays reachable. Release the old classloader on reload.

Open the challenge →

Lock-Ordering Deadlock in Transfer Path

A ledger service deadlocks when concurrent transfers move value in opposite directions. Read the thread dump and impose a stable lock order.

Open the challenge →

Thread-Pool Starvation from Nested Tasks

A batch enrichment service stalls under load: the pool is fully occupied by tasks waiting on tasks it can never schedule. Break the dependency.

Open the challenge →

Missed Signal / Lost Wakeup in a Handoff Queue

An ingestion pipeline never finishes shutting down — consumers park on a condition that already fired. Close the lost-wakeup window.

Open the challenge →

Allocation Rate Explosion in a Hot Path

A telemetry enrichment stage allocates a defensive copy on every event, driving young-GC pressure. Cut the allocation rate without losing safety.

Open the challenge →

Premature Promotion & Survivor Overflow

A nightly rollup retains every intermediate value before reducing, overflowing survivor space and promoting garbage to old gen. Reduce as you go.

Open the challenge →

Practise on real failures

Open a real repository, read the heap dump, GC log, or thread dump, and make the failing tests pass. The retention, GC, deadlock, and allocation skills you build here are exactly what runtime diagnostics interviews probe.