You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: test-benchmark hits the default 10m go test timeout #997
The test-benchmark workflow regularly fails because go test panics after its default 10 minute timeout:
panic: test timed out after 10m0s running tests: TestBenchmark (10m0s)FAIL github.com/opencloud-eu/reva/v2/tests/benchmark 600.149smake: *** [Makefile:98: test-benchmark] Error 1
Every failed test-benchmark run in pipelines 1690 to 1724 is this timeout, on main, stable-2.46 and PRs alike: 1691, 1696, 1699, 1701, 1706, 1717, 1718, 1724. The successful runs take 450s to 700s, so we are close to the limit all the time and a slow runner tips it over. In https://ci.opencloud.rocks/repos/4/pipeline/1724 the fs.CreateDir spec alone took 122s (10000 iterations per driver, decomposed has a median of 7.5ms).
make test-benchmark runs a plain cd tests/benchmark && go test, unlike test-integration which passes -timeout 15m.
Options:
a) pass -timeout 20m in the Makefile (cheap, hides nothing because we do not assert on the numbers anyway)
b) reduce the number of iterations, e.g. fs.CreateDir with 10000 samples per driver
c) only run the benchmark on push/nightly, not on every PR
I'd do a) and b).
related, also seen in that pipeline, already tracked:
Some numbers on this, from the reva pipelines 1490 to 1756 (2026-11-03 to 2026-11-16):
test-benchmark failed in 72 of 225 runs. 65 of the 69 failures with a readable log are panic: test timed out after 10m0s; the other 4 failed before the tests ran.
The runs that passed are close to the limit as well: the step took 573 s in the median, 690 s in the upper quartile and up to 1022 s (the step time includes module downloads and compilation, so the test binary itself has a bit more headroom).
I also compared the failures with the load on the CI agents, using the public Woodpecker metrics: the number of steps running anywhere on the CI while the benchmark ran.
Running steps (mean during the run)
Runs
Failed
below 15
42
5%
15 to 30
47
19%
30 to 45
66
58%
45 to 60
31
42%
60 and more
39
26%
So the timeouts mostly happen when the CI is busy, but the benchmark is slow enough that even a moderately busy CI pushes it over 10 minutes. The drop above 60 is probably the autoscaler: the number of agent slots grows with the load (from about 8 when idle to over 100), so very high counts mean more machines rather than more contention per machine.
The 30 to 45 row is skewed by one day with 100 pipelines (2026-11-04); without it, that row is 43%. The data covers only two weeks, so take the thresholds as rough.
Raising the timeout (e.g. go test -timeout 20m in the test-benchmark target) would remove most of these failures. Restarting a failed run only helps when the CI is quiet.
A follow-up with a better signal: how crowded the agent a step runs on is, rather than the load of the whole CI.
Woodpecker records the agent and the start and end of every workflow, so I took all pipelines of all repositories since 2026-11-03 (about 1600) and computed, for each reva test-benchmark and unit-test step, how many other workflows ran on the same agent at the same time (the mean over the step).
Other workflows on the same agent
test-benchmark failed
unit-test failed
0 to 1
7% (n=28)
3% (n=32)
1 to 2
12% (n=25)
9% (n=34)
2 to 3
7% (n=14)
2% (n=41)
3 to 4
41% (n=51)
19% (n=21)
4 to 6
42% (n=107)
33% (n=104)
Up to about 2 neighbours, the steps run almost as if alone; from 3 on, the failure rate jumps.
It holds up better than the CI-wide numbers: without the busy day 2026-11-04 it is 6% vs. 35%, and on 11 of 11 days the failed benchmark runs had more neighbours than the passed ones of the same day.
The step duration of passed runs grows with the number of neighbours as well (correlation 0.49 for the benchmark, 0.74 for the unit tests).
The CI-wide load alone explains little: with fewer than 3 neighbours, 7 to 8% of the benchmark runs failed whether the CI was quiet or busy; only a busy CI together with 3 or more neighbours gave 46%. A busy CI just makes it more likely to land on a crowded agent.
Almost all agents (771 of 853) ran 7 workflows at once at some point, so they seem to accept up to 7. That looks like too many for these machines. Besides raising the test timeout, lowering the number of parallel workflows per agent (to 3 or 4) would probably remove most of the timing failures, in reva and in the other repositories. Per-agent CPU and I/O metrics (pressure stall information, CPU steal time) would show whether CPU or disk is the bottleneck.
What per-agent machine metrics would add, e.g. from a node_exporter on each agent, scraped into the Prometheus behind the CI dashboard:
So far, the number of workflows on an agent is only a stand-in for how loaded it is. A workflow that compiles and one that waits for a browser count the same, and we can't tell what the machine runs short of. The exporter would measure that directly:
Pressure stall information (node_pressure_cpu_waiting_seconds_total, ..._io_..., ..._memory_...): the share of time processes wait for CPU, disk or memory. This is the most direct measure of contention: CPU usage alone is near 100% on any busy build machine, whether the steps are slowed down or not.
CPU steal time (node_cpu_seconds_total{mode="steal"}): on virtual machines with shared vCPUs, the time the hypervisor gives our CPUs to other tenants. If it is high, part of the slowness comes from outside the CI, and no limit on our side fixes it, only a machine type with dedicated CPUs.
Disk I/O (node_disk_io_time_seconds_total), memory and OOM kills, and the load average.
What the analysis above could then do:
Find the bottleneck: for each failed and passed step, look at the CPU, I/O and memory pressure and the steal time on its agent during the step. That tells whether it is CPU, disk or noisy neighbours, which decides between fewer workflows per agent, faster disks, or another machine type.
Pick the number of workflows per agent from data: see at which number of concurrent workflows the pressure starts to rise, instead of the rough "3 or more" from the counts above.
Find the heavy workflows: with the pressure per agent and the workflows that ran on it, find out which workflows cause most of the load (e.g. the acceptance tests with a full server, or the e2e tests with browsers). Those could get an agent of their own, or a lower limit.
Tell timing failures from real ones: a test that only fails under high pressure is a timing problem; one that also fails on an idle agent is a bug. That would help to sort out which unstable tests need a fix.
Know when a restart makes sense: the number of agents under pressure right now says much more than the number of running steps in the whole CI.
For the agents that come and go, the exporter would have to be part of the agent image or its cloud-init, and the series need the agent name as a label, so that they can be matched with the agent of each workflow in Woodpecker.
Activity
pbleser-oc commentedon Nov 16, 2026
Some numbers on this, from the reva pipelines 1490 to 1756 (2026-11-03 to 2026-11-16):
test-benchmarkfailed in 72 of 225 runs. 65 of the 69 failures with a readable log arepanic: test timed out after 10m0s; the other 4 failed before the tests ran.I also compared the failures with the load on the CI agents, using the public Woodpecker metrics: the number of steps running anywhere on the CI while the benchmark ran.
So the timeouts mostly happen when the CI is busy, but the benchmark is slow enough that even a moderately busy CI pushes it over 10 minutes. The drop above 60 is probably the autoscaler: the number of agent slots grows with the load (from about 8 when idle to over 100), so very high counts mean more machines rather than more contention per machine.
The 30 to 45 row is skewed by one day with 100 pipelines (2026-11-04); without it, that row is 43%. The data covers only two weeks, so take the thresholds as rough.
Raising the timeout (e.g.
go test -timeout 20min thetest-benchmarktarget) would remove most of these failures. Restarting a failed run only helps when the CI is quiet.pbleser-oc commentedon Nov 16, 2026
A follow-up with a better signal: how crowded the agent a step runs on is, rather than the load of the whole CI.
Woodpecker records the agent and the start and end of every workflow, so I took all pipelines of all repositories since 2026-11-03 (about 1600) and computed, for each reva
test-benchmarkandunit-teststep, how many other workflows ran on the same agent at the same time (the mean over the step).test-benchmarkfailedunit-testfailedAlmost all agents (771 of 853) ran 7 workflows at once at some point, so they seem to accept up to 7. That looks like too many for these machines. Besides raising the test timeout, lowering the number of parallel workflows per agent (to 3 or 4) would probably remove most of the timing failures, in reva and in the other repositories. Per-agent CPU and I/O metrics (pressure stall information, CPU steal time) would show whether CPU or disk is the bottleneck.
pbleser-oc commentedon Nov 16, 2026
What per-agent machine metrics would add, e.g. from a node_exporter on each agent, scraped into the Prometheus behind the CI dashboard:
So far, the number of workflows on an agent is only a stand-in for how loaded it is. A workflow that compiles and one that waits for a browser count the same, and we can't tell what the machine runs short of. The exporter would measure that directly:
node_pressure_cpu_waiting_seconds_total,..._io_...,..._memory_...): the share of time processes wait for CPU, disk or memory. This is the most direct measure of contention: CPU usage alone is near 100% on any busy build machine, whether the steps are slowed down or not.node_cpu_seconds_total{mode="steal"}): on virtual machines with shared vCPUs, the time the hypervisor gives our CPUs to other tenants. If it is high, part of the slowness comes from outside the CI, and no limit on our side fixes it, only a machine type with dedicated CPUs.node_disk_io_time_seconds_total), memory and OOM kills, and the load average.What the analysis above could then do:
For the agents that come and go, the exporter would have to be part of the agent image or its cloud-init, and the series need the agent name as a label, so that they can be matched with the agent of each workflow in Woodpecker.