[W-2] Unsynchronized w.mints map mutation can crash tollgate-wrt (fatal concurrent map write)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
Research direction
Start by checking whether w.mints is still accessed without w.mu on current upstream main: look at AddMint in wallet/wallet.go around line 209, the 60s payout ticker iteration around line 224, and getActiveKeyset in keyset.go around lines 248 and 259. Done means either confirming that the unguarded access is gone, or guarding all of these accesses with w.mu and showing that a concurrent test passes under go test -race.
Written by the indexing model from the issue text.
Description
Migrated from Amperstrand/tollgate-module-basic-go#71 as part of the fork retirement — OpenTollGate/tollgate-module-basic-go is the single source of truth; the fork issue carries the original discussion and any lab evidence. Retirement plan: #758.]
Fatal concurrent map write panic in tollgate-wrt. The w.mints map is mutated without lock protection in wallet/wallet.go:209 (AddMint) and keyset.go:248,259 (getActiveKeyset) while the 60s payout ticker iterates it at wallet.go:224 and concurrent receives read it. This triggers fatal error: concurrent map iteration and map write, which is unrecoverable and crashes the daemon.
Trigger: two clients paying different mints concurrently, or payment racing keyset rotation.
Fix: Guard with existing w.mu mutex.
Evidence: /home/ubuntu/src/tollgate_audit_report_2026-08-26.md §7, line 120
File references: wallet/wallet.go:209, keyset.go:248,259, wallet.go:224
Migrated 2026-10-09. Applicability to current upstream main (4614ac2, post-rc1) was not re-verified during migration — confirming whether the finding still reproduces upstream is this issue's first task.
- Dominant language
- Go
- Stars
- 12
- Forks
- 14
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 240
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenTollGate/tollgate-module-basic-go
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenTollGate/tollgate-module-basic-go#833 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OpenTollGate/tollgate-module-basic-go#813 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenTollGate/tollgate-module-basic-go#804 ·
Maintainers usually reply within 1 day
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)Possibly taken @Amperstrand claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#726 · 2 comments ·
Maintainers usually reply within 1 day
-
rebrand-literal-gutter: uhttpd section-vocabulary check trips on a COMMENT (uhttpd.luci in 92-tollgate-admin-setup:178)Possibly taken @Amperstrand claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
Maintainers usually reply within 1 day
All issues in OpenTollGate/tollgate-module-basic-go
Similar issues
-
Action Required: Fix Renovate ConfigurationPossibly taken @thompson-tomo claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 78/100
open-telemetry/opentelemetry-collector#16170 ·
Maintainers usually reply within 1 day
-
automation awf compiler specifications
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
state:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
puppe1990/amarra-cais#342 ·
Maintainers usually reply within 1 day
-
replay: a run cancelled during environment setup is logged as an ERROR (Instrument drops the cancellation)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day