Full-package go test -race stalls non-deterministically (pre-existing, host-side?) #19

Closed
opened 2026-11-09 17:27:25 +00:00 by andrew · 1 comment
Collaborator

Symptom: go test -race ./internal/http (the full package, as make test runs it) stalls non-deterministically until the timeout on the dev host. The victim test varies per run (TestPageHierarchy, TestPageBacklinksAndEmbeds, TestCollectionRevocationReachesItems observed); the timeout dump shows a bcrypt goroutine (signup) runnable but not progressing, and an unusually small live-goroutine set. No DATA RACE warnings are printed.

Not new, not feature-specific: reproduced identically on a clean worktree at 1ef11f3 (1.2.6, before the outbound-MCP work and the go-sdk/jwt dependency bump). The same package passes without -race (~105s), and passes with -race when run as single tests or pairs. The Nov 3 full -race run passed (356s), so this appeared or worsened around Nov 4-6 — same window as the CI runner breakage in #18; possibly related host/runtime state rather than repo content.

Why it matters: make test and the (currently broken, #18) CI gate both use -race; a stall that only shows on the full package makes the gate flaky-blind.

Observed matrix (dev host, 24 cores, postgres 16.15 container):

  • full package, no -race: pass ~105s
  • full package, -race: stall 3 of 4 runs (timeouts 100-300s)
  • single tests / pairs, -race: pass
  • clean 1.2.6 worktree, full package, -race: stall (proves pre-existing)

Next diagnostics when someone picks this up: run with GOMAXPROCS=4 and -race to see if it is scheduler-load related; strace the stalled bcrypt goroutine's thread; check host CPU frequency/thermal state and cgroup quotas during a stall; bisect the x/crypto vs jwt bump by pinning each back on a clean tree.

**Symptom:** `go test -race ./internal/http` (the full package, as `make test` runs it) stalls non-deterministically until the timeout on the dev host. The victim test varies per run (TestPageHierarchy, TestPageBacklinksAndEmbeds, TestCollectionRevocationReachesItems observed); the timeout dump shows a bcrypt goroutine (signup) runnable but not progressing, and an unusually small live-goroutine set. No DATA RACE warnings are printed. **Not new, not feature-specific:** reproduced identically on a clean worktree at 1ef11f3 (1.2.6, before the outbound-MCP work and the go-sdk/jwt dependency bump). The same package passes without -race (~105s), and passes with -race when run as single tests or pairs. The Nov 3 full -race run passed (356s), so this appeared or worsened around Nov 4-6 — same window as the CI runner breakage in #18; possibly related host/runtime state rather than repo content. **Why it matters:** `make test` and the (currently broken, #18) CI gate both use -race; a stall that only shows on the full package makes the gate flaky-blind. **Observed matrix (dev host, 24 cores, postgres 16.15 container):** - full package, no -race: pass ~105s - full package, -race: stall 3 of 4 runs (timeouts 100-300s) - single tests / pairs, -race: pass - clean 1.2.6 worktree, full package, -race: stall (proves pre-existing) **Next diagnostics when someone picks this up:** run with GOMAXPROCS=4 and -race to see if it is scheduler-load related; strace the stalled bcrypt goroutine's thread; check host CPU frequency/thermal state and cgroup quotas during a stall; bisect the x/crypto vs jwt bump by pinning each back on a clean tree.
Author
Collaborator

Closed 2026-11-22: issue tracking has moved off Gitea. Findings and status are preserved in the local project report.

Closed 2026-11-22: issue tracking has moved off Gitea. Findings and status are preserved in the local project report.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Federated_Computer/superbrain#19