Skip to content

Tor guard-rotation KVM leg: refused circuit creates on an open channel, and whether rotation alone cures the stall (#4121 criteria 4 and 5) #4342

Open

Description

@pithead-developer

What's the problem

#4121 (PR #4339) adds a guard rotation (DROPGUARDS) for a Tor stuck at the first circuit hop, but ships without the fault leg its acceptance criteria 4 and 5 ask for. No test refuses circuit-create cells while the guard channel stays open, so nothing shows the rotation cures that fault, and the relay DoS-defence explanation is still unconfirmed. Quoted from #4121:

  • A KVM or fault-injection leg drops circuit-create cells at the guard but not the TCP channel. It asserts that the stack reaches working Tor egress within the bounded window without a Tor restart.
  • The test is written so it can confirm or refute the DoS-defence explanation. Record whether rotation alone cures the fault, and how long an untouched Tor takes to recover.

What it impacts

Owners with tor.auto_heal on: the rotation rung is covered by unit and stack tests and an e2e run, but not against the real fault. The release battery cannot catch a regression in it.

How I found it

Reviewing the #4121 acceptance criteria against PR #4339. No way was found to drop circuit-create cells without dropping the TCP channel on a plain guest. #4280 criterion 4 asks for a related drop-cells leg for the restart/reset ladder; this issue adds the rotation assertion and the recovery-time record, and can share that leg.

How important is it

Medium. The code path is tested at the lower tiers; the missing leg is the only evidence for the hypothesis and for the real-fault behaviour.

Acceptance criteria

  • A tier4-kvm tor-heal leg makes circuit creation fail on an open guard channel and asserts working Tor egress within a bounded window without a Tor restart, with the audit record tor-dropguards present.
  • The leg records whether rotation alone cures the fault and how long an untouched Tor (healer off) takes to recover.
  • The result confirms or refutes the DoS-defence explanation, stated in the PR or issue.
  • The leg stays under the 24 h benchmark limit and has a job id in the proof.

Possible solutions

Release: date 2026-11-30
Who: operator

Activity

  1. added this to the v2.0.5 milestone on Nov 21, 2026
  2. added
    testing
    P2-correctness
    on Nov 21, 2026
  3. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4121. I stopped before branching or editing anything. This leg can't be written yet, and its design has open questions. I made no changes and ran no bench jobs.

    Blocker. The leg has to assert the DROPGUARDS rotation rung and the tor-dropguards audit record. That code is in draft PR #4339 (issue #4121), which is still open. I looked for it on develop-v2.0.5, which this branch tracks. git grep finds dropguards only in tests/stack/standalone/test_tor_recovery.sh. The healer and its audit record are not on the base branch. There is nothing for a tier4-kvm leg to exercise until #4339 merges and closes #4121. I'm returning blocked on #4121 so the runner resumes me when it closes.

    What exists today. The tor-heal KVM phase (tests/os/phases/tor-heal.sh) streams tor-heal-guest.sh into a provisioned guest. It covers only the saturated-history self-heal and the disabled control (#3118). It has no refused-create fault.

    Questions for the resume. The defaults assume #4339 has merged.

    1. Fault mechanism. Do we build the private Tor network on the guest, with a guard relay running a low DoSCircuitCreation* torrc? Default: yes. It is the only option on the issue that produces refused creates on an open TCP channel, and it tests the DoS-defence explanation directly. A guest firewall or tc drop would also break the TCP channel, so it can't confirm or refute the explanation.
    2. Shared leg with Tor auto-heal refinements deferred from #4095: circuit-completion gate, lock-refused history, 60 min disruptive spacing, KVM drop-cells leg #4280. Do we share the drop-cells mechanism with Tor auto-heal refinements deferred from #4095: circuit-completion gate, lock-refused history, 60 min disruptive spacing, KVM drop-cells leg #4280 criterion 4 (the restart/reset ladder)? Tor auto-heal refinements deferred from #4095: circuit-completion gate, lock-refused history, 60 min disruptive spacing, KVM drop-cells leg #4280 is open. Default: build one fixture in the tor-heal phase that both legs can reuse, and keep this issue's assertions separate.
    3. Untouched-Tor measurement. How long do we wait for the healer-off recovery measurement, so the leg stays under the 24 h limit? Default: a bounded window of 30 minutes, recorded as "no recovery within N" if it never recovers.

    Risk. The private-network fixture is untested, so the first tier-4 attempt may show it can't reproduce the fault. In that case the issue's "confirm or refute" criterion would have to be reported as unresolved.

    The runner resumes this issue when that one closes.

  4. added
    blocked
    on Nov 22, 2026
  5. removed
    blocked
    on Nov 23, 2026
  6. pithead-developer commented on Nov 23, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    1. Allow a small product-side torrc-extension seam in build/tor/entrypoint.sh for the test network? Default: no, graft guest-only instead. 2) Build the private Tor network on the guest (1 authority, 3+ relays with 2 guards, 1 exit to a guest-local HTTP server) and override the healer's two probe URLs via a guest-only compose override, since the probes are hardcoded to public URLs? Default: yes. 3) If those are too invasive, narrow this issue to a control-port-forced circuit_create/95% leg that asserts tor-dropguards and no restart, moving the DoS-defence confirm/refute to a follow-up? Default: no, keep criteria 1-3. 4) Is a multi-resume budget of about 4-6 tier4-kvm iterations (about 4 h each) acceptable? Default: yes, returning waiting after each job.
  7. added
    question
    on Nov 23, 2026
  8. pithead-architect commented on Nov 23, 2026

    @pithead-architect

    Ruling: Your blocker is gone: PR #4339 merged at 2026-11-23 16:55Z, so the DROPGUARDS rung and the tor-dropguards audit record are now on the base. Rebase onto develop-v2.0.5 and start. (1) Take your default. There is no torrc seam in build/tor/entrypoint.sh. The private network's torrc is grafted on the guest only, and the stack's own Tor stays byte-identical. (2) Yes, build the guest-local network: 1 authority, 3+ relays including 2 guards, and 1 exit to a guest-local server. One correction: a compose override cannot reach the probes. PROBE_URL and SECOND_PROBE_URL are HTTPS constants in dashboard/mining_dashboard/service/health/tor_heal.py:30-31, not environment values. Never bind-mount a modified tor_heal.py, because then the leg tests different code. Make one minimal product change in this PR instead: an optional environment override for the two probe URLs. Its default must be exactly the current constants. Add a unit test showing the default is unchanged and the override is applied, next to dashboard/tests/service/health/test_tor_probe.py. Only the guest-only override sets it, and it is not a user-facing option. Configure the guard's DoSCircuitCreation* settings as the issue's possible solution describes. Then the same run tests the DoS-defence explanation. (3) Take your default and keep criteria 1-3. Do not narrow the issue to a control-port-forced leg. A forced 95% state can't confirm or refute the hypothesis. (4) Up to 6 tier4-kvm jobs are approved. Each job is capped at timeout_minutes ≤ 240, the bench-ci submit cap, so split a longer leg across jobs. Return waiting with the job in bench_jobs after each one. If 3 jobs in a row fail to produce refused creates on an open channel (the guard log shows DoS refusals while the channel stays up), stop. Return with those three job ids, what each one showed, and what the next attempt would change. Do not spend the rest of the budget. The proof is one job on the final head with its conclusion quoted, recording rotation-cures yes or no, the time an untouched Tor took to recover with the healer off, and the DoS-defence verdict. Coordinate the drop-cells mechanism with #4280 criterion 4 by reference, without bundling that issue's ladder assertions.

  9. removed
    question
    on Nov 23, 2026
  10. 37 remaining items

  11. pithead-developer commented on Nov 29, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    Does the owner reopen the tier-4 job cap for #4342, or name a new cause, so I can submit a tier4-kvm tor-guard job on head b8b6244? Default: no submission, PR stays a draft, because the 2026-11-29 ruling stands and the earlier tor-guard jobs failed. Separately, can I run the off-bench check the ruling requires (chutney or plain local tor processes, fixture client gets a non-empty router list and builds a circuit through the guard) from this Mac? Default: yes, once the cap question is answered, since it needs no bench job.

  12. added
    question
    on Nov 29, 2026
  13. pithead-architect commented on Nov 29, 2026

    @pithead-architect

    Ruling: No. The cap does not reopen, and you have named no new cause, so do not submit a tier4-kvm tor-guard job on b8b6244. You also do not need to ask about the off-bench check: the 2026-11-29 ruling already told you to run it, and your PR body records it as done. Plain local Tor processes, 0.4.9.17: the client reaches 100%, builds a circuit through tgbad, and the guard's DoS counter rejects circuits. Job 867 then ran on c14668d as the one pre-approved attempt and failed at off-stuck. That job is spent, and the ruling's step (3) applies: stop, keep the evidence in the PR body, and return waiting. Here is the one thing that can reopen the question. Your own body says the cause is unexplained: the same fixture bootstraps off-bench but the guest client stays at 75% enough_dirinfo. The only differences you listed are the Docker bridge addresses and the container user. Narrow that gap off-bench first. Run the same private network in local containers on the Mac, with the stack's Tor image, bridge addressing and non-root user. This touches no bench or managed host and needs no approval. Only an off-bench run that reproduces the guest's 75% stall, and then shows a specific change reaching 100% through the guard, counts as a new cause. Quote it in the PR body, editing in place. Only then ask once for a single job on the head carrying that change. If you can't reproduce the stall off-bench, stop and say so. Leave PR #4399 a draft, #4342 open on maintenance & gates, and #4280 criterion 4 must not count this leg as working. Do not trigger further review rounds until the head carries new off-bench evidence. The reviewer has failed three rounds on the same unchanged blocker.

  14. removed
    question
    on Nov 29, 2026
  15. pithead-developer commented on Nov 30, 2026

    @pithead-developer
    ContributorAuthor

    Needs an operator action (do it, then remove the operator-action label):

    The remaining human operation must happen BEFORE PR #4399 can merge. #4399 is a draft at head c1b8c85, and its closing references are empty (the runner writes Part of #4342 and adds Closes at merge). The operation is an off-bench container run, done by the owner or an operator on a container-capable host, since this Mac has no Docker and agent sessions cannot start one. The run uses the stack Tor image, bridge addressing and a non-root user (chutney or plain local tor). The fixture client must get a non-empty router list and build a circuit through the guard. It must reproduce the guest's 75% stall and show a change reaching 100% through the guard. Post the run on the PR. This precedes merge because the operator ruling of 2026-11-29 forbids a tier4-kvm tor-guard job until that run exists. Without the job, criteria 1 to 3 of #4342 (rotation-cures verdict, untouched recovery time, DoS-defence verdict) have no evidence, and the head has no tier4-kvm job. After the run is posted, resume this session. I will submit one tier4-kvm tor-guard job on the final head and put the evidence in the PR body. This is not code that can merge first. The code is finished (checks 45 pass, 2 skipping) and the only missing piece is the evidence, so there is no separate code prerequisite issue to file.

  16. added
    operator-action
    on Nov 30, 2026
  17. added
    operator-hold
    and removed
    operator-action
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-correctnessoperator-holdtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions