Skip to content

cmd/link: fingerprint mismatch when running tests with PGO and coverage #80891

Open

Description

@astrophena

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

$ go version
go version go1.26.6-X:nodwarf5 linux/amd64

Does this issue reproduce with the latest release?

Yes. Reproduced both on Arch Linux package and official Go distribution.

Also reproduced on gotip:

$ gotip version
go version go1.28-devel_372c766c Fri Aug 14 21:00:55 2026 -0700 linux/amd64
$ gotip test -cover ./cmd/tgfeed ./cmd/tgfeed/internal/sender
# go.astrophena.name/tools/cmd/tgfeed.test
/home/astrophena/sdk/gotip/pkg/tool/linux_amd64/link: fingerprint mismatch: go.astrophena.name/tools/cmd/tgfeed/internal/sender has bc5deceff2910599, import from go.astrophena.name/tools/cmd/tgfeed expecting 2e75f5eee2541f0b
FAIL    go.astrophena.name/tools/cmd/tgfeed [build failed]
?       go.astrophena.name/tools/cmd/tgfeed/internal/sender     [no test files]
FAIL

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

go env Output
$ go env
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='/home/astrophena/local/bin'
GOCACHE='/home/astrophena/local/cache/go/cache'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/astrophena/code/prefs/go/env'
GOEXE=''
GOEXPERIMENT='nodwarf5'
GOFIPS140='off'
GOFLAGS='-modcacherw'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1205003816=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/astrophena/code/tools/go.mod'
GOMODCACHE='/home/astrophena/local/cache/go/mod'
GONOPROXY='go.home.astrophena.name/*'
GONOSUMDB='go.home.astrophena.name/*'
GOOS='linux'
GOPATH='/home/astrophena/local/data/go'
GOPRIVATE='go.home.astrophena.name/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='off'
GOTELEMETRYDIR='/home/astrophena/code/prefs/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.26.6-X:nodwarf5'
GOWORK=''
PKG_CONFIG='pkg-config'
uname -sr: Linux 7.1.8-arch1-3
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.44.
gdb --version: GNU gdb (GDB) 17.2

What did you do?

Tried to run tests on one of my repos, where I have PGO profile in one of the programs:

$ git clone https://github.com/astrophena/tools
$ git checkout f483f21
$ cd tools

# Fails.
$ go test -cover ./cmd/tgfeed ./cmd/tgfeed/internal/sender

# Both pass.
$ go test -cover -pgo=off ./cmd/tgfeed ./cmd/tgfeed/internal/sender
$ go test -cover -pgo=cmd/tgfeed/default.pgo ./cmd/tgfeed ./cmd/tgfeed/internal/sender

What did you expect to see?

ok      go.astrophena.name/tools/cmd/tgfeed     0.041s  coverage: 77.9% of statements
?       go.astrophena.name/tools/cmd/tgfeed/internal/sender     [no test files]

What did you see instead?

# go.astrophena.name/tools/cmd/tgfeed.test
/usr/lib/go/pkg/tool/linux_amd64/link: fingerprint mismatch: go.astrophena.name/tools/cmd/tgfeed/internal/sender has 3b958f7fcb68ee9a, import from go.astrophena.name/tools/cmd/tgfeed expecting ff682270e9bfc225
FAIL    go.astrophena.name/tools/cmd/tgfeed [build failed]
?       go.astrophena.name/tools/cmd/tgfeed/internal/sender     [no test files]
FAIL

May be related to #61376.

Activity

  1. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Aug 18, 2026
  2. added a commit that references this issue on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions