drivers/cargo: a test binary is run whole though t itself expects it to take 89 minutes under its 60-minute limit: every CI job of tilo's tilo-session::it has timed out since 05:04Z 11-14 #73

Open
opened 2026-11-14 10:39:03 +00:00 by xemmerling · 0 comments
Owner

Production, 2026-11-14, c6dca088 (and the two builds before it, 618f31ea and 67588367). Every CI job that runs tilo's tilo-session::it test binary has ended timed_out since 05:04Z: 13 of 13, each 67.6 to 77.2 minutes, about 4,100 to 4,280 CPU seconds. Three of people's jobs ended the same way. The front head runs each stand on one of these jobs, and a join whose owner timed out runs the binary again for another 70 minutes. After the 08:57Z promote four head runs finished in 85 minutes.

No test hangs. In five logs the "test that never ended" is a different one each time: the one running when the hour was over.

What I read

Fact Value Where
Tests of tilo-session::it (by the tables' times tilo folded about 120 integration-test binaries into it around 03:00Z) 689 t.test_samples
Sum of their measured medians 4,414 s same
Longest test, median test 380 s, 2.5 s same
Fixed-cost samples, newest first, ms 4425, 5968, 1236659, 1236701, 1231066, 904668, 894268, 905845, 15526 t.fixed_costs, last kept 05:19Z
Their median 904.7 s
What the fixed cost is nextest setup script lounge-siblings (tools/build-sibling-binaries.sh 'tilo-relay:tilo-relay=tilo-relay/agents'): 318 s, 907 s, 1,004 s in three logs job logs
Threads the cut is made for, and each job's width 1 job_history.width
The job's limit 3,600 s of its own time JobSpec::timeout_secs

Why it is run whole

shards::pack with these figures:

  • floor = 3 × fixed = 2,714 s (the rule that a shard's fixed cost is at most a quarter of its time, mine, 67ac8442)
  • target = max(longest 380 s, floor 2,714 s, spread 4,414 / 32 = 138 s) = 2,714 s
  • two bins: 2,714 s and 1,700 s; the second is under the floor and is merged into the first
  • one bin, so cut returns the whole binary

expected_ms for that one shard is 905 + 4,414 = 5,319 s. t asks for a job it expects to take 89 minutes under a limit of 60.

Why it stays so

record_test_facts keeps a fixed cost only from a passing job with a nextest summary. A job that times out leaves none, so the median stays at 905 s and the next cut is the same. Nothing but a pass of the whole binary can change it, and the whole binary cannot pass.

The missing rule

The cut does not know its job's limit. The quarter rule saves work; it must give way where it makes a shard that is expected past the limit. Proposed, in pack alone, nothing in booking or admission:

  • a shard's expected time (fixed cost and its tests' run on its threads) is at most half its job's limit, where its tests can be cut that fine
  • the floor is min(3 × fixed, limit / 2 - fixed), in the fit and in the merge
  • with today's figures: five shards of about 30 minutes each on one thread, instead of one that cannot end

I am having this built as a change to shards.rs and its caller, with tilo's figures as the test. Say so here if you want it done another way, for example by the threads the whole run is booked: at 8 threads the whole binary is expected in about 24 minutes.

tilo's side, not t's

  • The relay build inside every test job of this binary costs 5 to 17 minutes a shard at one thread.
  • Tests failing in most of the five logs: directory::a_workspace_joined_brings_the_chat_written_before_it (about 255 s), repl_door::a_repl_named_when_the_session_starts_is_admitted_without_asking, repl_door::the_person_admits_the_repl_on_the_sheet_and_it_works_as_them, search::the_sessions_own_actions_are_found_and_run_on_its_published_surface (about 122 s), and the lib test shell::tests::the_device_surface_file_is_what_the_session_publishes.

2026-11-14 11:15Z: landed

The rule is on main as 099a17b6 (cut takes the job's limit; floor = min(3 × fixed, limit/2 − fixed); a merge of small shards only within that). With the figures above it cuts five shards on one thread, the longest expected in 30.0 minutes. t's whole check set passed for it on testing three times, on 58b70474, 5e58a972 and 189786f6. Not on production yet.

A whole job already running at a promote is taken over as it stands (taking_left) and will still time out; only binaries asked after the promote get the new cut.

2026-11-14 11:46Z: on production

099a17b6 is promoted (server up 11:46:18Z, leading epoch 569). Both CIs passed it: the forge's run 1485 and t's own check set on testing, the last run cut by testing's server on this build (t's own test/t is cut into 16 jobs as before). Eight CI jobs of test/tilo-session were running at the switch; the whole ones among them are taken over as they stand and will still time out. I read the jobs started after the switch at +45 and +90 minutes and add the figures here.

2026-11-14 12:31Z: 45 minutes on production

The new server cuts tilo-session::it into six shards a run, one thread each (read from jobs.carried: a whole run carries the binary's name alone, a shard its tests' names).

Jobs of test/tilo-session CI People
Started after the promote, ended 74 pass (longest 20.3 min), 14 fail (longest 40.9 min), none timed out 73 pass, 16 fail, 2 cancelled, none timed out
Started before it, ended after 4 timed out (73.6 min) 1 timed out (67.3 min)
  • The first two runs under the new cut: ten of their twelve shards ended in 15.6 to 22.2 minutes (six pass, four fail on tilo's own tests). The smallest shard took 16.0 minutes, nearly all of it the setup script, which matches the measured fixed cost.
  • One shard, the same in both runs, ran long: 148 tests with medians of 858 s, so 29.4 minutes expected, 40.9 minutes taken. Its tests took 1,390 s: lounge_e2e::a_computer_joins_the_lounge_through_its_room_services_own_door failed after 480 s where its passing median is under 12 s, and the rest ran slower than their medians. It was not hung (two reads of its live log four minutes apart: 23 tests further). That is inside the limit only because the bound is half of it.
  • Across the six shards of the first run the tests took 6,126 s where their medians sum to 4,414 s: three failing tests account for about 990 s of the difference (480 s, 258 s, 252 s), load for the rest.
  • That run's check ended fail in four of tilo's tests: shell::tests::the_device_surface_file_is_what_the_session_publishes, directory::a_member_the_lounge_removes_leaves_its_roster_and_reads_nothing_more, directory::a_workspace_joined_brings_the_chat_written_before_it, lounge_e2e::a_computer_joins_the_lounge_through_its_room_services_own_door. A verdict in 41 minutes where there was none in 70.
  • Test times and failures of this binary are recorded again (samples kept at 12:15Z and 12:18Z, the first since 04:55Z), so the next cuts use today's times and give the failing tests shards of their own.
  • No error of t's own from the change at +30 minutes (1,837 jobs ended).

What it costs: six jobs each pay the setup script's relay build, about 15 minutes at one thread, where one job paid it once and then timed out.

2026-11-14 12:35Z: the fixed cost of this binary is two costs

Once shards passed, fixed_costs for tilo-session::it read, newest first, in seconds: 3, 2, 900, 14, 6, 1039, 13, 12, 4. The median fell from 905 s to 12 s and the next run (r31d78b379b, 12:29Z) was cut into 13 shards where the two before it got 6.

  • The samples are two populations. nextest runs a setup script only for the tests its filter names: a shard holding a lounge test pays lounge-siblings, the relay build (900 to 1,040 s); a shard without one pays seconds.
  • So the median flips with which shards passed last, and the cut flips with it between about 6 and about 13 shards. With the bound from this issue neither is expected past half the limit, so it is a cost question now, not a verdict question.
  • The cost: every shard that happens to hold a lounge test pays the 15-minute build. Tests are packed longest first, with no regard to which setup script they need.

A thought for a later change, not built: reckon a shard's fixed cost from the setup scripts its tests trigger, and keep the tests of one setup script together, so a run pays the relay build once.

2026-11-14 12:54Z: the old cut has ended

  • The last whole-binary CI jobs, handed out before the promote, timed out at 12:40Z and 12:45Z (68.6 and 69.8 minutes). None has been handed out since.
  • All twelve shards of the first two runs ended in 15.6 to 40.9 minutes: six pass, six fail on tilo's tests.
  • The run cut into 13 shards (r31d78b379b): 19 pass, 2 fail, none timed out; ten of the binary's shards took 6.1 to 7.7 minutes, the two that pay the lounge setup 17.0 and 22.4, one was still running at 23.
  • Head runs finished: 7 in the hour after the promote, 6 of them in the 26 minutes from 12:20Z; before it, 10 in 160 minutes. Too short to call a rate yet.

2026-11-14 13:48Z: two hours on

  • No job of test/tilo-session started after the promote has timed out: CI 185 pass and 26 fail by 13:15Z, the longest 40.9 minutes. The shards running at the 13:03Z promote of 928644e1 went on as shards.
  • Head runs finished: 10 in the 120 minutes after the promote (1, 4, 3, 0, 2 per twenty minutes; the 0 is the restart at 13:03Z), 5 an hour, against 3.75 an hour before. 543 heads are open and CI is 36 hours behind, more than at the start. This check was one gate of several; I read next what the front heads wait on now.

2026-11-14 14:52Z: the same for disk

One shard of the binary in a person's run (j570-87616) ended at its own disk limit after 27.9 minutes: booked 2.8 GiB, and t ran it again booked at 7.2 GB, as designed. It is the shard that holds the lounge tests: the setup script's relay build writes a build directory, where the other fifteen jobs of that run's check wrote little and ended in under two minutes (three in seven to ten). So a shard's disk, like its time, depends on which setup scripts its tests trigger, and both are reckoned per binary. No CI shard has ended this way since the fix; disk_full came 14 times in 24 hours, all in people's jobs.

Production, 2026-11-14, c6dca088 (and the two builds before it, 618f31ea and 67588367). Every CI job that runs tilo's `tilo-session::it` test binary has ended `timed_out` since 05:04Z: 13 of 13, each 67.6 to 77.2 minutes, about 4,100 to 4,280 CPU seconds. Three of people's jobs ended the same way. The front head runs each stand on one of these jobs, and a join whose owner timed out runs the binary again for another 70 minutes. After the 08:57Z promote four head runs finished in 85 minutes. No test hangs. In five logs the "test that never ended" is a different one each time: the one running when the hour was over. ## What I read | Fact | Value | Where | |---|---|---| | Tests of `tilo-session::it` (by the tables' times tilo folded about 120 integration-test binaries into it around 03:00Z) | 689 | `t.test_samples` | | Sum of their measured medians | 4,414 s | same | | Longest test, median test | 380 s, 2.5 s | same | | Fixed-cost samples, newest first, ms | 4425, 5968, 1236659, 1236701, 1231066, 904668, 894268, 905845, 15526 | `t.fixed_costs`, last kept 05:19Z | | Their median | 904.7 s | | | What the fixed cost is | nextest setup script `lounge-siblings` (`tools/build-sibling-binaries.sh 'tilo-relay:tilo-relay=tilo-relay/agents'`): 318 s, 907 s, 1,004 s in three logs | job logs | | Threads the cut is made for, and each job's width | 1 | `job_history.width` | | The job's limit | 3,600 s of its own time | `JobSpec::timeout_secs` | ## Why it is run whole `shards::pack` with these figures: - floor = 3 × fixed = 2,714 s (the rule that a shard's fixed cost is at most a quarter of its time, mine, 67ac8442) - target = max(longest 380 s, floor 2,714 s, spread 4,414 / 32 = 138 s) = 2,714 s - two bins: 2,714 s and 1,700 s; the second is under the floor and is merged into the first - one bin, so `cut` returns the whole binary `expected_ms` for that one shard is 905 + 4,414 = 5,319 s. t asks for a job it expects to take 89 minutes under a limit of 60. ## Why it stays so `record_test_facts` keeps a fixed cost only from a passing job with a nextest summary. A job that times out leaves none, so the median stays at 905 s and the next cut is the same. Nothing but a pass of the whole binary can change it, and the whole binary cannot pass. ## The missing rule The cut does not know its job's limit. The quarter rule saves work; it must give way where it makes a shard that is expected past the limit. Proposed, in `pack` alone, nothing in booking or admission: - a shard's expected time (fixed cost and its tests' run on its threads) is at most half its job's limit, where its tests can be cut that fine - the floor is `min(3 × fixed, limit / 2 - fixed)`, in the fit and in the merge - with today's figures: five shards of about 30 minutes each on one thread, instead of one that cannot end I am having this built as a change to `shards.rs` and its caller, with tilo's figures as the test. Say so here if you want it done another way, for example by the threads the whole run is booked: at 8 threads the whole binary is expected in about 24 minutes. ## tilo's side, not t's - The relay build inside every test job of this binary costs 5 to 17 minutes a shard at one thread. - Tests failing in most of the five logs: `directory::a_workspace_joined_brings_the_chat_written_before_it` (about 255 s), `repl_door::a_repl_named_when_the_session_starts_is_admitted_without_asking`, `repl_door::the_person_admits_the_repl_on_the_sheet_and_it_works_as_them`, `search::the_sessions_own_actions_are_found_and_run_on_its_published_surface` (about 122 s), and the lib test `shell::tests::the_device_surface_file_is_what_the_session_publishes`. ## 2026-11-14 11:15Z: landed The rule is on main as 099a17b6 (`cut` takes the job's limit; floor = min(3 × fixed, limit/2 − fixed); a merge of small shards only within that). With the figures above it cuts five shards on one thread, the longest expected in 30.0 minutes. t's whole check set passed for it on testing three times, on 58b70474, 5e58a972 and 189786f6. Not on production yet. A whole job already running at a promote is taken over as it stands (`taking_left`) and will still time out; only binaries asked after the promote get the new cut. ## 2026-11-14 11:46Z: on production 099a17b6 is promoted (server up 11:46:18Z, leading epoch 569). Both CIs passed it: the forge's run 1485 and t's own check set on testing, the last run cut by testing's server on this build (t's own `test/t` is cut into 16 jobs as before). Eight CI jobs of `test/tilo-session` were running at the switch; the whole ones among them are taken over as they stand and will still time out. I read the jobs started after the switch at +45 and +90 minutes and add the figures here. ## 2026-11-14 12:31Z: 45 minutes on production The new server cuts `tilo-session::it` into six shards a run, one thread each (read from `jobs.carried`: a whole run carries the binary's name alone, a shard its tests' names). | Jobs of `test/tilo-session` | CI | People | |---|---|---| | Started after the promote, ended | 74 pass (longest 20.3 min), 14 fail (longest 40.9 min), none timed out | 73 pass, 16 fail, 2 cancelled, none timed out | | Started before it, ended after | 4 timed out (73.6 min) | 1 timed out (67.3 min) | - The first two runs under the new cut: ten of their twelve shards ended in 15.6 to 22.2 minutes (six pass, four fail on tilo's own tests). The smallest shard took 16.0 minutes, nearly all of it the setup script, which matches the measured fixed cost. - One shard, the same in both runs, ran long: 148 tests with medians of 858 s, so 29.4 minutes expected, 40.9 minutes taken. Its tests took 1,390 s: `lounge_e2e::a_computer_joins_the_lounge_through_its_room_services_own_door` failed after 480 s where its passing median is under 12 s, and the rest ran slower than their medians. It was not hung (two reads of its live log four minutes apart: 23 tests further). That is inside the limit only because the bound is half of it. - Across the six shards of the first run the tests took 6,126 s where their medians sum to 4,414 s: three failing tests account for about 990 s of the difference (480 s, 258 s, 252 s), load for the rest. - That run's check ended `fail` in four of tilo's tests: `shell::tests::the_device_surface_file_is_what_the_session_publishes`, `directory::a_member_the_lounge_removes_leaves_its_roster_and_reads_nothing_more`, `directory::a_workspace_joined_brings_the_chat_written_before_it`, `lounge_e2e::a_computer_joins_the_lounge_through_its_room_services_own_door`. A verdict in 41 minutes where there was none in 70. - Test times and failures of this binary are recorded again (samples kept at 12:15Z and 12:18Z, the first since 04:55Z), so the next cuts use today's times and give the failing tests shards of their own. - No error of t's own from the change at +30 minutes (1,837 jobs ended). What it costs: six jobs each pay the setup script's relay build, about 15 minutes at one thread, where one job paid it once and then timed out. ## 2026-11-14 12:35Z: the fixed cost of this binary is two costs Once shards passed, `fixed_costs` for `tilo-session::it` read, newest first, in seconds: 3, 2, 900, 14, 6, 1039, 13, 12, 4. The median fell from 905 s to 12 s and the next run (r31d78b379b, 12:29Z) was cut into 13 shards where the two before it got 6. - The samples are two populations. nextest runs a setup script only for the tests its filter names: a shard holding a lounge test pays `lounge-siblings`, the relay build (900 to 1,040 s); a shard without one pays seconds. - So the median flips with which shards passed last, and the cut flips with it between about 6 and about 13 shards. With the bound from this issue neither is expected past half the limit, so it is a cost question now, not a verdict question. - The cost: every shard that happens to hold a lounge test pays the 15-minute build. Tests are packed longest first, with no regard to which setup script they need. A thought for a later change, not built: reckon a shard's fixed cost from the setup scripts its tests trigger, and keep the tests of one setup script together, so a run pays the relay build once. ## 2026-11-14 12:54Z: the old cut has ended - The last whole-binary CI jobs, handed out before the promote, timed out at 12:40Z and 12:45Z (68.6 and 69.8 minutes). None has been handed out since. - All twelve shards of the first two runs ended in 15.6 to 40.9 minutes: six pass, six fail on tilo's tests. - The run cut into 13 shards (r31d78b379b): 19 pass, 2 fail, none timed out; ten of the binary's shards took 6.1 to 7.7 minutes, the two that pay the lounge setup 17.0 and 22.4, one was still running at 23. - Head runs finished: 7 in the hour after the promote, 6 of them in the 26 minutes from 12:20Z; before it, 10 in 160 minutes. Too short to call a rate yet. ## 2026-11-14 13:48Z: two hours on - No job of `test/tilo-session` started after the promote has timed out: CI 185 pass and 26 fail by 13:15Z, the longest 40.9 minutes. The shards running at the 13:03Z promote of 928644e1 went on as shards. - Head runs finished: 10 in the 120 minutes after the promote (1, 4, 3, 0, 2 per twenty minutes; the 0 is the restart at 13:03Z), 5 an hour, against 3.75 an hour before. 543 heads are open and CI is 36 hours behind, more than at the start. This check was one gate of several; I read next what the front heads wait on now. ## 2026-11-14 14:52Z: the same for disk One shard of the binary in a person's run (j570-87616) ended at its own disk limit after 27.9 minutes: booked 2.8 GiB, and t ran it again booked at 7.2 GB, as designed. It is the shard that holds the lounge tests: the setup script's relay build writes a build directory, where the other fifteen jobs of that run's check wrote little and ended in under two minutes (three in seven to ten). So a shard's disk, like its time, depends on which setup scripts its tests trigger, and both are reckoned per binary. No CI shard has ended this way since the fix; `disk_full` came 14 times in 24 hours, all in people's jobs.
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#73
No description provided.