Skip to content

flaky(ci): anvil-e2e DeployProtocol stalls under --test-threads 2 contention #1384

Closed

Description

@yigitdot

anvil e2e fails intermittently with the chain fixture never coming up:

Error: forge script DeployProtocol failed after 3 attempts; final attempt stalled (timed out after 45s)

Observed 2 failures in 3 consecutive runs of the same commit (e5b629b, PR #1365), with the victim moving each time — which is what rules out a defect in any one journey:

Sample Result Failing test
1 FAIL cli_publish::publish_namespace_claim_assign_land_on_chain
2 FAIL g_node_06_unbond::unbond_reduces_capacity_and_returns_token_after_the_window
3 PASS —

In sample 2, cli_publish — the sample-1 victim — passed in 13.9s.

Likely cause: the 45s budget is too tight for the configured parallelism. .github/workflows/ci.yml:605 runs --test-threads 2, so two journeys run concurrently on a standard 2-core runner, each spawning its own anvil and its own forge script DeployProtocol, several also spawning a decdn-node subprocess. crates/e2e/src/chain.rs:69-70 sets DEPLOY_TIMEOUT = 45s / DEPLOY_ATTEMPTS = 3; under that contention all three attempts can stall.

Corroborating signal: the same test's wall-clock varied 5x across these runs (g_gov_02_rate_bounds took 13.6s, 70.8s, and 16.3s) — the runner is heavily contended, and the retry loop offers no relief because all three attempts hit the same contention window.

Note this is distinct from #883 (closed), which was about broadcast-phase non-zero exits not being retried. Here the stalls are retried, three times, and all three stall.

Suggested, in rough order of preference:

  1. Raise DEPLOY_TIMEOUT (or scale it when CI is set) — the deploy is not slow, it is starved.
  2. Add backoff between deploy attempts so retries do not land in the same contention window.
  3. Consider --test-threads 1 for the cross-layer step, trading wall-clock for determinism.

Found while validating #1365; not caused by it (that PR's own journey passed in all three samples).

Activity

  1. added
    kind:bug
    kind:test
    rust
    prio:medium
    on Jul 22, 2026
  2. self-assigned this
    on Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:bugkind:testprio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions