07 / the gate

The release had been two hours from shipping for two hours.

[ALERT] INC-0007 — Release gate blocked, no progress 2h11m
[INFO ] gate task priority: P0
[INFO ] gate task state: BLOCKED on m-db
[INFO ] m-db holder: running
[INFO ] m-db holder: preempted
[INFO ] m-db holder: running
[INFO ] m-db holder: preempted
[WARN ] m-db held 2h11m, longest hold in 90d: 40ms

Nothing was deadlocked. The holder of m-db was alive and scheduled and making forward progress in slices too short to finish anything.

Bob read the log over Andy’s shoulder for about four seconds.

“Your highest-priority task is waiting on your lowest-priority task.”

“That’s backwards.”

“That’s the name.” He pulled up a chair, which meant this was going to take a while. “P0 needs the lock. Something small and unimportant has it. And something in the middle — busy, harmless, correctly configured — keeps knocking the small thing off the CPU before it can let go. Every one of the three is behaving exactly as designed.”

Andy looked at the task table. Four tasks, four priorities, four mutexes, and one line in the incident header telling him where the wait edge pointed.

“So I find who holds m-db.”

“And what priority they’re at,” Bob said. “That’s the part you’re going to want to write down.”

evidence retained
  1. The task running at P1 holds m-tmp.
  2. m-log is not held by the P0 task.
  3. t-render holds m-io.
  4. t-audit does not run at P3.
  5. Whatever holds m-log, it is not running at P3.
  6. t-billing runs at P1.
  7. The P0 task does not hold m-db — it is waiting on it.
messages bob
Bob 16:40

Four of everything now. The board is bigger but the rules haven't changed: one priority and one mutex per task.

Bob 16:41

Left columns are tasks and priorities. Rows are mutexes and priorities.

Bob 16:43

The header already tells you the gate is blocked on m-db. So the answer is whoever is holding it.

Bob 16:44

Format: task, priority, holds.

table scheduler classes

fault

Release gate blocked

wait edge

P0 → m-db

severity

SEV-1

Skip the grid, go to the answer
t-audit t-render t-billing t-gc P0 P1 P2 P3
m-io
m-db
m-log
m-tmp
P0
P1
P2
P3
answer input incident response

Question: Which task holds the mutex the release gate is waiting on — task, priority, and the mutex it holds?