Repository navigation
Closed
Labels
Test FlakeTests that work. Wait, no. Actually yes. Hang on. Something is broken.
Description
We've had a number of similar test failures recently in the MacOS GitHub Action. Examples:
- pr Prune deps for base Oximeter crate #454, attempt 1 and follow-on attempt 2
- pr WIP: Adding general-purpose metric query endpoints to nexus #415 this run
They all look similar. Take this one from that last example:
Running `/Users/runner/work/omicron/omicron/target/debug/deps/test_commands-64e3cf8a3819ddcb`
running 5 tests
test test_nexus_bad_config ... FAILED
test test_nexus_invalid_config ... FAILED
test test_nexus_no_args ... FAILED
test test_nexus_openapi_internal ... FAILED
test test_nexus_openapi ... FAILED
failures:
---- test_nexus_bad_config stdout ----
thread 'test_nexus_bad_config' panicked at 'timed out waiting for command for 10000 ms: /Users/runner/work/omicron/omicron/target/debug/nexus nonexistent', test-utils/src/dev/test_cmds.rs:81:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- test_nexus_invalid_config stdout ----
writing temp config: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.78112.0
thread 'test_nexus_invalid_config' panicked at 'timed out waiting for command for 10000 ms: /Users/runner/work/omicron/omicron/target/debug/nexus /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.78112.0', test-utils/src/dev/test_cmds.rs:81:13
---- test_nexus_no_args stdout ----
thread 'test_nexus_no_args' panicked at 'timed out waiting for command for 10000 ms: /Users/runner/work/omicron/omicron/target/debug/nexus', test-utils/src/dev/test_cmds.rs:81:13
---- test_nexus_openapi_internal stdout ----
writing temp config: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.78112.8
thread 'test_nexus_openapi_internal' panicked at 'timed out waiting for command for 10000 ms: /Users/runner/work/omicron/omicron/target/debug/nexus /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.78112.8 --openapi-internal', test-utils/src/dev/test_cmds.rs:81:13
---- test_nexus_openapi stdout ----
writing temp config: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.78112.7
thread 'test_nexus_openapi' panicked at 'timed out waiting for command for 10000 ms: /Users/runner/work/omicron/omicron/target/debug/nexus /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.78112.7 --openapi', test-utils/src/dev/test_cmds.rs:81:13
failures:
test_nexus_bad_config
test_nexus_invalid_config
test_nexus_no_args
test_nexus_openapi
test_nexus_openapi_internal
test result: FAILED. 0 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 20.97s
error: test failed, to rerun pass '-p omicron-nexus --test test_commands'
Error: Process completed with exit code 101.
The second attempt on #454 is even more interesting:
Running `/Users/runner/work/omicron/omicron/target/debug/deps/test_commands-3f68dfabe4278858`
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
running 2 tests
test test_oximeter_openapi ... FAILED
test test_oximeter_no_args ... FAILED
failures:
---- test_oximeter_openapi stdout ----
writing temp config: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.28869.0
thread 'test_oximeter_openapi' panicked at 'timed out waiting for command for 10000 ms: /Users/runner/work/omicron/omicron/target/debug/oximeter /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/test_commands_config.28869.0 --openapi', test-utils/src/dev/test_cmds.rs:85:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- test_oximeter_no_args stdout ----
thread 'test_oximeter_no_args' panicked at 'timed out waiting for command for 10000 ms: /Users/runner/work/omicron/omicron/target/debug/oximeter', test-utils/src/dev/test_cmds.rs:85:13
failures:
test_oximeter_no_args
test_oximeter_openapi
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 10.07s
error: test failed, to rerun pass '-p oximeter-collector --test test_commands'
Error: Process completed with exit code 101.
The integration test in question runs a couple of command-line tools from Nexus with a few cases: some provide no arguments, which should immediately generate a usage message. Others provide arguments that cause the command to generate an OpenAPI schema. Both of these operations should be extremely quick and not block on much. In all the cases we've looked at, some of these commands didn't complete within 10 seconds!
(more details coming)
Metadata
Metadata
Assignees
Labels
Test FlakeTests that work. Wait, no. Actually yes. Hang on. Something is broken.
Activity
davepacheco commentedon Dec 1, 2021
In #454, the builds also took an extremely long time. My first thought was maybe these systems are heavily loaded. Maybe when we made the repo public last week and GitHub started paying for CI resources they use a lower class of storage? I can't find any public information confirming that they use different classes of service here, just different limits. I looked at build times and while they have increased notably in the last couple of weeks, I'm not convinced it's because of a different class of service.
@pfmooney had a good thought: maybe this is memory exhaustion? I've certainly seen a bunch of builds fail recently on my 64 GiB Helios machine due to running out of swap. This is when I dug into build times. Details are in this repo, but here's the summary of build times over time by OS:
Some observations:
It's far from a smoking gun, but this behavior seems consistent with gradually increased memory usage that recently hit a tipping point. Also consistent with that: slowness forking processes, since this involves at least reserving a bunch more memory at once.
Casting some doubt: the Mac runners get 14 GiB of memory. The Linux ones get only half that. But they also only have 2 cores, so they're probably using less concurrency.
I've proposed two mitigations:
davepacheco commentedon Jul 21, 2022
Here's another data point: maybe these are running out of disk space?
Today @jgallagher observed similar timeouts on a Linux system:
In that case, CockroachDB did start after a while:
Running
omicron-dev db-runsometimes seemed to work, but sometimes seemed to time out. This one got stuck populating:A subsequent run failed with:
and then saw:
On this system there's plenty of free memory but the disk is 98% full. When using a --store-dir on tmpfs, this reliably starts up quickly.
The punchline is: we know some filesystems get very slow as the disk fills up. Maybe that's what's been going on with the Mac test runners?
jgallagher commentedon Jul 21, 2022
Short followup: After freeing up space on my disk (utilization of ~80% instead of 98%), all my Cockroach timeout issues have gone away, which seems to confirm this reasoning. FWIW my filesystem is
ext4.davepacheco commentedon Jul 21, 2022
I couldn't help myself from writing a small test program to see how the Mac and Linux GitHub Actions runners behave when disk space runs low. Sadly (for the purpose of debugging this issue), the Mac one behaved quite well:
It failed crisply (ENOSPC) with no degradation in latency. This might not be testing the same thing our test suite does so it's possible it's still related...but this was not the confirmation I was hoping for.
Interestingly, the Linux test runner behaves much worse:
The runner has been sitting there for 10 minutes without having failed or emitted any other output.
iliana commentedon Jul 29, 2022
#1508
Update Crucible and Propolis to latest