This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
Category: Incident Triage
CD0043 Memory Creep Triage
This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
CD0033 P99 Latency Triage
This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
CD0028 Stale Index Triage
This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
CD0023 GPU Stall Triage
This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
CD0018 Slow Pipeline Triage
Mode C · Incident Triage 30 Min Spark SQL · Delta Lake 5 Telemetry CluesA data-ML team on Databricks runs a nightly job,
nightly_features, that builds the per-user training table for a churn model: it joinsfeature_store.events(2.0 billion rows over a 28-day window, a streaming-ingested Delta table) tofeature_store.users(40 million rows) onuser_idand aggregates per user. What lands on your desk is not a whiteboard prompt but an incident ticket.Incident Ticket INC-4471: The job took 8m 04s on 2024-05-02 and 41m 12s last night (2024-05-23). The training table now lands after the 03:00 deadline. There have been no commits to the job since 2024-04-11 and no new columns, and the cluster is unchanged at 40 executors with 4 cores each. The on-call engineer proposes doubling the cluster to 80 executors tonight.
Walk through your 30-minute diagnostic tree before anyone touches hardware. Name the candidate causes (data growth, join-key skew, stale or refreshed statistics, file-layout decay) and say what each one predicts. Then inspect the 5 clues below in order, isolate the compound root cause, and specify the fix plus a regression guard. An optional Patch Lab in the workspace asks you to implement four small stabilization helpers against hidden checks.
Job Query (Unchanged Since 2024-04-11):
SELECT e.user_id, u.segment, COUNT(*) AS n_events, SUM(e.dwell_ms) AS dwell_ms_sum FROM feature_store.events e JOIN feature_store.users u ON e.user_id = u.user_id JOIN feature_store.training_event_types t ON e.event_type = t.event_type WHERE t.is_training = true AND e.event_date >= date_sub(current_date(), 28) GROUP BY e.user_id, u.segment
Figure 1: Nightly runtime of
nightly_featuresover the 22 nights since its last 8-minute run. Code, schema, and cluster size were unchanged across the whole window.Incident Telemetry: 5 Clues (Inspect In Order)#1Clue #1: EXPLAIN Plan, Night 0 vs Night 21
-- job run 2024-05-02 02:00, 8m 04s, plan hash 7f3a91 HashAggregate(keys=[user_id#40, segment#90], functions=[count(1), sum(dwell_ms#43)]) +- SortMergeJoin [user_id#40], [user_id#88], Inner :- Exchange hashpartitioning(user_id#40, 2000) : +- BroadcastHashJoin [event_type#41], [event_type#70], Inner, BuildRight : :- FileScan parquet feature_store.events[user_id#40,event_type#41,dwell_ms#43,event_date#44] DataFilters: [isnotnull(user_id#40), dynamicpruningexpression(event_type#41 IN dynamicpruning#912)], PartitionFilters: [(event_date#44 >= 2024-04-04)] : +- BroadcastExchange HashedRelationBroadcastMode : +- Filter (is_training#71 = true) : +- FileScan parquet feature_store.training_event_types[event_type#70,is_training#71] +- Exchange hashpartitioning(user_id#88, 2000) +- FileScan parquet feature_store.users[user_id#88,segment#90] -- job run 2024-05-23 02:00, 41m 12s, plan hash c19e04 HashAggregate(keys=[user_id#40, segment#90], functions=[count(1), sum(dwell_ms#43)]) +- BroadcastHashJoin [event_type#41], [event_type#70], Inner, BuildRight :- SortMergeJoin [user_id#40], [user_id#88], Inner : :- Exchange hashpartitioning(user_id#40, 2000) : : +- FileScan parquet feature_store.events[user_id#40,event_type#41,dwell_ms#43,event_date#44] DataFilters: [isnotnull(user_id#40), isnotnull(event_type#41)], PartitionFilters: [(event_date#44 >= 2024-04-25)] : +- Exchange hashpartitioning(user_id#88, 2000) : +- FileScan parquet feature_store.users[user_id#88,segment#90] +- BroadcastExchange HashedRelationBroadcastMode +- Filter (is_training#71 = true) +- FileScan parquet feature_store.training_event_types[event_type#70,is_training#71] -- plan hash history: 7f3a91 (05-02 .. 05-09), c19e04 (05-10 .. 05-23) -- catalog audit: 2024-05-09 03:10 ANALYZE TABLE feature_store.users COMPUTE STATISTICS FOR ALL COLUMNS (auto-maintenance) -- git log jobs/nightly_features: last commit 2024-04-11Your read: What differs between the two plans, and does anything in the catalog line up with the night the plan hash changed?
#2Clue #2: Per-Task Time Histogram, Stage 14
Stage 14: SortMergeJoin + HashAggregate, run 2024-05-23 tasks 2000 wall 22m 05s task duration min 9s p25 14s median 18s p75 22s p90 27s p99 720s max 1290s shuffle read median 312 MB p99 7.1 GB max 9.8 GB (task 1377) spill (disk) median 0 B p99 18 GB max 41 GB (task 1377) executor timeline: 40 of 40 busy until 6m 10s, 12 of 40 busy at 10m 00s, 1 of 40 busy from 13m 40s until 22m 05s AQE: skewed partitions split = 0, coalesced partitions = 0 Stage 14 on 2024-05-02: wall 4m 01s, median 7s, p99 11s, max 14sYour read: How does the slowest task compare with the median one, and how busy is the cluster for most of this stage?
#3Clue #3: Table Growth Metrics
metric 2024-05-02 2024-05-23 ratio events rows (28-day window) 0.67 B 2.00 B 2.99x source = consumer_app 0.67 B 0.79 B 1.18x source = partner_api 0 B 1.21 B new (onboarded 2024-05-03) events distinct user_id 8.1 M 12.0 M 1.48x events bytes on disk 63 GB 186 GB 2.95x events columns 14 14 +0 users rows 39.2 M 40.0 M 1.02x cluster 40 x 4 cores 40 x 4 cores unchanged
Your read: If runtime tracked row count alone, what would last night have cost, and along which dimension did the table actually grow?
#4Clue #4: Join-Key Cardinality Distribution
user_id share of events rows (window ending 2024-05-23) band keys rows share top 8 8 190 M 9.5% top 0.01% 1,200 360 M 18.0% top 1% 120,000 610 M 30.5% remaining 99% 11.88 M 1.39 B 69.5% hottest key: user_id 90000017 (partner-ingest-svc-01): 31 M rows event_type mix, top 1,200 keys: api_heartbeat 70%, view 21%, click 8%, purchase 1% event_type mix, all rows: api_heartbeat 31%, view 46%, click 19%, purchase 3%, add_to_cart 1% training_event_types where is_training: view, click, purchase, add_to_cart
Your read: How many rows does the hottest key send to a single task, and how much of that volume does the query’s output actually use?
#5Clue #5: Small-File Count and Table Maintenance
DESCRIBE DETAIL feature_store.events numFiles 60,412 sizeInBytes 186 GB avg 3.1 MB per file (2024-05-02: numFiles 1,210, avg 53 MB per file) DESCRIBE HISTORY feature_store.events, last 21 days STREAMING UPDATE 30,240 commits writer partner_api_ingest, trigger 60 s WRITE (batch) 21 commits writer consumer_app_daily OPTIMIZE 0 commits last OPTIMIZE 2024-04-30 Jobs: events_optimize_weekly runs 2024-05-07, 2024-05-14, 2024-05-21: SKIPPED (cluster policy "maint-v1" not found) Driver log, stage 0 (file listing + footer reads): 6m 20s (2024-05-02: 31s)
Your read: What does the file layout cost before a single row is joined, and why did nothing correct it?
Incident Triage Workspace: Switch to the split-screen workspace to inspect the raw telemetry in the triage console and, optionally, write the stabilization patch in the sandbox.
Progressive Hints (Free · Zero Spoilers)1Inspection Checklist (Where to Look)
(1) Plan Contract: Compare a fast night’s physical plan with a slow night’s, operator by operator, and note where every filter sits relative to the first shuffle.
(2) Stage Critical Path: A stage finishes when its slowest task finishes, so compare the task-time tail with the median before reasoning about cluster size.
(3) Growth Accounting: Turn the row-count ratio into a predicted runtime and treat any gap between prediction and observation as a separate cause to explain.
(4) Key Distribution: A hash shuffle sends every row of one key to one task, so check what share of rows the heaviest keys hold.
(5) File Layout: Check files per gigabyte and whether the table maintenance that should bound it actually ran.2Visual Review Map (Figure 2)

Figure 2: Each clue inspects one stage of the pipeline. Every box carries the same “?” marker: decide what each clue shows before reading the answer.
3Interviewer Nudge (Per Clue)
Answer each Socratic check from the raw telemetry before naming a root cause:
Clue #1 (Plan Diff): On the events side, which operators sit below theExchangeon night 0 and which sit below it on night 21, and what ran in the catalog a few hours before the firstc19e04run?Clue #2 (Task Tail): If stage wall time equals the slowest task, how much would doubling executors shorten a stage whose slowest task runs 1,290 s on a single core?Clue #3 (Growth Budget): If runtime scaled linearly with rows, what would 2.99x the night-0 runtime be, and how many minutes of the observed 41 remain unexplained?Clue #4 (Key Shares): How many rows doesuser_id 90000017send to one task compared with the roughly 1.0M rows of a median task, and which of its event types does the query actually keep?Clue #5 (File Tax): At 3.1 MB per file, how many files does a 186 GB scan open, and what per-file fixed cost on 160 cores turns that count into minutes?+Patch Lab Nudges (Optional Sandbox)
The Patch Sandbox is optional, and the protected walkthrough carries the full verified patch. Pin each helper’s contract before writing code:
Blank 1 (Key Share Threshold): With 12.0M distinct keys, at most how many keys can exceed a share of 1e-4, and should a key sitting exactly at the threshold be included?Blank 2 (Events-Side Key): Readdim_join_keysfirst: for every events row, which single string must you emit so that it matches exactly one users-side key?Blank 3 (File Packing): When the next small file would push the open bin pasttarget_mb, do you close the bin before or after appending it, and what happens to a 200 MB file in the middle of the list?Blank 4 (Guard Rules): Why does the runtime rule divide byrows_b, and which of the four rules should stay silent on a night where the data simply tripled under a healthy plan?Answer
Login to view more contentCD0017 Log Forensics Triage
This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
CD0005 Pretraining NaN Loss Spike Triage
Mode C · Incident Triage 30 Min 256x H100 · FSDP · BF16 5 Telemetry CluesGoogle DeepMind’s training infrastructure team owns the reliability of hundred-GPU pretraining runs, where a single NaN spike can cost a day of cluster time. In an ML infrastructure debugging interview styled on that postmortem work, you are on call for a 7B-parameter Transformer pretraining run on 256 H100 GPUs. The run uses BF16 mixed precision, FSDP, and FlashAttention-2. Training is smooth for 14,200 steps and the loss reaches 2.18. At step 14,203 the training loss spikes to 19.4, and at step 14,204 it turns into
NaN.Two experiments are already done. Rolling back to the step-14,000 checkpoint and resuming with the exact same configuration reproduces the spike at exactly step 14,203. Skipping data steps 14,200–14,205 delays the crash by only 60 steps before another spike occurs. Every hour spent debating leaves the full cluster idle.
Walk through your 30-minute incident triage. Formulate the candidate root-cause buckets: a corrupted data shard, BF16 attention logit or activation overflow, optimizer second-moment underflow, or a hardware bit-flip. Then inspect the five diagnostic telemetry clues in order, isolate the combined root cause, and specify the exact code and configuration fixes plus automated regression guards.

Figure 1: the spike lands on the same step after a rollback, and it returns 60 steps after the suspect batches are skipped. Something in the run is primed to fail, and something in the data pulls the trigger.
Available Telemetry Clues (Inspect & Rank Before Opening the Answer):
Clue #1: Deterministic Replay & Hardware ECC CheckFalsifies: Hardware bit-flip
Triage question before viewing the log: Given that rolling back to step 14,000 reproduces the spike at the exact same step 14,203, what would a replay on a disjoint node pool plus ECC/Xid counters confirm or rule out in under five minutes?
Clue #2: Data Shard Inspection at Step 14,203Falsifies: Sole data corruption
Triage question: Skipping batches 14,200-14,205 still crashed 60 steps later. When you decode token statistics at step 14,203 and step 14,263, what pattern distinguishes a trigger batch from a corrupted shard?
Clue #3: Per-Layer Activation & QK Logit Max-Norm TelemetryTests: Forward BF16 numerics
Triage question: BF16 has FP32’s exponent range (
) yet only 8 significant bits. Which forward quantity can grow silently over 4,000 steps and destroy softmax resolution without overflowing?
Clue #4: Optimizer State Inspection (Dtype,
, Clipping)Tests: Update amplification
Triage question: Why would a single spiky batch turn the very next step into
NaNinstead of a recoverable bump? Check what happens to AdamW’s second momentwhen stored in BF16 with
.
Clue #5: Stabilization Patch Replay & AblationsVerifies: Combined root cause
Triage question: From which checkpoint step must you replay an architectural norm change so existing attention heads do not suffer a sudden distribution shock?
Incident Triage War-Room: Open the split-screen triage console to inspect raw cluster telemetry, verify your 5-clue causal chain, and test your QK-Norm stabilization patch.
Progressive Hints (Free · Zero Spoilers)1Inspection Checklist (Where to Look)
(1) Hardware & Determinism: Random bit-flips do not fire on the identical step across replays; verify node independence and ECC counters first.
(2) Trigger vs Vulnerability: A crash that returns 60 steps after skipping suspect batches proves the batch is only a trigger acting on a primed model state.
(3) BF16 Resolution vs Range: Track per-layer QK logit maxima; BF16 loses unit precision long before it overflows.
(4) Optimizer Amplification: Check moment buffer dtypes,spike ceiling, gradient clipping, and update-to-weight ratios.
2Visual Review Map (Figure 2)

Figure 2: The triage map. The final diagnosis must explain every symptom, and each candidate bucket has one telemetry clue that can falsify it.
3Interviewer Nudge (Quantitative Triage Prompts)
Use these four quantitative back-of-the-envelope checks while classifying Clues #1-#5 in the Incident Console:
1. Cheap Falsification First (Clues #1 & #2): Random SRAM/network bit-flips do not repeat at the exact step 14,203 on disjoint GPUs, and a sole bad-shard bug would not crash again 60 steps after skipping steps 14,200-14,205. Distinguish a trigger from an underlying primed state.2. BF16 ULP Spacing at 68,400 (Clue #3): BF16 has 7 explicit mantissa bits, so near65,536its unit-in-last-place step is2^16 * 2^-7 = 512. Even though68,400is nowhere near3.4e38overflow, rounding Q/K jitters logits by hundreds and collapses softmax to one-hot.3. Frozen Second Moments & the 3.16x Ceiling (Clue #4): Multiplying a BF16v_tbybeta2 = 0.999decays it by0.1%, which is smaller than half a BF16 ULP (~0.39%) and rounds away to zero! When one huge gradient hits a frozenv_t, compute the single-step Adam bound(1 - beta1) / sqrt(1 - beta2)at0.999vs0.95.4. Checkpoint Scale Matching (Clue #5): Per-head QK-Norm with gain1.6andd = 128caps logits nearsqrt(128) * 1.6^2 ~ 29. Compare that target scale againstckpt_10000(28.1) versusckpt_14000(61,200) to avoid distribution shock on resume.+Patch Lab Nudges (Optional Coding Step) for the Stabilization Patch Sandbox
These map onto the
patch_starterskeleton in the workbench: each chip jumps to the blank's region in the Patch Sandbox editor:Blank 1 (QK-Norm Modules): Every query and key head needs its ownnn.RMSNorm(self.d, eps=1e-6)with weight initialized toqk_gain_init. Why per-head rather than one shared norm, and what does the gain scale vs the eps stabilize?Blank 2 (Normalize + Causal SDPA):F.normalize(t, p=2, dim=-1)acts on the LAST axis before transposing to(B, H, T, D). Which argument toF.scaled_dot_product_attentionreplaces the manual causal mask, and does SDPA wantis_causal=Trueduring decode?Blank 3 (FP32 Optimizer): Assertp.dtype == torch.float32, then split weight decay by tensor rank (0.1fordim >= 2,0.0below). From Clue #4's ULP math, why doesbetas=(0.9, 0.95)keep second moments alive in BF16?Blank 4 (Guarded Step):clip_grad_norm_returns the pre-clip total norm; gateopt.step()ontorch.isfinite(norm)so anInf/NaNbatch is skipped, thenzero_grad(set_to_none=True). What breaks if you clip-then-step unconditionally?Blank 5 (Stable Z-Loss): Neverexp()the logits directly:torch.logsumexp(logits, dim=-1)computes log Z in the log domain. Returnce + z_coef * log_z.pow(2).mean(): what does the quadratic penalty do to a +1000-logit tail?Answer
Login to view more content