Repository navigation
Open
5 / 55 of 5 issues completedOpen
5 / 55 of 5 issues completed
Copy link
Description
What's the problem
On the owner's production appliance (v2.0.2), the Tor client wedged on 2026-11-11 and stayed wedged for more than 15 hours. Over that time the Monero node had no peers, and nothing on the box recovered it.
- 09:27:30Z: monerod logged "monerod is now disconnected from the network" and froze at its height. By 11-12 00:30Z it was about 480 blocks behind. Three brief reconnects (14:42, 16:06 and 19:43Z) each started a sync and dropped within 1–2 minutes.
- Tor at 11-12 00:24 and 00:34Z:
- "We'd like to launch a circuit to handle a connection, but we already have 32 general-purpose client circuits pending", with 24,039 and then 25,136 similar messages suppressed per 11 minutes;
- a continuous storm of "Giving up on launching a rendezvous circuit";
- "No more HSDir available to query";
- "All current guards excluded by path restriction type 2".
- The dashboard logged "Tor clearnet egress failed for 883 minutes" and requested NEWNYM. The host control runner rejected it ("NEWNYM budget or cooldown"). That NEWNYM-then-reject cycle repeated every ~35–40 minutes all day. tor auto-heal never escalated to a Tor restart.
- The same signature hit a bench primary on 2026-09-26. It was cured by restarting tor and then the node, so this is the second occurrence.
Two CI nodes running the same Tor-only stack over the same 20-hour window logged no rendezvous give-ups and at most one pending-circuit line, and stayed synced. So this was the appliance's Tor client, not the Tor network.
What it impacts
- Mining revenue: about 15 hours of the owner's whole fleet, about 250 kH/s. See the companion issue on serving stale work.
- Alerting: Telegram notifications go through Tor, so the node-down alert could not leave the box. The only signal was Healthchecks going quiet (DOWN 09:47–12:24 and 12:42–13:32Z).
- Every appliance with
tor.auto_heal: true: the healer's NEWNYM budget runs out, and it has no next step.
How I found it
- Owner reports and pasted logs: the owner pasted the dashboard's per-service recent logs on 2026-11-12 ~00:35Z: monerod, tor, P2Pool, xmrig-proxy, tari and the dashboard, plus the audit log of tor-heal actions.
- CI comparison: the same counts on two CI nodes over the same window.
- Rig journals: found earlier for Let appliance owners download a redacted support bundle of past logs from the dashboard, and log why health pings fail #4032, they show a ~5-second stratum reconnect to the appliance at ~09:26Z, a minute before monerod disconnected.
- Unknown: what happened on the box at 09:26–09:27Z. The appliance journal is not retrievable today (Let appliance owners download a redacted support bundle of past logs from the dashboard, and log why health pings fail #4032).
How important is it
High. It recurs, it is silent (the dashboard shows hashrate and green Tor-only egress while the node is offline), and it costs every hash until a human notices and restarts by hand.
Acceptance criteria
- The 09:26–09:27Z trigger is identified from the appliance journal and Tor state, or documented as not recoverable, naming what to capture next time.
- When Tor clearnet egress has failed for longer than a bounded window and NEWNYM is rejected or does not help, auto-heal escalates to a Tor restart, with a cooldown and a cap per day. It then re-dials monerod (
restart monerod) if monerod stays peerless or out of sync. - A saturated client ("circuits pending" at the limit) is detected directly and counts as unhealthy for that escalation.
- A fault-injection test (KVM or stack) reproduces a wedged or saturated Tor client and proves the stack returns to a synced node without a human, within the bounded window.
- When Tor egress is down, at least one alert path that does not depend on Tor reaches the owner: a dashboard banner naming "Monero node offline", and the Healthchecks dead-man behaviour documented as the backstop.
- On a Tor failure, the support bundle (Let appliance owners download a redacted support bundle of past logs from the dashboard, and log why health pings fail #4032) captures Tor's bootstrap, guard and circuit state.
Possible solutions
- An escalation ladder in tor-heal: NEWNYM, then a Tor reload or guard reset, then a Tor container restart, each gated on the egress probe staying failed. Also a monerod re-dial after Tor recovers.
- Read
GETINFO status/circuit-establishedand the pending-circuit count over the control port as a health signal, rather than relying only on the HTTP egress probes. - Check whether P2Pool and Tari onion-peer churn (rendezvous attempts) is driving the saturation, and whether
MaxClientCircuitsPendingor per-client limits help. - Unknown: whether this is cause or effect. The rendezvous storm may be a symptom of a dead guard or HSDir view rather than its trigger.
Private evidence (raw logs, addresses) is kept by the operator, outside GitHub.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 5 sub-issues
Metadata
Metadata
Assignees
Labels
trackerAn umbrella or roadmap issue with no code change of its own; the runner never picks it
Activity
pithead-developer commentedon Nov 12, 2026
Lead from the post-reboot logs (2026-11-12): after a clean restart, Tor reached "Bootstrapped 100%" at 00:40:38 and logged "32 general-purpose client circuits pending" 12 seconds later. The Tor render runs monerod with
out-peers=48(config.reference.jsonmonero.out_peers: 48; the clearnet render uses 32). Tor's defaultMaxClientCircuitsPendingis 32. With Tari and P2Pool onion peers also dialing, a fresh boot already sits at the pending-circuit ceiling. That makes a slow guard or HSDir hiccup the likely tipping point into the wedge. Worth testing: out-peers 16–24 over Tor, and/or a raised MaxClientCircuitsPending, under the fault-injection test this issue asks for.pithead-developer commentedon Nov 12, 2026
Owner direction (2026-11-12): this is a project-breaking failure. v2.0.4 must ship automated fixes, guard rails and heavy testing for it. This issue, #4046, the config-debt rows of #4047, and #4032 are now
release-blockerfor v2.0.4.A second failure mode, found tonight on a CI pithead (the fleet's backup pool, on the 2.0.3 cut):
docker restart p2poolis the manual cure (verification in progress).What "done" must include beyond the acceptance criteria above:
pithead-developer commentedon Nov 12, 2026
Confirmed again tonight on the backup pool: a manual Tor restart (
./pithead restart tor) left monerod disconnected from the network ("monerod is now disconnected" 3 seconds later). It did not reconnect for 14 minutes, until./pithead restart monerod. Its chain froze at one height meanwhile, while it kept serving work to 6 rigs. Acceptance addition for the ladder: every Tor restart, manual or automatic, is followed by a monerod re-dial once Tor reports a circuit, and the guard from #4046 covers the gap.pithead-developer commentedon Nov 12, 2026
Investigation summary (2026-11-12)
Scope: the production appliance (v2.0.2, Tor 0.4.9.14) and a CI Pithead (2.0.3, Tor 0.4.9.15). Read-only investigation; nothing was changed on any host.
What happened
statefile aside gave 100% in 3 s, and restarting monerod resynced it in seconds.Verified
tor-recover) but only fires on an exact "saturated state" signature plus a 6 h cooldown; the production evidence did not show that signature.--no-dnsand no rendered--addpeers.Inferred or open
v2.0.4 plan
Must-have:
.ziplog bundle download (newdiag-bundlehost verb, redacted, byte-capped, includes Tor/monerod/doctor/audit data, excludes keys and wallet logs; prune and download route like the backup download) plus persistent Tor/monerod logs.Should-have: #4047 doctor/dashboard rows (onion reachability, P2Pool peers and private-sidechain detection, pending circuits); #4048 per-row "serving" truth; non-Tor alert ping on stale tip; circuit cap and SOCKS isolation tuning;
--addpeersseeds; Tor version pin.Test plan
Fault injection in KVM and e2e: NEWNYM budget exhausted, bootstrap stuck at 95%, onion-only failure, external Tor restart stranding monerod, pending-circuit saturation, P2Pool peer loss, stale-tip shedding (with and without the external reference), log bundle integrity/redaction/size, Tor-independent alerting; then a 72 h soak with repeated random Tor state corruption, and a Tor 0.4.9.14 vs 0.4.9.15 regression.
Verified by hand: in
dashboard/mining_dashboard/service/health/tor_heal.pya non-applied NEWNYM result callsrefund_attempt(), soMAX_ATTEMPTS = 3("two circuit refreshes, then one container restart") is never reached while the host keeps rejecting NEWNYM.pithead-developer commentedon Nov 12, 2026
Recovery data point (2026-11-12): on the CI Pithead now serving the fleet, P2Pool rejoined the public mini sidechain at 01:31:12Z. That was ~16 minutes after a fresh-state Tor restart and a P2Pool restart (01:15Z), with no other change. "No more HSDir available" lines continued at a reduced rate (1–5/min, down from a constant storm), so onion lookups were degraded but partly succeeding. This fits a transient onion-side degradation combined with stale client state, and argues for a heal that keeps retrying P2Pool peering with backoff rather than giving up.
pithead-architect commentedon Nov 13, 2026
A local session judged this too big for one local session (Too big for one local session: the owner's 2026-11-12 direction makes this issue three failure-mode auto-heal watchdogs (Tor ladder, monerod re-dial/peerless, P2Pool zero-peer) plus a Tor config guard rail and a non-Tor alert path, spanning dashboard Python, host control verbs, build templates and f). The runner filed 5 chunks as sub-issues and marked this issue a tracker, so it is not picked again:
pithead-developer commentedon Nov 16, 2026
Owner ruling 2026-11-16 (2.0.4 scope review, "all as recommended"): for 2.0.4 this tracker closes when #4075 lands. The #4076 remainder (height-stall trigger and shared limits) moved to v2.0.5, and its re-dial and peerless watchdog are already merged (#4093).
pithead-developer commentedon Nov 17, 2026
Related evidence from bench-ci#2193: tier4-e2e job 4214@6097fa47e4bb23e059a157dc8980549a2511000d (fault-injection) lost its mining witness because the dashboard stopped xmrig-proxy at 10:00:17 UTC, logging 'Monero node has 0 outgoing peers for 10 min'. monerod had been restarted at 09:40:50 and never obtained a peer through Tor in that window; the dashboard's own monerod re-dial followed at 10:06:46. Same peerless-Monero-over-Tor family; no new issue filed.
pithead-architect commentedon Nov 21, 2026
The fix, the Tor auto-heal ladder in #4095, merged to develop on 2026-11-21 and ships in 2.0.4. What remains is the owner checking it on prod after 2.0.4 is installed, so this now waits on the release gate #4302 rather than gating it, and the release-blocker label is removed.
pithead-architect commentedon Nov 27, 2026
Post-2.0.4 evidence from the production appliance's support bundle (72 h to 2026-11-27). The appliance upgraded to 2.0.4 on 2026-11-26.
tor-newnym, then ator-historyread every 5 minutes. No repeat NEWNYM was sent. Tor was healthy at collection (bootstrap 100, circuit established).lib/pithead/49-control-request-loop.sh:18-23).tor-recoverand notor-heal-exhausted. Both bursts ended before the 30-minute cooldown that the next rung needs (dashboard/mining_dashboard/service/health/tor_heal.py:29,309-321). So this does not show that the ladder advances after a rejected NEWNYM.tor-recover, but the dashboard service log is not in the bundle. It cannot rule out a restart that skippedtor-recover(:316-334). History reads continue only while attempts are open (:277). The bursts probably ended because probes recovered (:133-147, inferred).tor_sockstimeout rows (34 ConnectTimeout, 12 ReadTimeout, 4 Timeout). 40 fall between 06:05 and 07:42 on 2026-11-26, none during the first burst. The other 10 are spread over the next 31 h, and 5 of them follow a later reboot.What it shows: after a rejected NEWNYM the healer kept reading history and sent no repeat NEWNYM, and Tor was healthy again without action by the owner.
What it does not show: that the
tor-recoveror restart rungs work on prod, what each history read returned, or the cause. The bundle has no Tor container log for the window, so the cause is unknown. Still open from #4045's criteria: the trigger, the fault-injection proof, the non-Tor alert path and Tor state captured during a failure. The owner's prod check waits on release gate #4302. Residuals sit in #4280 (lock refusal) and #4261 (onion-only or stale-consensus outages). Not affected by #4572: 2.0.4 has no guard-rotation action.pithead-architect commentedon Nov 27, 2026
Moving this to v2.0.5. The fix shipped in 2.0.4, and the production evidence above shows Tor recovered without the owner's action. The remaining criteria are still open, so this stays open until they are proven: the trigger, the fault-injection proof, the non-Tor alert path, and Tor state captured during a failure. Release gate #4302 is closed with v2.0.4 published.