A job's disk grow is answered too late (the ask waits on a scheduling pass, 5 s timeouts): 18 jobs ended disk_full in 24 h and ran twice #43

Open
opened 2026-10-30 00:23:57 +00:00 by xemmerling · 0 comments
Owner

What happened in prod (t.tilo.so, 2026-10-30)

Session cargo drivers ended disk_full twice in 15 min (#41), each a full rerun, on nodes with terabytes free. #41 widens the driver's disk room; but a job that still outgrows its booking always dies, because nothing ever grows it.

Root cause

The server handles disk grows — State::grow (src/sched/state.rs ≈ 643) grants Grow.disk against the node's free disk and counts t_sched_grow_total{what="disk"} — but no node ever asks: every Grow built in src/node sets disk: None (src/node/worker.rs ≈ 851 grow_loop, memory only; ≈ 879/901 SlotServer::grow/grow_on, memory and tokens). The sampler (src/node/run.rs sampler) reads storage.written(dir) into each sample but compares only memory against memory_high(limit); the job's quota is fixed at launch (store.storage.limit(…, disk_quota(spec.disk)), run.rs ≈ 1069). A job past its quota ends disk_full and reruns booked higher (jobs/mod.rs ≈ 485).

What should happen

As a job's written bytes near its disk quota (e.g. past seven eighths), its node asks to grow its disk like memory (Grow { disk: Some(…) }), raises the project quota when granted, and only a job the node can't grow ends disk_full.

2026-11-14 16:10Z: nodes ask now; the grant can come too late, and a later failure is then counted as t's

What stands above is of 10-30. Since then a node does ask (src/node/worker/grow.rs, src/node/run/grow.rs): ci-x86-1 was granted 67 to 111 disk grows an hour today (t_sched_grow_total{what="disk"}). Jobs still end disk_full: 18 in the last 24 hours, all people's jobs, none CI's (12 clippy/… family jobs, 2 ad-hoc cargo clippy commands, test-x86_64/tilo-agent-participant, test/tilo-session-client, test/tilo-session). Each ran 1.6 to 27.9 minutes before it, 197 minutes together, and each was run again at once; 17 of the 18 reruns then failed on the code, so the first end was most likely the code's failure too, counted as t's and run twice.

One case read whole (15:58:49Z, j572-89714, a person's cargo clippy --locked -p tilo-session -p tilo-desktop --all-targets -- -D warnings):

time (Z) worker's log
15:56:23, :28, :33, :39 asking to grow its disk quota: POST /v1/grow: operation timed out (four asks, GROW_WITHIN 5 s each)
15:56:40 disk quota grown … quota=11467406118
15:57:31 ask timed out; 15:57:33 grown to 22.9 GB
15:57:39 ask timed out; 15:57:43 grown to 45.9 GB
15:58:49 the job ends; server: "the job ended at its own disk limit, which t booked: 10.7 GiB, holding 10.6 GiB; it runs again booked above both"

Its first ask went 22 seconds without an answer. In those minutes the server logged 49 times in eight minutes "a scheduling pass took long: the grows it answers waited for it", with passes of 9 to 11 s (weighing 8 to 10 s, 88,000 asks queued). A sample found the job at its 10.7 GiB quota meanwhile, and by judge::at_disk_limit its end is judged at that limit whatever the quota grew to after. It ended with 45.9 GB of quota and 10.6 GiB written: it was not out of disk when it failed. Its rerun (j572-90289, booked 25.1 GB) failed on the code four minutes later, 16:02:53Z: the first end was the code's failure, counted as t's and run twice.

How common the late answer is: in my saved worker logs, 55 asks timed out in the 27 minutes from 15:26Z (20 jobs) and 11 in the four minutes from 15:56Z (6 jobs); none in 14:59 to 15:03Z, right after a restart, when a pass took under 3 s.

What I could not show: that the day's 18 ends come when passes are long. The five-minute mean pass around each end has a median of 2.7 s against 3.0 s for all of the day's readings, and 11 of the 18 fall in the evening of 11-13 when the node was at its disk floor (#64), where a grow waits for the freer. So there are at least two ways to the same end. The 14:48Z end (j570-87616) left no grow line in the four minutes of worker log I hold.

What I would ask of the scheduler (yours, not mine to patch): a disk grow's answer does not wait on a pass that takes ten seconds; and, for the judgement, a failed job that was grown past what it ever wrote is the code's failure unless a write of its was refused. Related: #53 (the pass), #41.

2026-11-14 20:52Z: a promote leaves about a minute and a half with no grow granted; one job ended for disk in it

The 20:49Z promote of fec2e2f2, from the worker's log saved across it:

time (Z) what the worker's grow asks met
20:47:21 a grant, the last before the gap but one
20:47:31 to 20:47:47 four asks timed out, the old server still up
20:47:50 one grant
20:48:01 to 20:48:59 ten asks timed out
20:48:59 to 20:49:04 five asks refused: no server
20:49:09 to 20:49:15 two timed out, two answered 503 "the server is restarting"
20:49:28.853 the first grant by the new server

From 20:47:50 to 20:49:28, 98 seconds, no grow was granted: 19 asks failed, from 5 jobs.

One of them ended. j575-94751, a person's cargo clippy --locked -p tilo-session --all-targets -- -D warnings, started 20:46:23. Its ask of about 20:48:49 timed out at 20:48:53.95. At 20:48:52.01 the worker, keeping its build, got "No space left on device". The new server logged at 20:49:27: "the job ended at its own disk limit, which t booked: 12.7 GiB, holding 12.8 GiB; it runs again booked above both", cause disk_full, and its rerun j576-4735 started. The asker lost the two and a half minutes the job had run and the wait for the rerun, not the verdict.

What this adds to the section above: there a grant came late under long passes. Here the server is away by design at each promote (seven restarts today since 13:00Z), the ask has its five-second bound and nothing after it, and a job that reaches its quota while no server answers ends.

Not shown: how many of the day's 18 disk endings fell into such a window. This is the one caught with the worker's log saved across the restart.

2026-11-14 21:50Z: a second ending tonight, with no restart near it: the first grant came 29 seconds after the first ask

j576-94380, a person's cargo clippy --locked -p tilo-session --lib -- -D warnings, launched 21:43:18Z on fec2e2f2.

time (Z) the worker's log
about 21:43:52 first grow ask sent
21:43:57 to 21:44:18 five asks in a row timed out at five seconds each
21:44:21.4 first grant, quota 13.1 GB
21:44:26.9, 21:44:31.5 one more ask timed out, then a grant to 26.3 GB
21:46:02.5, 21:46:03.8 one more ask timed out, then a grant to 52.5 GB
21:46:22.4 the job ended

The server at 21:46:22.6Z: "the job ended at its own disk limit, which t booked: 6.1 GiB, holding 6.1 GiB; it runs again booked above both", cause disk_full, floor 14.2 GB for the rerun. The rerun j576-94521 passed in 1.9 minutes. The run's log shows only the rerun's output, so which write failed in the first job I have not read.

The scheduler in those minutes, from its own warnings "a scheduling pass took long: the grows it answers waited for it": every pass from 21:45:51Z to 21:47:28Z took 8.8 to 11.9 s, 9 to 10 s of each in weighing, with 92,300 asks queued. By ten-minute means weighing ran 2 to 5.5 s a pass through the evening and 6.75 s in the ten minutes to 21:49Z.

How common the late answer is, from the worker's saved logs for 20:00Z to 21:50Z: 162 grow asks timed out against 156 grants, from 2 to 12 jobs in every ten minutes. Almost all were granted on a later try. Two jobs ended in that time: the one in the restart's gap above and this one.
Why the passes were 9 to 12 seconds in those minutes is read in #76: a pass is either 0.3 s or about 9 s of weighing, and it is the long kind whenever a kept build changed on the node since the pass before.

## What happened in prod (t.tilo.so, 2026-10-30) Session cargo drivers ended `disk_full` twice in 15 min (#41), each a full rerun, on nodes with terabytes free. #41 widens the driver's disk room; but a job that still outgrows its booking always dies, because nothing ever grows it. ## Root cause The server handles disk grows — `State::grow` (src/sched/state.rs ≈ 643) grants `Grow.disk` against the node's free disk and counts `t_sched_grow_total{what="disk"}` — but no node ever asks: every `Grow` built in src/node sets `disk: None` (src/node/worker.rs ≈ 851 `grow_loop`, memory only; ≈ 879/901 `SlotServer::grow`/`grow_on`, memory and tokens). The sampler (src/node/run.rs `sampler`) reads `storage.written(dir)` into each sample but compares only memory against `memory_high(limit)`; the job's quota is fixed at launch (`store.storage.limit(…, disk_quota(spec.disk))`, run.rs ≈ 1069). A job past its quota ends `disk_full` and reruns booked higher (jobs/mod.rs ≈ 485). ## What should happen As a job's written bytes near its disk quota (e.g. past seven eighths), its node asks to grow its disk like memory (`Grow { disk: Some(…) }`), raises the project quota when granted, and only a job the node can't grow ends `disk_full`. ## 2026-11-14 16:10Z: nodes ask now; the grant can come too late, and a later failure is then counted as t's What stands above is of 10-30. Since then a node does ask (`src/node/worker/grow.rs`, `src/node/run/grow.rs`): ci-x86-1 was granted 67 to 111 disk grows an hour today (`t_sched_grow_total{what="disk"}`). Jobs still end `disk_full`: **18 in the last 24 hours, all people's jobs, none CI's** (12 `clippy/…` family jobs, 2 ad-hoc `cargo clippy` commands, `test-x86_64/tilo-agent-participant`, `test/tilo-session-client`, `test/tilo-session`). Each ran 1.6 to 27.9 minutes before it, 197 minutes together, and each was run again at once; 17 of the 18 reruns then failed on the code, so the first end was most likely the code's failure too, counted as t's and run twice. **One case read whole (15:58:49Z, j572-89714, a person's `cargo clippy --locked -p tilo-session -p tilo-desktop --all-targets -- -D warnings`):** | time (Z) | worker's log | |---|---| | 15:56:23, :28, :33, :39 | `asking to grow its disk quota: POST /v1/grow: operation timed out` (four asks, `GROW_WITHIN` 5 s each) | | 15:56:40 | `disk quota grown … quota=11467406118` | | 15:57:31 | ask timed out; 15:57:33 grown to 22.9 GB | | 15:57:39 | ask timed out; 15:57:43 grown to 45.9 GB | | 15:58:49 | the job ends; server: "the job ended at its own disk limit, which t booked: 10.7 GiB, holding 10.6 GiB; it runs again booked above both" | Its first ask went 22 seconds without an answer. In those minutes the server logged 49 times in eight minutes "a scheduling pass took long: the grows it answers waited for it", with passes of 9 to 11 s (weighing 8 to 10 s, 88,000 asks queued). A sample found the job at its 10.7 GiB quota meanwhile, and by `judge::at_disk_limit` its end is judged at that limit whatever the quota grew to after. It ended with 45.9 GB of quota and 10.6 GiB written: it was not out of disk when it failed. Its rerun (j572-90289, booked 25.1 GB) failed on the code four minutes later, 16:02:53Z: the first end was the code's failure, counted as t's and run twice. How common the late answer is: in my saved worker logs, 55 asks timed out in the 27 minutes from 15:26Z (20 jobs) and 11 in the four minutes from 15:56Z (6 jobs); none in 14:59 to 15:03Z, right after a restart, when a pass took under 3 s. **What I could not show:** that the day's 18 ends come when passes are long. The five-minute mean pass around each end has a median of 2.7 s against 3.0 s for all of the day's readings, and 11 of the 18 fall in the evening of 11-13 when the node was at its disk floor (#64), where a grow waits for the freer. So there are at least two ways to the same end. The 14:48Z end (j570-87616) left no grow line in the four minutes of worker log I hold. **What I would ask of the scheduler** (yours, not mine to patch): a disk grow's answer does not wait on a pass that takes ten seconds; and, for the judgement, a failed job that was grown past what it ever wrote is the code's failure unless a write of its was refused. Related: #53 (the pass), #41. ## 2026-11-14 20:52Z: a promote leaves about a minute and a half with no grow granted; one job ended for disk in it The 20:49Z promote of fec2e2f2, from the worker's log saved across it: | time (Z) | what the worker's grow asks met | |---|---| | 20:47:21 | a grant, the last before the gap but one | | 20:47:31 to 20:47:47 | four asks timed out, the old server still up | | 20:47:50 | one grant | | 20:48:01 to 20:48:59 | ten asks timed out | | 20:48:59 to 20:49:04 | five asks refused: no server | | 20:49:09 to 20:49:15 | two timed out, two answered 503 "the server is restarting" | | 20:49:28.853 | the first grant by the new server | From 20:47:50 to 20:49:28, 98 seconds, no grow was granted: 19 asks failed, from 5 jobs. One of them ended. j575-94751, a person's `cargo clippy --locked -p tilo-session --all-targets -- -D warnings`, started 20:46:23. Its ask of about 20:48:49 timed out at 20:48:53.95. At 20:48:52.01 the worker, keeping its build, got "No space left on device". The new server logged at 20:49:27: "the job ended at its own disk limit, which t booked: 12.7 GiB, holding 12.8 GiB; it runs again booked above both", cause `disk_full`, and its rerun j576-4735 started. The asker lost the two and a half minutes the job had run and the wait for the rerun, not the verdict. What this adds to the section above: there a grant came late under long passes. Here the server is away by design at each promote (seven restarts today since 13:00Z), the ask has its five-second bound and nothing after it, and a job that reaches its quota while no server answers ends. Not shown: how many of the day's 18 disk endings fell into such a window. This is the one caught with the worker's log saved across the restart. ## 2026-11-14 21:50Z: a second ending tonight, with no restart near it: the first grant came 29 seconds after the first ask j576-94380, a person's `cargo clippy --locked -p tilo-session --lib -- -D warnings`, launched 21:43:18Z on fec2e2f2. | time (Z) | the worker's log | |---|---| | about 21:43:52 | first grow ask sent | | 21:43:57 to 21:44:18 | five asks in a row timed out at five seconds each | | 21:44:21.4 | first grant, quota 13.1 GB | | 21:44:26.9, 21:44:31.5 | one more ask timed out, then a grant to 26.3 GB | | 21:46:02.5, 21:46:03.8 | one more ask timed out, then a grant to 52.5 GB | | 21:46:22.4 | the job ended | The server at 21:46:22.6Z: "the job ended at its own disk limit, which t booked: 6.1 GiB, holding 6.1 GiB; it runs again booked above both", cause `disk_full`, floor 14.2 GB for the rerun. The rerun j576-94521 passed in 1.9 minutes. The run's log shows only the rerun's output, so which write failed in the first job I have not read. The scheduler in those minutes, from its own warnings "a scheduling pass took long: the grows it answers waited for it": every pass from 21:45:51Z to 21:47:28Z took 8.8 to 11.9 s, 9 to 10 s of each in weighing, with 92,300 asks queued. By ten-minute means weighing ran 2 to 5.5 s a pass through the evening and 6.75 s in the ten minutes to 21:49Z. How common the late answer is, from the worker's saved logs for 20:00Z to 21:50Z: 162 grow asks timed out against 156 grants, from 2 to 12 jobs in every ten minutes. Almost all were granted on a later try. Two jobs ended in that time: the one in the restart's gap above and this one. Why the passes were 9 to 12 seconds in those minutes is read in #76: a pass is either 0.3 s or about 9 s of weighing, and it is the long kind whenever a kept build changed on the node since the pass before.
xemmerling changed title from Nodes never ask to grow a job's disk: the server supports it, but a job nearing its quota dies disk_full instead to A job's disk grow is answered too late (the ask waits on a scheduling pass, 5 s timeouts): 18 jobs ended disk_full in 24 h and ran twice 2026-11-14 16:03:23 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
tilo/t#43
No description provided.