Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint lesson: diagnose the broken service

โญโญโญ advancedโณ 14 min read๐Ÿ“ Lesson 230 of 265

A worked diagnosis: from symptom to root cause through evidence, not guessing.

Checkpoint lesson: diagnose the broken service

A worked diagnosis in five moves โ€” the pattern this course keeps returning to:

Symptom: "The job pipeline hangs after a few hours; restart fixes it."

Move 1 โ€” characterize. Hang โ‰  crash: threads parked, CPU ~0. Memory steady or climbing slowly. That profile already excludes CPU-bound livelock and pure OOM.

Move 2 โ€” timeline. Structured logs: what changed just before the first hang? Correlation IDs show the last completed job and the first incomplete one. The boundary is the evidence window.

Move 3 โ€” hypothesis. Parked threads + bounded channels: the classic is a stage whose consumer died while its writer still accepts โ€” the channel's backpressure then wedges every upstream writer. Prediction: logs show producers' last entry, consumers' last entry hours earlier; thread dumps would show ReadAsync/WriteAsync continuations parked.

Move 4 โ€” smallest experiment. Reproduce at small scale: a consumer that faults mid-run (the checkpoint's channel-drain challenge is exactly this shape) and observe whether writers wedge. Confirm the mechanism, not the incident.

Move 5 โ€” fix the protocol. The bug is not "a consumer crashed" โ€” it is "the pipeline has no rule for a dead consumer." The fix: fault the channel on consumer death (Complete(ex)) so producers fail fast, plus a liveness signal per stage. The incident was one instance of a design gap; the fix closes the gap, not the instance.

Every step is what the course's challenges force you to practice: read evidence, form a prediction, run the smallest test, fix the protocol.