Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: race is not supported on windows/386 #57543

Closed
VaibhavArora19 opened this issue Jan 2, 2023 · 4 comments
Closed

cmd/compile: race is not supported on windows/386 #57543

VaibhavArora19 opened this issue Jan 2, 2023 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge

Comments

@VaibhavArora19
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.19.4 windows/386

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\arora\AppData\Local\go-build
set GOENV=C:\Users\arora\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\arora\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\arora\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files (x86)\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files (x86)\Go\pkg\tool\windows_386
set GOVCS=
set GOVERSION=go1.19.4
set GCCGO=gccgo
set GO386=sse2
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\arora\Desktop\learnGo\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m32 -mthreads -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\arora\AppData\Local\Temp\go-build1124495080=/tmp/go-build -gno-record-gcc-switches

What did you do?

I tried testing the race condition using command go run -race main.go

What did you expect to see?

By running this command I should have been able to test the race condition in my go code.

What did you see instead?

I am getting the following in my terminal -race is not supported on windows/386

@VaibhavArora19 VaibhavArora19 changed the title affected/package: runtime: race is not supported on windows/386 Jan 2, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jan 2, 2023
@VaibhavArora19 VaibhavArora19 changed the title runtime: race is not supported on windows/386 cmd/compile: race is not supported on windows/386 Jan 2, 2023
@ALTree
Copy link
Member

ALTree commented Jan 2, 2023

The Go race detector is based on ThreadSanitizer, which does not work on any 32-bit platform since AFAIK it assumes it can reserve huge continuous parts of address space for various things, well beyond what's 32-bits-addressable.

In fact:

Support for 32-bit platforms is problematic and is not planned.

from https://clang.llvm.org/docs/ThreadSanitizer.html. So it's unlikely that the Go race detector will ever work on any 32-bit platform.

@ALTree ALTree closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2023
@VaibhavArora19
Copy link
Author

But I am running go on a 64-bit platform.

@ALTree
Copy link
Member

ALTree commented Jan 2, 2023

go version printing windows/386 means you're using the 32-bit windows toolchain. You'll need to download the 64-bit one.

@VaibhavArora19
Copy link
Author

Yes, turns out I mistakenly installed go in Program Files (x86) which caused this error.
Thanks!

@golang golang locked and limited conversation to collaborators Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants