01.3.3 · Skill in Problem identification

Root-cause analysis

Tracing a symptom back to the underlying cause before solving it.

Root-cause analysis keeps asking why until you reach something you can change. Methods include the five whys and fishbone diagrams. Engineers already do this with bugs, and the same habit applied to user problems stops a team from building patches on top of patches.

Your status · Root-cause analysis

Saved in this browser. Sign in to keep it on every device.It colours this skill's tile on your map.

Why it matters for a product engineer

A fix at the symptom lets the problem come back in another form. Engineers already trace bugs to their cause. The same habit, applied to user problems, stops a team from building patches on top of patches. It also points the fix at something the team can change, such as a process, a default or a missing owner, and not at a person.

How to do it

  1. State the problem as an observed fact, with its size: “the site was down for 18 hours”.
  2. Ask why, and answer only with facts you can show. Mark a guess as a guess.
  3. Keep asking until you reach something the team can change, usually a process. Five is a habit, not a rule.
  4. When a problem has two parts, split it and follow each part.
  5. Write a fix for each cause, with an owner, and check later that the symptom has stopped.

Common mistakes

  • Stopping at a symptom, or at “human error”.
  • Looking for one root cause when there are several.
  • Finding only the causes the people in the room already know. Bring the people who were there, and the data.
  • Results that depend on who asks. Different people often find different causes for the same problem.

Example

After its database outage in January 2017, GitLab published a five-whys analysis. It split the incident into two problems: why the site was down, and why restoring it took so long. The first chain did not end at the engineer who deleted the data. It ended at the tool for abuse reports. The second ended at “there was no ownership”: nobody was responsible for testing the backups.

Flow

GitLab's first chain of whys

The problemWhy?Why?Why?Site downAbout 18 hoursData deletedOn the primary, bymistakeReplicationStopped by a loadspikeLoad spikeSpam, and a userremovalAbuse reportsA troll flagged anemployeeThe problemWhy?Why?Why?Site downAbout 18 hoursData deletedOn the primary, bymistakeReplicationStopped by a load spikeLoad spikeSpam, and a user removalAbuse reportsA troll flagged anemployee

The chain ends at a product process: the abuse tool made it too easy to overlook the details of a report. A fix there stops the next removal by mistake.

ReportedGitLab's postmortem, 10 Feb 2017

Sources: Five whys (Wikipedia) ↗ · Postmortem of database outage of January 31 (GitLab) ↗

Resources

1
  • articleStart here
    Five whys ↗
    Wikipedia · 9 min

    The technique, its origin at Toyota, and the honest criticism of where it falls short.