Skip to content

systems

A client holds a connection, and its peer goes silent. When does the client know? This site computes the answer, and then it measures the answer.

Linux 6.6 has default settings for each TCP timer. With these settings, an idle connection learns of a black hole after 2 h 11 min 15 s. A connection with a request in flight learns after 924.6 s. A connection to a frozen process does not learn of the failure at the TCP level.

The lab below computes these times from the rules of the kernel. Select a harness cell to see the runs that the harness measured. Change a setting to see the new prediction.

When does the client know?
Kernel clock HZ 250
First detector
keepalive
Closed form
11 s
Lands in
10.996 s to 11.352 s
Measured
11.054 s to 11.269 s

Keepalive tells the client after 11 s, at most 352 ms late.

  • Prediction
  • Keepalive probes
  • Measured runs

The whole timeline

The prediction: 10.996 s to 11.352 sclosed formKeepalive probe 1: 5 sKeepalive probe 2: 7 sKeepalive probe 3: 9 sRun 1, environment 1: 11.156 sRun 2, environment 1: 11.132 sRun 3, environment 1: 11.269 sRun 4, environment 1: 11.192 sRun 5, environment 1: 11.188 sRun 6, environment 1: 11.14 sRun 7, environment 2: 11.062 sRun 8, environment 2: 11.054 sRun 9, environment 2: 11.172 sRun 10, environment 2: 11.235 sRun 11, environment 2: 11.156 s0 s5 s10 s

Near the prediction

The prediction: 10.996 s to 11.352 sclosed formRun 1, environment 1: 11.156 sRun 2, environment 1: 11.132 sRun 3, environment 1: 11.269 sRun 4, environment 1: 11.192 sRun 5, environment 1: 11.188 sRun 6, environment 1: 11.14 sRun 7, environment 2: 11.062 sRun 8, environment 2: 11.054 sRun 9, environment 2: 11.172 sRun 10, environment 2: 11.235 sRun 11, environment 2: 11.156 s11 s11.1 s11.2 s11.3 s11.4 s

A corpus

Each fact about a system is a claim. A claim has a unit, the conditions where it is true, its sources and its grade of evidence.

An algebra

The algebra reads the state machines and the settings. It gives each timer a closed form, and a band for how late the timer fires.

A harness

The harness starts each cell in fresh containers. It injects a fault, measures the result on one clock, and compares the result with the prediction.

A prober

The prober is an eBPF program. It records what the kernel does to each socket, to the nanosecond.