Skip to content

TestLSAN Test Failure When Running all.bash #76072

@sam-bee

Description

@sam-bee

Go version

Running go1.24.4 linux/amd64, trying to test/compile Go 1.25.x

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/sierra/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/sierra/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1648469716=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/opt/go/go/src/go.mod'
GOMODCACHE='/home/sierra/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/sierra/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go-1.24'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/sierra/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go-1.24/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24.4'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

Issue Description

Following official installation instructions, cannot compile Go using Go 1.24.4 - all.bash compilation script errors because of a test failure.

Affected Versions

Actually running Go 1.24.4. Trying to compile Go 1.25.0 - 1.25.3.

What I Was Doing

Install Go 1.24 using apt. Clone git@github.com:golang/go. Check out go1.25.3 or any other version in 1.25.0-1.25.3. cd src/ then ./all.bash, to try to compile a newer version of Go, as per installation instructions.

Error Message Encountered

[see below]

Hardware & Platform

CPU AMD EPYC 4244P
RAM 64 GB 5200 MHz
Guest OS Ubuntu 25.10
Host OS Proxmox 9
Running in Container? No, this is not in a containerized environment

The original Go 1.24 being used came from apt as golang-go.

What did you see happen?

Error Message Encountered

ok      cmd/cgo/internal/testplugin     0.003s
--- FAIL: TestLSAN (31.24s)
    --- FAIL: TestLSAN/lsan1 (1.05s)
        lsan_test.go:49: /tmp/TestLSANlsan13456417951/001/lsan1
            exit status 1
            Tracer caught signal 11: addr=0x77c302bff000 pc=0x7bc34db60e30 sp=0x77c2fbfd6b40
            ==784039==LeakSanitizer has encountered a fatal error.
            ==784039==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
            ==784039==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
        lsan_test.go:64: output does not contain expected leak error "detected memory leaks"
    --- FAIL: TestLSAN/lsan3 (1.00s)
        lsan_test.go:44: /tmp/TestLSANlsan34137135896/001/lsan3 exited with exit status 1
            Tracer caught signal 11: addr=0x7745915ff000 pc=0x7b45dc560e30 sp=0x77458bfe8b40
            ==784050==LeakSanitizer has encountered a fatal error.
            ==784050==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
            ==784050==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
    --- FAIL: TestLSAN/lsan2 (1.00s)
        lsan_test.go:44: /tmp/TestLSANlsan2565348769/001/lsan2 exited with exit status 1
            Tracer caught signal 11: addr=0x7bc7c95ff000 pc=0x7fc814560e30 sp=0x7bc7c29d6b40
            ==784086==LeakSanitizer has encountered a fatal error.
            ==784086==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
            ==784086==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
FAIL
FAIL    cmd/cgo/internal/testsanitizers 37.253s
ok      cmd/cgo/internal/testshared     0.020s

What did you expect to see?

Expected result: tests pass and then go binary compiles, as per installation instructions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions