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

runtime: marked free object in span (freebsd/amd64/go1.20rc1) #57322

Closed
aarzilli opened this issue Dec 15, 2022 · 7 comments
Closed

runtime: marked free object in span (freebsd/amd64/go1.20rc1) #57322

aarzilli opened this issue Dec 15, 2022 · 7 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-FreeBSD WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@aarzilli
Copy link
Contributor

$ go version
go version go1.20rc1 freebsd/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/home/d/.cache/go-build"
GOENV="/usr/home/d/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOINSECURE=""
GOMODCACHE="/usr/home/d/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="freebsd"
GOPATH="/usr/home/d/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/home/d/goroot"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/home/d/goroot/pkg/tool/freebsd_amd64"
GOVCS=""
GOVERSION="go1.20rc1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/usr/home/d/delve/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1531215259=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Got a compiler crash while running delve's tests (which run the compiler a lot with -gcflags='-N -l'):

Error compiling ../../_fixtures/stepintobug.go: exit status 2
runtime: marked free object in span 0x828d6c268, elemsize=32 freeindex=13 (bad use of unsafe.Pointer? try -d=checkptr)
0xc000382000 alloc unmarked
0xc000382020 alloc unmarked
0xc000382040 alloc unmarked
0xc000382060 alloc unmarked
0xc000382080 alloc unmarked
0xc0003820a0 alloc unmarked
0xc0003820c0 alloc unmarked
0xc0003820e0 alloc unmarked
0xc000382100 alloc unmarked
0xc000382120 alloc unmarked
0xc000382140 alloc unmarked
0xc000382160 alloc unmarked
0xc000382180 alloc unmarked
0xc0003821a0 free  unmarked
0xc0003821c0 free  unmarked
0xc0003821e0 free  marked   zombie
0x000000c0003821e0:  0x00c0000a40c00007  0x0000000000000003 
0x000000c0003821f0:  0x000000c0003aa340  0x0000000000000000 
0xc000382200 alloc marked  
0xc000382220 alloc unmarked
0xc000382240 alloc unmarked
0xc000382260 alloc unmarked
0xc000382280 alloc unmarked
0xc0003822a0 alloc unmarked
0xc0003822c0 alloc unmarked
0xc0003822e0 alloc unmarked
0xc000382300 alloc unmarked
0xc000382320 alloc unmarked
0xc000382340 alloc unmarked
0xc000382360 alloc unmarked
0xc000382380 alloc unmarked
0xc0003823a0 alloc unmarked
0xc0003823c0 alloc unmarked
0xc0003823e0 alloc unmarked
0xc000382400 free  unmarked
0xc000382420 free  unmarked
0xc000382440 free  unmarked
0xc000382460 free  unmarked
0xc000382480 free  unmarked
0xc0003824a0 free  unmarked
0xc0003824c0 free  unmarked
0xc0003824e0 free  unmarked
0xc000382500 free  unmarked
0xc000382520 free  unmarked
0xc000382540 free  unmarked
0xc000382560 free  unmarked
0xc000382580 free  unmarked
0xc0003825a0 free  unmarked
0xc0003825c0 free  unmarked
0xc0003825e0 free  unmarked
0xc000382600 free  unmarked
0xc000382620 free  unmarked
0xc000382640 free  unmarked
0xc000382660 free  unmarked
0xc000382680 free  unmarked
0xc0003826a0 free  unmarked
0xc0003826c0 free  unmarked
0xc0003826e0 free  unmarked
0xc000382700 free  unmarked
0xc000382720 free  unmarked
0xc000382740 free  unmarked
0xc000382760 free  unmarked
0xc000382780 free  unmarked
0xc0003827a0 free  unmarked
0xc0003827c0 free  unmarked
0xc0003827e0 free  unmarked
0xc000382800 free  unmarked
0xc000382820 free  unmarked
0xc000382840 free  unmarked
0xc000382860 free  unmarked
0xc000382880 free  unmarked
0xc0003828a0 free  unmarked
0xc0003828c0 free  unmarked
0xc0003828e0 free  unmarked
0xc000382900 free  unmarked
0xc000382920 free  unmarked
0xc000382940 free  unmarked
0xc000382960 free  unmarked
0xc000382980 free  unmarked
0xc0003829a0 free  unmarked
0xc0003829c0 free  unmarked
0xc0003829e0 free  unmarked
0xc000382a00 free  unmarked
0xc000382a20 free  unmarked
0xc000382a40 free  unmarked
0xc000382a60 free  unmarked
0xc000382a80 free  unmarked
0xc000382aa0 free  unmarked
0xc000382ac0 free  unmarked
0xc000382ae0 free  unmarked
0xc000382b00 free  unmarked
0xc000382b20 free  unmarked
0xc000382b40 free  unmarked
0xc000382b60 free  unmarked
0xc000382b80 free  unmarked
0xc000382ba0 free  unmarked
0xc000382bc0 free  unmarked
0xc000382be0 free  unmarked
0xc000382c00 free  unmarked
0xc000382c20 free  unmarked
0xc000382c40 free  unmarked
0xc000382c60 free  unmarked
0xc000382c80 free  unmarked
0xc000382ca0 free  unmarked
0xc000382cc0 free  unmarked
0xc000382ce0 free  unmarked
0xc000382d00 free  unmarked
0xc000382d20 free  unmarked
0xc000382d40 free  unmarked
0xc000382d60 free  unmarked
0xc000382d80 free  unmarked
0xc000382da0 free  unmarked
0xc000382dc0 free  unmarked
0xc000382de0 free  unmarked
0xc000382e00 free  unmarked
0xc000382e20 free  unmarked
0xc000382e40 free  unmarked
0xc000382e60 free  unmarked
0xc000382e80 free  unmarked
0xc000382ea0 free  unmarked
0xc000382ec0 free  unmarked
0xc000382ee0 free  unmarked
0xc000382f00 free  unmarked
0xc000382f20 free  unmarked
0xc000382f40 free  unmarked
0xc000382f60 free  unmarked
0xc000382f80 free  unmarked
0xc000382fa0 free  unmarked
0xc000382fc0 free  unmarked
0xc000382fe0 free  unmarked
0xc000383000 free  unmarked
0xc000383020 free  unmarked
0xc000383040 free  unmarked
0xc000383060 free  unmarked
0xc000383080 free  unmarked
0xc0003830a0 free  unmarked
0xc0003830c0 free  unmarked
0xc0003830e0 free  unmarked
0xc000383100 free  unmarked
0xc000383120 free  unmarked
0xc000383140 free  unmarked
0xc000383160 free  unmarked
0xc000383180 free  unmarked
0xc0003831a0 free  unmarked
0xc0003831c0 free  unmarked
0xc0003831e0 free  unmarked
0xc000383200 free  unmarked
0xc000383220 free  unmarked
0xc000383240 free  unmarked
0xc000383260 free  unmarked
0xc000383280 free  unmarked
0xc0003832a0 free  unmarked
0xc0003832c0 free  unmarked
0xc0003832e0 free  unmarked
0xc000383300 free  unmarked
0xc000383320 free  unmarked
0xc000383340 free  unmarked
0xc000383360 free  unmarked
0xc000383380 free  unmarked
0xc0003833a0 free  unmarked
0xc0003833c0 free  unmarked
0xc0003833e0 free  unmarked
0xc000383400 free  unmarked
0xc000383420 free  unmarked
0xc000383440 free  unmarked
0xc000383460 free  unmarked
0xc000383480 free  unmarked
0xc0003834a0 free  unmarked
0xc0003834c0 free  unmarked
0xc0003834e0 free  unmarked
0xc000383500 free  unmarked
0xc000383520 free  unmarked
0xc000383540 free  unmarked
0xc000383560 free  unmarked
0xc000383580 free  unmarked
0xc0003835a0 free  unmarked
0xc0003835c0 free  unmarked
0xc0003835e0 free  unmarked
0xc000383600 free  unmarked
0xc000383620 free  unmarked
0xc000383640 free  unmarked
0xc000383660 free  unmarked
0xc000383680 free  unmarked
0xc0003836a0 free  unmarked
0xc0003836c0 free  unmarked
0xc0003836e0 free  unmarked
0xc000383700 free  unmarked
0xc000383720 free  unmarked
0xc000383740 free  unmarked
0xc000383760 free  unmarked
0xc000383780 free  unmarked
0xc0003837a0 free  unmarked
0xc0003837c0 free  unmarked
0xc0003837e0 free  unmarked
0xc000383800 free  unmarked
0xc000383820 free  unmarked
0xc000383840 free  unmarked
0xc000383860 free  unmarked
0xc000383880 free  unmarked
0xc0003838a0 free  unmarked
0xc0003838c0 free  unmarked
0xc0003838e0 free  unmarked
0xc000383900 free  unmarked
0xc000383920 free  unmarked
0xc000383940 free  unmarked
0xc000383960 free  unmarked
0xc000383980 free  unmarked
0xc0003839a0 free  unmarked
0xc0003839c0 free  unmarked
0xc0003839e0 free  unmarked
0xc000383a00 free  unmarked
0xc000383a20 free  unmarked
0xc000383a40 free  unmarked
0xc000383a60 free  unmarked
0xc000383a80 free  unmarked
0xc000383aa0 free  unmarked
0xc000383ac0 free  unmarked
0xc000383ae0 free  unmarked
0xc000383b00 free  unmarked
0xc000383b20 free  unmarked
0xc000383b40 free  unmarked
0xc000383b60 free  unmarked
0xc000383b80 free  unmarked
0xc000383ba0 free  unmarked
0xc000383bc0 free  unmarked
0xc000383be0 free  unmarked
0xc000383c00 free  unmarked
0xc000383c20 free  unmarked
0xc000383c40 free  unmarked
0xc000383c60 free  unmarked
0xc000383c80 free  unmarked
0xc000383ca0 free  unmarked
0xc000383cc0 free  unmarked
0xc000383ce0 free  unmarked
0xc000383d00 free  unmarked
0xc000383d20 free  unmarked
0xc000383d40 free  unmarked
0xc000383d60 free  unmarked
0xc000383d80 free  unmarked
0xc000383da0 free  unmarked
0xc000383dc0 free  unmarked
0xc000383de0 free  unmarked
0xc000383e00 free  unmarked
0xc000383e20 free  unmarked
0xc000383e40 free  unmarked
0xc000383e60 free  unmarked
0xc000383e80 free  unmarked
0xc000383ea0 free  unmarked
0xc000383ec0 free  unmarked
0xc000383ee0 free  unmarked
0xc000383f00 free  unmarked
0xc000383f20 free  unmarked
0xc000383f40 free  unmarked
0xc000383f60 free  unmarked
0xc000383f80 free  unmarked
0xc000383fa0 free  unmarked
0xc000383fc0 free  unmarked
0xc000383fe0 free  unmarked
fatal error: found pointer to free object

runtime stack:
runtime.throw({0xa4b6e6?, 0xc000382200?})
	/usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0x7fffdfdfc940 sp=0x7fffdfdfc910 pc=0x435cfd
runtime.(*mspan).reportZombies(0x828d6c268)
	/usr/local/go/src/runtime/mgcsweep.go:846 +0x2e5 fp=0x7fffdfdfc9c0 sp=0x7fffdfdfc940 pc=0x4269a5
runtime.(*sweepLocked).sweep(0x7fffdfdfcae8?, 0x0)
	/usr/local/go/src/runtime/mgcsweep.go:629 +0x346 fp=0x7fffdfdfcab0 sp=0x7fffdfdfc9c0 pc=0x425c66
runtime.(*mcentral).uncacheSpan(0x7fffdfdfcb00?, 0x432c85?)
	/usr/local/go/src/runtime/mcentral.go:228 +0xa5 fp=0x7fffdfdfcad8 sp=0x7fffdfdfcab0 pc=0x418a65
runtime.(*mcache).releaseAll(0x801290108)
	/usr/local/go/src/runtime/mcache.go:291 +0x145 fp=0x7fffdfdfcb40 sp=0x7fffdfdfcad8 pc=0x4184c5
runtime.(*mcache).prepareForSweep(0x801290108)
	/usr/local/go/src/runtime/mcache.go:328 +0x39 fp=0x7fffdfdfcb68 sp=0x7fffdfdfcb40 pc=0x4185b9
runtime.acquirep(0xc000032000)
	/usr/local/go/src/runtime/proc.go:5096 +0x2c fp=0x7fffdfdfcb80 sp=0x7fffdfdfcb68 pc=0x442fcc
runtime.stopm()
	/usr/local/go/src/runtime/proc.go:2335 +0xb5 fp=0x7fffdfdfcbb0 sp=0x7fffdfdfcb80 pc=0x43c775
runtime.gcstopm()
	/usr/local/go/src/runtime/proc.go:2616 +0xaa fp=0x7fffdfdfcbd8 sp=0x7fffdfdfcbb0 pc=0x43d30a
runtime.findRunnable()
	/usr/local/go/src/runtime/proc.go:2682 +0x49 fp=0x7fffdfdfcce0 sp=0x7fffdfdfcbd8 pc=0x43d529
runtime.schedule()
	/usr/local/go/src/runtime/proc.go:3360 +0xb1 fp=0x7fffdfdfcd18 sp=0x7fffdfdfcce0 pc=0x43edb1
runtime.goschedImpl(0xc000223860)
	/usr/local/go/src/runtime/proc.go:3526 +0xca fp=0x7fffdfdfcd50 sp=0x7fffdfdfcd18 pc=0x43f3aa
runtime.gopreempt_m(0xe734a8?)
	/usr/local/go/src/runtime/proc.go:3554 +0x55 fp=0x7fffdfdfcd90 sp=0x7fffdfdfcd50 pc=0x43f695
runtime.newstack()
	/usr/local/go/src/runtime/stack.go:1072 +0x3cb fp=0x7fffdfdfcf40 sp=0x7fffdfdfcd90 pc=0x44f08b
runtime.morestack()
	/usr/local/go/src/runtime/asm_amd64.s:574 +0x8b fp=0x7fffdfdfcf48 sp=0x7fffdfdfcf40 pc=0x4655eb

goroutine 1 [semacquire]:
runtime.gopark(0xc000347a20?, 0x20?, 0xa0?, 0x17?, 0x9dd3c0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000189a38 sp=0xc000189a18 pc=0x438976
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:387
runtime.semacquire1(0xc000320e18, 0x30?, 0x1, 0x0, 0x51?)
	/usr/local/go/src/runtime/sema.go:160 +0x20f fp=0xc000189aa0 sp=0xc000189a38 pc=0x44902f
sync.runtime_Semacquire(0xc000337d70?)
	/usr/local/go/src/runtime/sema.go:62 +0x27 fp=0xc000189ad8 sp=0xc000189aa0 pc=0x463787
sync.(*WaitGroup).Wait(0x0?)
	/usr/local/go/src/sync/waitgroup.go:116 +0x4b fp=0xc000189b00 sp=0xc000189ad8 pc=0x4735cb
cmd/go/internal/work.(*Builder).Do(0xc0001ba370, {0xb39b38, 0xc0000000e0}, 0xc00036e000)
	/usr/local/go/src/cmd/go/internal/work/exec.go:220 +0x4ca fp=0xc000189c18 sp=0xc000189b00 pc=0x8cd66a
cmd/go/internal/work.runBuild({0xb39b38, 0xc0000000e0}, 0xc0000284b0?, {0xc0000260f0, 0x1, 0x1})
	/usr/local/go/src/cmd/go/internal/work/build.go:534 +0x7b2 fp=0xc000189d80 sp=0xc000189c18 pc=0x8c6672
main.invoke(0xe4fac0, {0xc000026090, 0x7, 0x7})
	/usr/local/go/src/cmd/go/main.go:225 +0x3d9 fp=0xc000189e58 sp=0xc000189d80 pc=0x950b59
main.main()
	/usr/local/go/src/cmd/go/main.go:179 +0x7ce fp=0xc000189f80 sp=0xc000189e58 pc=0x95044e
runtime.main()
	/usr/local/go/src/runtime/proc.go:250 +0x1f3 fp=0xc000189fe0 sp=0xc000189f80 pc=0x438533
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000189fe8 sp=0xc000189fe0 pc=0x4676c1

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000044fb0 sp=0xc000044f90 pc=0x438976
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:387
runtime.forcegchelper()
	/usr/local/go/src/runtime/proc.go:305 +0xa5 fp=0xc000044fe0 sp=0xc000044fb0 pc=0x4387a5
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000044fe8 sp=0xc000044fe0 pc=0x4676c1
created by runtime.init.6
	/usr/local/go/src/runtime/proc.go:293 +0x25

goroutine 18 [runnable]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000040780 sp=0xc000040760 pc=0x438976
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:387
runtime.bgsweep(0x0?)
	/usr/local/go/src/runtime/mgcsweep.go:319 +0xde fp=0xc0000407c8 sp=0xc000040780 pc=0x4253fe
runtime.gcenable.func1()
	/usr/local/go/src/runtime/mgc.go:178 +0x26 fp=0xc0000407e0 sp=0xc0000407c8 pc=0x41a746
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000407e8 sp=0xc0000407e0 pc=0x4676c1
created by runtime.gcenable
	/usr/local/go/src/runtime/mgc.go:178 +0x6b

goroutine 19 [GC scavenge wait]:
runtime.gopark(0xc00008e000?, 0xb2fc28?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000040f70 sp=0xc000040f50 pc=0x438976
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:387
runtime.(*scavengerState).park(0xe5a1a0)
	/usr/local/go/src/runtime/mgcscavenge.go:400 +0x53 fp=0xc000040fa0 sp=0xc000040f70 pc=0x4232f3
runtime.bgscavenge(0x0?)
	/usr/local/go/src/runtime/mgcscavenge.go:633 +0x65 fp=0xc000040fc8 sp=0xc000040fa0 pc=0x4238c5
runtime.gcenable.func2()
	/usr/local/go/src/runtime/mgc.go:179 +0x26 fp=0xc000040fe0 sp=0xc000040fc8 pc=0x41a6e6
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000040fe8 sp=0xc000040fe0 pc=0x4676c1
created by runtime.gcenable
	/usr/local/go/src/runtime/mgc.go:179 +0xaa

goroutine 3 [finalizer wait]:
runtime.gopark(0x0?, 0xaa42c0?, 0x0?, 0x40?, 0x2000000020?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000044628 sp=0xc000044608 pc=0x438976
runtime.runfinq()
	/usr/local/go/src/runtime/mfinal.go:193 +0x107 fp=0xc0000447e0 sp=0xc000044628 pc=0x419787
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000447e8 sp=0xc0000447e0 pc=0x4676c1
created by runtime.createfing
	/usr/local/go/src/runtime/mfinal.go:163 +0x45

goroutine 4 [select]:
runtime.gopark(0xc00011ffa8?, 0x2?, 0x3?, 0x0?, 0xc00011ff5c?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000059de0 sp=0xc000059dc0 pc=0x438976
runtime.selectgo(0xc000059fa8, 0xc00011ff58, 0xc00036e840?, 0x0, 0x0?, 0x1)
	/usr/local/go/src/runtime/select.go:327 +0x7be fp=0xc000059f20 sp=0xc000059de0 pc=0x447f3e
cmd/go/internal/work.(*Builder).Do.func3()
	/usr/local/go/src/cmd/go/internal/work/exec.go:201 +0x119 fp=0xc000059fe0 sp=0xc000059f20 pc=0x8cd939
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000059fe8 sp=0xc000059fe0 pc=0x4676c1
created by cmd/go/internal/work.(*Builder).Do
	/usr/local/go/src/cmd/go/internal/work/exec.go:197 +0x3f5

goroutine 5 [runnable]:
runtime.gcTrigger.test({0x0?, 0x0?, 0x0?})
	/usr/local/go/src/runtime/mgc.go:547 +0xfb fp=0xc000182c30 sp=0xc000182c28 pc=0x41ab1b
runtime.mallocgc(0x8000, 0x98f420, 0x1)
	/usr/local/go/src/runtime/malloc.go:1171 +0x768 fp=0xc000182c98 sp=0xc000182c30 pc=0x40f1e8
runtime.makeslice(0xc00034b8f0?, 0x828c9afc8?, 0xc00002e800?)
	/usr/local/go/src/runtime/slice.go:103 +0x52 fp=0xc000182cc0 sp=0xc000182c98 pc=0x44cc12
io.copyBuffer({0x828c9afc8, 0xc00002e800}, {0xb354c0, 0xc0000b02b0}, {0x0, 0x0, 0x0})
	/usr/local/go/src/io/io.go:424 +0x117 fp=0xc000182d40 sp=0xc000182cc0 pc=0x4d3217
io.Copy(...)
	/usr/local/go/src/io/io.go:386
cmd/go/internal/cache.FileHash({0xc00034b8f0, 0x2a})
	/usr/local/go/src/cmd/go/internal/cache/hash.go:165 +0x265 fp=0xc000182e20 sp=0xc000182d40 pc=0x7dde25
cmd/go/internal/work.(*Builder).fileHash(0xc0001830a8?, {0xc00034b8f0?, 0xa3f3d9?})
	/usr/local/go/src/cmd/go/internal/work/buildid.go:388 +0x2a fp=0xc000182e80 sp=0xc000182e20 pc=0x8caaea
cmd/go/internal/work.(*Builder).buildActionID(0xc0001ba370, 0xc00036e2c0)
	/usr/local/go/src/cmd/go/internal/work/exec.go:383 +0x1b78 fp=0xc000183248 sp=0xc000182e80 pc=0x8d0118
cmd/go/internal/work.(*Builder).build(0xc0001ba370, {0xc0003564df?, 0x0?}, 0xc00036e2c0)
	/usr/local/go/src/cmd/go/internal/work/exec.go:467 +0x199 fp=0xc000183d60 sp=0xc000183248 pc=0x8d0759
cmd/go/internal/work.ActorFunc.Act(0xb39b38?, 0xc0000000e0?, {0xb39b38?, 0xc0000000e0?}, 0x447633?)
	/usr/local/go/src/cmd/go/internal/work/action.go:76 +0x33 fp=0xc000183d90 sp=0xc000183d60 pc=0x8bf573
cmd/go/internal/work.(*Builder).Do.func2({0xb39b38, 0xc0000000e0}, 0xc00036e2c0)
	/usr/local/go/src/cmd/go/internal/work/exec.go:143 +0x7a4 fp=0xc000183f20 sp=0xc000183d90 pc=0x8ce264
cmd/go/internal/work.(*Builder).Do.func3()
	/usr/local/go/src/cmd/go/internal/work/exec.go:211 +0xb9 fp=0xc000183fe0 sp=0xc000183f20 pc=0x8cd8d9
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000183fe8 sp=0xc000183fe0 pc=0x4676c1
created by cmd/go/internal/work.(*Builder).Do
	/usr/local/go/src/cmd/go/internal/work/exec.go:197 +0x3f5

goroutine 6 [select]:
runtime.gopark(0xc00011bfa8?, 0x2?, 0x3?, 0x0?, 0xc00011bf5c?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000113de0 sp=0xc000113dc0 pc=0x438976
runtime.selectgo(0xc000113fa8, 0xc00011bf58, 0xc00036f1e0?, 0x0, 0x0?, 0x1)
	/usr/local/go/src/runtime/select.go:327 +0x7be fp=0xc000113f20 sp=0xc000113de0 pc=0x447f3e
cmd/go/internal/work.(*Builder).Do.func3()
	/usr/local/go/src/cmd/go/internal/work/exec.go:201 +0x119 fp=0xc000113fe0 sp=0xc000113f20 pc=0x8cd939
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000113fe8 sp=0xc000113fe0 pc=0x4676c1
created by cmd/go/internal/work.(*Builder).Do
	/usr/local/go/src/cmd/go/internal/work/exec.go:197 +0x3f5

goroutine 7 [select]:
runtime.gopark(0xc000187fa8?, 0x2?, 0x3?, 0x0?, 0xc000187f5c?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000115de0 sp=0xc000115dc0 pc=0x438976
runtime.selectgo(0xc000115fa8, 0xc000187f58, 0xc00036e420?, 0x0, 0x0?, 0x1)
	/usr/local/go/src/runtime/select.go:327 +0x7be fp=0xc000115f20 sp=0xc000115de0 pc=0x447f3e
cmd/go/internal/work.(*Builder).Do.func3()
	/usr/local/go/src/cmd/go/internal/work/exec.go:201 +0x119 fp=0xc000115fe0 sp=0xc000115f20 pc=0x8cd939
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000115fe8 sp=0xc000115fe0 pc=0x4676c1
created by cmd/go/internal/work.(*Builder).Do
	/usr/local/go/src/cmd/go/internal/work/exec.go:197 +0x3f5

goroutine 22 [GC worker (idle)]:
runtime.gopark(0xc0000467b8?, 0x1000000010000?, 0x0?, 0x0?, 0xc00039a240?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc000046750 sp=0xc000046730 pc=0x438976
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1275 +0xf1 fp=0xc0000467e0 sp=0xc000046750 pc=0x41c431
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000467e8 sp=0xc0000467e0 pc=0x4676c1
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1199 +0x25

goroutine 53 [GC worker (idle)]:
runtime.gopark(0xc00014b7b8?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00014b750 sp=0xc00014b730 pc=0x438976
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1275 +0xf1 fp=0xc00014b7e0 sp=0xc00014b750 pc=0x41c431
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00014b7e8 sp=0xc00014b7e0 pc=0x4676c1
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1199 +0x25

goroutine 54 [GC worker (idle)]:
runtime.gopark(0xc00014bfb8?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00014bf50 sp=0xc00014bf30 pc=0x438976
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1275 +0xf1 fp=0xc00014bfe0 sp=0xc00014bf50 pc=0x41c431
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00014bfe8 sp=0xc00014bfe0 pc=0x4676c1
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1199 +0x25

I found #55156, #55167, #55161 all of which look similar but none looks like an obvious duplicate.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 15, 2022
@aarzilli aarzilli changed the title runtime: marked free object in span runtime: marked free object in span (freebsd/amd64/go1.20rc1) Dec 15, 2022
@thanm thanm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 15, 2022
@mdempsky
Copy link
Contributor

mdempsky commented Jan 4, 2023

Thanks for the report. Was this just one compiler crash, or something you've been seeing repeatedly happen?

@mdempsky mdempsky added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 4, 2023
@aarzilli
Copy link
Contributor Author

aarzilli commented Jan 4, 2023

I ran the tests repeatedly a lot and each run of the tests does a lot of compilation. It wasn't frequent but the compiler did crash multiple times. I don't think it was more than once every 100 times the tests of pkg/proc were run, and each run does around 100 distinct executions of the compiler. So the frequency would be around 0.01%.

@seankhliao seankhliao added this to the Unplanned milestone Jan 20, 2023
@randall77
Copy link
Contributor

Not sure if there's much to do here. It would be nice to know if this was freebsd related or not. Can you try on a Linux machine? Or give us instructions so we can do it ourselves?

@aarzilli
Copy link
Contributor Author

$ git clone github.com/go-delve/delve
$ cd delve/pkg/proc
$ while true; do go test -v; done

Or you could just compile every file in the _fixtures directory over and over, with -gcflags='-N -l' (I don't know if the flags matter).
As far as I can tell it does not happen on linux.

@ayang64
Copy link
Member

ayang64 commented Feb 15, 2023

Which version of FreeBSD were you running? I'm trying to reproduce but so far, no luck.

(Though TestContinueMulti did timeout at 10M for me once.)

@aarzilli
Copy link
Contributor Author

$ freebsd-version
12.3-RELEASE

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jan 28, 2024
@gopherbot
Copy link
Contributor

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-FreeBSD WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

8 participants