Skip to content

testing: "B.Loop called with timer stopped" regression in 1.24.2 #73150

@jakebailey

Description

@jakebailey

Go version

go version go1.24.2 linux/amd64

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/jabaile/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/jabaile/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build515752239=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/jabaile/work/TypeScript-go/go.mod'
GOMODCACHE='/home/jabaile/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/jabaile/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/jabaile/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24.2'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

$ git clone --depth=1 https://github.com/microsoft/typescript-go.git
$ cd typescript-go
$ go test -run=- -bench=BenchmarkGetNormalizedAbsolutePath -benchtime=1x ./internal/tspath

What did you see happen?

$ go1.24.2 test -run=- -bench=BenchmarkGetNormalizedAbsolutePath -benchtime=1x ./internal/tspath
--- FAIL: BenchmarkGetNormalizedAbsolutePath/non-normalized_inputs/GetNormalizedAbsolutePath
    benchmark.go:417: B.Loop called with timer stopped
--- FAIL: BenchmarkGetNormalizedAbsolutePath/non-normalized_inputs/GetNormalizedAbsolutePath_(old)
    benchmark.go:417: B.Loop called with timer stopped
--- FAIL: BenchmarkGetNormalizedAbsolutePath/non-normalized_inputs
--- FAIL: BenchmarkGetNormalizedAbsolutePath/normalized_inputs/GetNormalizedAbsolutePath
    benchmark.go:417: B.Loop called with timer stopped
--- FAIL: BenchmarkGetNormalizedAbsolutePath/normalized_inputs/GetNormalizedAbsolutePath_(old)
    benchmark.go:417: B.Loop called with timer stopped
--- FAIL: BenchmarkGetNormalizedAbsolutePath/normalized_inputs
--- FAIL: BenchmarkGetNormalizedAbsolutePath/normalized_inputs_(long)/GetNormalizedAbsolutePath
    benchmark.go:417: B.Loop called with timer stopped
--- FAIL: BenchmarkGetNormalizedAbsolutePath/normalized_inputs_(long)/GetNormalizedAbsolutePath_(old)
    benchmark.go:417: B.Loop called with timer stopped
--- FAIL: BenchmarkGetNormalizedAbsolutePath/normalized_inputs_(long)
--- FAIL: BenchmarkGetNormalizedAbsolutePath
FAIL
exit status 1
FAIL    github.com/microsoft/typescript-go/internal/tspath      0.009s
FAIL

What did you expect to see?

$ go1.24.1 test -run=- -bench=BenchmarkGetNormalizedAbsolutePath -benchtime=1x ./internal/tspath
goos: linux
goarch: amd64
pkg: github.com/microsoft/typescript-go/internal/tspath
cpu: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
BenchmarkGetNormalizedAbsolutePath/non-normalized_inputs/GetNormalizedAbsolutePath-20                  1              1461 ns/op               0 B/op          0 allocs/op
BenchmarkGetNormalizedAbsolutePath/non-normalized_inputs/GetNormalizedAbsolutePath_(old)-20            1             11891 ns/op              96 B/op          5 allocs/op
BenchmarkGetNormalizedAbsolutePath/normalized_inputs/GetNormalizedAbsolutePath-20                      1              1252 ns/op               0 B/op          0 allocs/op
BenchmarkGetNormalizedAbsolutePath/normalized_inputs/GetNormalizedAbsolutePath_(old)-20                1             10325 ns/op             240 B/op          9 allocs/op
BenchmarkGetNormalizedAbsolutePath/normalized_inputs_(long)/GetNormalizedAbsolutePath-20               1              1147 ns/op               0 B/op          0 allocs/op
BenchmarkGetNormalizedAbsolutePath/normalized_inputs_(long)/GetNormalizedAbsolutePath_(old)-20                 1             12934 ns/op            2080 B/op         12 allocs/op
PASS
ok      github.com/microsoft/typescript-go/internal/tspath      0.010s

The -benchtime=1x doesn't affect anything; removing it shows the same problem (just slower).

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