Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Document false -race failures with Go 1.26.0 on Windows

Chiusa Adatta ai principianti
#103 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
documentation

Direzione di ricerca

Inizia da CONTRIBUTING e dal Developer Guide, le due posizioni della documentazione per i contributori indicate nell’issue. Spiega che Windows Go 1.26.0 può causare falsi fallimenti dei test race e documenta il comando suggerito con Go 1.26.3 o versioni successive: GOTOOLCHAIN=go1.26.3 go test -race ./.... Il lavoro è concluso quando entrambi i documenti per i contributori spiegano il problema e come evitarlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

documentation testing

Why it matters

Contributors on Windows running Go 1.26.0 get -race failures that are not bugs in subenum. Without a note, they will spend time chasing races that do not exist, as happened while #76 was developed.

Evidence

On Windows with go1.26.0, go test -race -count=10 intermittently fails on an untouched main:

  • internal/scan: "WARNING: DATA RACE" between context.WithTimeout (called from internal/dns/resolver.go:277) and the net package's DNS lookup goroutine (net/dnsclient_unix.go:677). The two stack traces touch the same address from unrelated objects. TestPoolBenchesDeadResolver fails with it.
  • The root package's e2e tests: Exception 0xc0000005 crashes with a garbage PC inside scan.Run's deferred-call return.

With GOTOOLCHAIN=go1.26.3, the same runs are clean (30 runs each of internal/scan and the lab e2e tests). CI runs -race on Linux and is not affected.

Suggested approach

  • Add a note to CONTRIBUTING and the Developer Guide: on Windows, run race tests with Go 1.26.3 or later (GOTOOLCHAIN=go1.26.3 go test -race ./...).
  • Keep the go 1.26.0 directive in go.mod, which CI requires. Optionally add a toolchain go1.26.3 line, if the "Check go directive" step allows it.

Done when

The contributor docs explain the false positives and how to avoid them.

Lingua principale
Go
Stelle
1
Fork
1
Merge medio
5g 2h
PR unite (30g)
3

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TMHSDigital/subenum

Tutte le issue di TMHSDigital/subenum

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.