-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
After upgrading to go1.25.7, we're seeing failures like this one:
https://github.com/ava-labs/avalanchego/actions/runs/21972259848/job/63476193719
goroutine 47097 gp=0xc00b2268c0 m=0 mp=0x102708300 [running]:
runtime.sigpanic()
/Users/runner/hostedtoolcache/go/1.25.7/arm64/src/runtime/signal_unix.go:906 +0x35c fp=0x16fb3d950 sp=0x16fb3d950 pc=0x1003415bc
runtime: g 47097: unexpected return pc for runtime.sigpanic called from 0x10140af84
stack: frame={sp:0x16fb3d950, fp:0x16fb3d950} stack=[0xc0215f4000,0xc0215f5000)
created by github.com/ava-labs/firewood-go-ethhash/ffi.(*Database).Close in goroutine 47117
/Users/runner/go/pkg/mod/github.com/ava-labs/firewood-go-ethhash/ffi@v0.1.0/firewood.go:436 +0xa4
goroutine 1 gp=0xc0000021c0 m=nil [chan receive]:
Also there are instances of stack overflow:
runtime: newstack sp=0x16fb3d950 stack=[0xc0215f4000, 0xc0215f5000]
morebuf={pc:0x10140af84 sp:0x16fb3d950 lr:0x0}
sched={pc:0x1003415bc sp:0x16fb3d950 lr:0x10140af84 ctxt:0x0}
runtime: gp=0xc00b2268c0, goid=47097, gp->status=0x2
runtime: split stack overflow: 0x16fb3d950 < 0xc0215f4000
fatal error: runtime: split stack overflow
runtime stack:
runtime.throw({0x1015e6c93?, 0xc01477c000?})
Likely related to the slice changes which amplify the effect of pointer provenance issues. From the release notes:
Faster slices¶
The compiler can now allocate the backing store for slices on the stack in more situations, which improves performance. This change has the potential to amplify the effects of incorrect unsafe.Pointer usage, see for example issue 73199. In order to track down these problems, the bisect tool can be used to find the allocation causing trouble using the -compile=variablemake flag. All such new stack allocations can also be turned off using -gcflags=all=-d=variablemakehash=n.
Reactions are currently unavailable
Pinned by demosdemon
Pinned comment options
Managed to get a semi-reproducible seed: https://github.com/ava-labs/avalanchego/actions/runs/22597064923/job/65469683568#step:4:128
my build and reproduction steps:
declare -ra GRAFT_DIRS=(coreth subnet-evm)
cd ~/src
git clone https://github.com/ava-labs/avalanchego
cd avalanchego
git checkout alarso16/diagnose-firewood-v0.2.0 #(167ec085b858be94a7c5a67083e78f594d11981a)
function @build-all-race() {
for dir in "${GRAFT_DIRS[@]}"; do (
set -euxo pipefail
go clean -x -cache -testcache -modcache -fuzzcache
go test -x -c -race github.com/ava-labs/avalanchego/graft/${dir}/core
mv -v ./core.test ./${dir}-core.test
nm ./${dir}-core.test | rustfilt > ../avalanchego-${dir}-…Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working