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

cmd/compile: corruption on linux-amd64-noopt builder #55156

Open
rsc opened this issue Sep 19, 2022 · 9 comments
Open

cmd/compile: corruption on linux-amd64-noopt builder #55156

rsc opened this issue Sep 19, 2022 · 9 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.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Sep 19, 2022

#!watchflakes
post <- builder == "linux-amd64-noopt"

The noopt builder is clearly having some kind of corruption problem (see #54779, #54906, #54907).
Those will be closed as duplicates of this one, once automated flake triage is working.

@rsc rsc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 19, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 19, 2022
@randall77
Copy link
Contributor

randall77 commented Sep 19, 2022

I've been looking at these issues. My current theory is that pointer bitmaps for stack frames are somehow wrong.
I came across an instance which reported that a stack slot which should contain a pointer, contains something obviously not a pointer. But looking at the generated assembly, that stack slot should not even be live at that point (it is both initialized and used only after the call at which the function was suspended).

Fairly reliable reproducer:

GOGC=1 GO_GCFLAGS='-N -l' ./make.bash

Usually it is the compiler that crashes while building the stdlib as the last step of make.bash.

The frame with the bad pointer always seems to be suspended at a call to runtime.typedmemclr.

@randall77
Copy link
Contributor

randall77 commented Sep 19, 2022

typedmemclr should not be suspendible. Something it calls is suspending when it shouldn't.

Seems to be fixed by adding a //go:nosplit to (*mSpanStateBox).get.

Looks like a good use for nosplitrec.

@randall77
Copy link
Contributor

randall77 commented Sep 19, 2022

Maybe caused by CL 424395? Not that it is that CL's fault, but that CL introduces a (non-intrinsic) call to the body of (*mSpanStateBox).get, which causes get to have a prologue, and thus a suspension point.

@gopherbot
Copy link

gopherbot commented Sep 19, 2022

Change https://go.dev/cl/431919 mentions this issue: runtime: make mSpanStateBox accessors nosplit

@randall77
Copy link
Contributor

randall77 commented Sep 19, 2022

Fix is in. I optimistically assumed that the other issues referenced above are also fixed. If not, we'll soon find out...

@rsc
Copy link
Contributor Author

rsc commented Sep 20, 2022

Thanks for the fix! Still using this as a test case for the automated issue triage, so feel free to ignore the following message from gopherbot.

@gopherbot
Copy link

gopherbot commented Sep 20, 2022

Found new matching flaky dashboard failures.

2022-08-19 19:39 linux-amd64-noopt go@9a1d3b0a escape_struct_param2.go
# go run run.go -- escape_struct_param2.go
exit status 1
/workdir/go/test/escape_struct_param2.go:25: leaking param: u to result ~r0 level=0
/workdir/go/test/escape_struct_param2.go:29: leaking param: u to result ~r0 level=0
/workdir/go/test/escape_struct_param2.go:33: leaking param: u to result ~r0 level=1
/workdir/go/test/escape_struct_param2.go:38: moved to heap: s
/workdir/go/test/escape_struct_param2.go:41: &U{...} does not escape
/workdir/go/test/escape_struct_param2.go:46: moved to heap: s
/workdir/go/test/escape_struct_param2.go:49: &U{...} does not escape
/workdir/go/test/escape_struct_param2.go:55: moved to heap: s
...
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x3a0000008f pc=0x3a0000008f]

goroutine 1 [running]:
runtime.throw({0x11a6896?, 0x10?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc00048cf68 sp=0xc00048cf38 pc=0x43cd7d
runtime.sigpanic()
	/workdir/go/src/runtime/signal_unix.go:844 +0x1ca fp=0xc00048cf98 sp=0xc00048cf68 pc=0x453faa
math/rand.(*Rand).Int63(0xc00074e660)
	/workdir/go/src/math/rand/rand.go:84 +0x38 fp=0xc00048cfc0 sp=0xc00048cf98 pc=0x5ea1b8
...
cmd/compile/internal/gc.compileFunctions()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:163 +0x1f2 fp=0xc000491a90 sp=0xc000491a18 pc=0x10aaa52
cmd/compile/internal/gc.Main(0x11dd308)
	/workdir/go/src/cmd/compile/internal/gc/main.go:301 +0x178c fp=0xc000491ed8 sp=0xc000491a90 pc=0x10ad1cc
main.main()
	/workdir/go/src/cmd/compile/main.go:57 +0x171 fp=0xc000491f80 sp=0xc000491ed8 pc=0x10e5911
runtime.main()
	/workdir/go/src/runtime/proc.go:250 +0x1d3 fp=0xc000491fe0 sp=0xc000491f80 pc=0x43f4d3
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000491fe8 sp=0xc000491fe0 pc=0x472061
2022-08-22 11:49 linux-amd64-noopt go@761db3e7 cmd/dist
runtime: marked free object in span 0x7fbedaf9ea88, elemsize=1792 freeindex=2 (bad use of unsafe.Pointer? try -d=checkptr)
0xc001ec2000 alloc unmarked
0xc001ec2700 alloc marked  
0xc001ec2e00 free  unmarked
0xc001ec3500 free  unmarked
0xc001ec3c00 free  unmarked
0xc001ec4300 free  marked   zombie
0x000000c001ec4300:  0x000000000040e61e <runtime.mallocgc+0x000000000000061e>  0x00007fbedb0a8998 
0x000000c001ec4310:  0x0000000000000000  0x00000000012e4760 
0x000000c001ec4320:  0x000000c000e7c860  0x000000000040f23e <runtime.(*bmap).keys+0x000000000000001e> 
...
fatal error: found pointer to free object

runtime stack:
runtime.throw({0x11bfdbc?, 0xc001ec4700?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc000d499c0 sp=0xc000d49990 pc=0x43cd7d
runtime.(*mspan).reportZombies(0x7fbedaf9ea88)
	/workdir/go/src/runtime/mgcsweep.go:788 +0x2f6 fp=0xc000d49a40 sp=0xc000d499c0 pc=0x428f36
runtime.(*sweepLocked).sweep(0xe45a4b?, 0x0)
	/workdir/go/src/runtime/mgcsweep.go:607 +0x36e fp=0xc000d49b50 sp=0xc000d49a40 pc=0x4283ee
runtime.(*mcentral).uncacheSpan(0x1794aa0?, 0x0?)
...
	/workdir/go/src/runtime/proc.go:3456 +0x31 fp=0xc000d49e20 sp=0xc000d49e00 pc=0x445f31
runtime.newstack()
	/workdir/go/src/runtime/stack.go:1070 +0x3f5 fp=0xc000d49fc8 sp=0xc000d49e20 pc=0x457575
runtime.morestack()
	/workdir/go/src/runtime/asm_amd64.s:570 +0x8b fp=0xc000d49fd0 sp=0xc000d49fc8 pc=0x4700cb

goroutine 60 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers
	/workdir/go/src/runtime/mgc.go:1158 +0x25
2022-08-22 15:01 linux-amd64-noopt go@fc34fdb4 codegen/memcombine.go
linux/amd64/v3 
 # math
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x8ac53f]

goroutine 227 [running]:
panic({0x1135940, 0x16bb800})
	/workdir/go/src/runtime/panic.go:987 +0x3cc fp=0xc0014ab620 sp=0xc0014ab560 pc=0x43c94c
runtime.panicmem()
	/workdir/go/src/runtime/panic.go:260 +0x45 fp=0xc0014ab640 sp=0xc0014ab620 pc=0x43b345
runtime.sigpanic()
	/workdir/go/src/runtime/signal_unix.go:837 +0x1e5 fp=0xc0014ab670 sp=0xc0014ab640 pc=0x453fc5
cmd/compile/internal/ssa.Compile(0xc0013c29c0)
	/workdir/go/src/cmd/compile/internal/ssa/compile.go:98 +0xc7f fp=0xc0014af5f8 sp=0xc0014ab670 pc=0x8ac53f
cmd/compile/internal/ssagen.buildssa(0xc0001068c0, 0x2)
	/workdir/go/src/cmd/compile/internal/ssagen/ssa.go:573 +0x224a fp=0xc0014afdd0 sp=0xc0014af5f8 pc=0xe2f5aa
cmd/compile/internal/ssagen.Compile(0xc0001068c0, 0x2)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:183 +0x3e fp=0xc0014aff48 sp=0xc0014afdd0 pc=0xe2513e
cmd/compile/internal/gc.compileFunctions.func4.1(0x2)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47 fp=0xc0014affa0 sp=0xc0014aff48 pc=0x10aada7
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52 fp=0xc0014affe0 sp=0xc0014affa0 pc=0x10aaf52
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0014affe8 sp=0xc0014affe0 pc=0x472061
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5

# go run run.go -- codegen/memcombine.go
exit status 2
2022-08-23 20:24 linux-amd64-noopt go@723a2799 fixedbugs/issue5162.go
# go run run.go -- fixedbugs/issue5162.go
exit status 2
# command-line-arguments
../../tmp/797079598/tmp__.go:16136:27: internal compiler error: bvset: index 0 is out of bounds with length 0


goroutine 92 [running]:
runtime/debug.Stack()
	/workdir/go/src/runtime/debug/stack.go:24 +0x7a
cmd/compile/internal/base.FatalfAt({0x2, 0x3f081b0}, {0x11b0950, 0x30}, {0xc0008968e0, 0x2, 0x2})
...
cmd/compile/internal/ssagen.genssa(0xc00612fd40, 0xc001afc000)
	/workdir/go/src/cmd/compile/internal/ssagen/ssa.go:6894 +0x158
cmd/compile/internal/ssagen.Compile(0xc00070a3c0, 0x2)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:193 +0x331
cmd/compile/internal/gc.compileFunctions.func4.1(0x2)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5
2022-08-29 01:35 linux-amd64-noopt go@7f92ccea database/sql
panic: runtime error: index out of range [140] with length 0

goroutine 488 [running]:
panic({0x115c780, 0xc000af4060})
	/workdir/go/src/runtime/panic.go:987 +0x3cc fp=0xc00453e940 sp=0xc00453e880 pc=0x43c9ec
runtime.goPanicIndex(0x8c, 0x0)
	/workdir/go/src/runtime/panic.go:113 +0x7f fp=0xc00453e980 sp=0xc00453e940 pc=0x43aa7f
cmd/compile/internal/ssa.AutoVar(0xc0015ec4e0)
	/workdir/go/src/cmd/compile/internal/ssa/value.go:553 +0x34a fp=0xc00453eab8 sp=0xc00453e980 pc=0xdea7ea
cmd/compile/internal/liveness.affectedVar(0xc0015ec4e0)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:323 +0x85 fp=0xc00453ec08 sp=0xc00453eab8 pc=0xdfb085
cmd/compile/internal/liveness.(*liveness).valueEffects(0xc004554000, 0xc0015ec4e0)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:254 +0x65 fp=0xc00453ecb8 sp=0xc00453ec08 pc=0xdfacc5
cmd/compile/internal/liveness.(*liveness).prologue(0xc004554000)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:642 +0x126 fp=0xc00453edc8 sp=0xc00453ecb8 pc=0xdfd806
cmd/compile/internal/liveness.Compute(0xc000463a40, 0xc004373520, 0x0, 0xc004552000)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:1338 +0x176 fp=0xc00453eff0 sp=0xc00453edc8 pc=0xe03cd6
cmd/compile/internal/ssagen.genssa(0xc004373520, 0xc004552000)
	/workdir/go/src/cmd/compile/internal/ssagen/ssa.go:6894 +0x158 fp=0xc00453fdd0 sp=0xc00453eff0 pc=0xe4d298
cmd/compile/internal/ssagen.Compile(0xc000463a40, 0x3)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:197 +0x331 fp=0xc00453ff48 sp=0xc00453fdd0 pc=0xe10a11
cmd/compile/internal/gc.compileFunctions.func4.1(0x3)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47 fp=0xc00453ffa0 sp=0xc00453ff48 pc=0x1092787
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52 fp=0xc00453ffe0 sp=0xc00453ffa0 pc=0x1092932
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00453ffe8 sp=0xc00453ffe0 pc=0x472241
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5
2022-08-30 17:23 linux-amd64-noopt go@ddc93a53 internal/profile
panic: runtime error: index out of range [805] with length 0

goroutine 93 [running]:
panic({0x115cb00, 0xc00002dce0})
	/workdir/go/src/runtime/panic.go:987 +0x3cc fp=0xc001196940 sp=0xc001196880 pc=0x43c9ec
runtime.goPanicIndex(0x325, 0x0)
	/workdir/go/src/runtime/panic.go:113 +0x7f fp=0xc001196980 sp=0xc001196940 pc=0x43aa7f
cmd/compile/internal/ssa.AutoVar(0xc000f96030)
	/workdir/go/src/cmd/compile/internal/ssa/value.go:553 +0x34a fp=0xc001196ab8 sp=0xc001196980 pc=0xdeacea
cmd/compile/internal/liveness.affectedVar(0xc000f96030)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:323 +0x85 fp=0xc001196c08 sp=0xc001196ab8 pc=0xdfb585
cmd/compile/internal/liveness.(*liveness).valueEffects(0xc0005e6f00, 0xc000f96030)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:254 +0x65 fp=0xc001196cb8 sp=0xc001196c08 pc=0xdfb1c5
cmd/compile/internal/liveness.(*liveness).prologue(0xc0005e6f00)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:642 +0x126 fp=0xc001196dc8 sp=0xc001196cb8 pc=0xdfdd06
cmd/compile/internal/liveness.Compute(0xc00052f7c0, 0xc000093d40, 0x0, 0xc000691c00)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:1338 +0x176 fp=0xc001196ff0 sp=0xc001196dc8 pc=0xe041d6
cmd/compile/internal/ssagen.genssa(0xc000093d40, 0xc000691c00)
	/workdir/go/src/cmd/compile/internal/ssagen/ssa.go:6894 +0x158 fp=0xc001197dd0 sp=0xc001196ff0 pc=0xe4d7b8
cmd/compile/internal/ssagen.Compile(0xc00052f7c0, 0x0)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:197 +0x331 fp=0xc001197f48 sp=0xc001197dd0 pc=0xe10f11
cmd/compile/internal/gc.compileFunctions.func4.1(0x0)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47 fp=0xc001197fa0 sp=0xc001197f48 pc=0x1092d87
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52 fp=0xc001197fe0 sp=0xc001197fa0 pc=0x1092f32
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc001197fe8 sp=0xc001197fe0 pc=0x472261
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5
2022-09-02 19:22 linux-amd64-noopt go@0fda8b19
XXXBANNERXXX:Test execution environment.
# GOARCH: amd64
# CPU: Intel(R) Xeon(R) CPU @ 2.20GHz
# GOOS: linux
# OS Version: Linux 5.10.133+ #1 SMP Fri Aug 26 14:50:50 UTC 2022 x86_64
runtime: marked free object in span 0x7efd346fac30, elemsize=48 freeindex=0 (bad use of unsafe.Pointer? try -d=checkptr)
0xc00064c000 free  unmarked
0xc00064c030 free  marked   zombie
0x000000c00064c030:  0x7269646b726f772f  0x2f676b702f6f672f 
0x000000c00064c040:  0x6e696c2f6c6f6f74  0x3436646d615f7875 
...
fatal error: found pointer to free object

goroutine 1696 [running]:
runtime.throw({0xd7d523?, 0xc00064c060?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc000d849a0 sp=0xc000d84970 pc=0x43ca7d
runtime.(*mspan).reportZombies(0x7efd346fac30)
	/workdir/go/src/runtime/mgcsweep.go:788 +0x2f6 fp=0xc000d84a20 sp=0xc000d849a0 pc=0x42a816
runtime.(*sweepLocked).sweep(0x11168c0?, 0x0)
	/workdir/go/src/runtime/mgcsweep.go:607 +0x36e fp=0xc000d84b30 sp=0xc000d84a20 pc=0x429cce
runtime.sweepone()
...
cmd/go/internal/work.(*Builder).Do.func2({0xe344c8, 0xc00002a150}, 0xc000765540)
	/workdir/go/src/cmd/go/internal/work/exec.go:139 +0x92e fp=0xc000d87e90 sp=0xc000d87c00 pc=0xba93ee
cmd/go/internal/work.(*Builder).Do.func3()
	/workdir/go/src/cmd/go/internal/work/exec.go:201 +0x27a fp=0xc000d87fe0 sp=0xc000d87e90 pc=0xba8a1a
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000d87fe8 sp=0xc000d87fe0 pc=0x46ff01
created by cmd/go/internal/work.(*Builder).Do
	/workdir/go/src/cmd/go/internal/work/exec.go:187 +0x6fc

go tool dist: FAILED: go list -tags=noopt -gcflags=all=-N -l -f={{if .Stale}}	STALE {{.ImportPath}}: {{.StaleReason}}{{end}} std: exit status 2
2022-09-02 20:14 linux-amd64-noopt go@3e11e61f for.go
# go run run.go -- for.go
exit status 2
runtime: marked free object in span 0x7fd5dc19f2a0, elemsize=48 freeindex=0 (bad use of unsafe.Pointer? try -d=checkptr)
0xc000280000 free  unmarked
0xc000280030 free  marked   zombie
0x000000c000280030:  0x7269646b726f772f  0x2f676b702f6f672f 
0x000000c000280040:  0x6e696c2f6c6f6f74  0x3436646d615f7875 
0x000000c000280050:  0x656c69706d6f632f  0x0000000000000000 
0xc000280060 free  unmarked
0xc000280090 free  unmarked
...
fatal error: found pointer to free object

goroutine 3 [running]:
runtime.throw({0xd7d523?, 0xc000280060?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc0000635b0 sp=0xc000063580 pc=0x43ca7d
runtime.(*mspan).reportZombies(0x7fd5dc19f2a0)
	/workdir/go/src/runtime/mgcsweep.go:788 +0x2f6 fp=0xc000063630 sp=0xc0000635b0 pc=0x42a816
runtime.(*sweepLocked).sweep(0x11168c0?, 0x0)
	/workdir/go/src/runtime/mgcsweep.go:607 +0x36e fp=0xc000063740 sp=0xc000063630 pc=0x429cce
runtime.sweepone()
	/workdir/go/src/runtime/mgcsweep.go:370 +0xd9 fp=0xc000063798 sp=0xc000063740 pc=0x4296b9
runtime.bgsweep(0x0?)
	/workdir/go/src/runtime/mgcsweep.go:282 +0xf2 fp=0xc0000637c8 sp=0xc000063798 pc=0x4294f2
runtime.gcenable.func1()
	/workdir/go/src/runtime/mgc.go:178 +0x26 fp=0xc0000637e0 sp=0xc0000637c8 pc=0x41da06
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000637e8 sp=0xc0000637e0 pc=0x46ff01
created by runtime.gcenable
	/workdir/go/src/runtime/mgc.go:178 +0x6b
2022-09-06 16:59 linux-amd64-noopt go@e1e88d63 net
<autogenerated>:1: internal compiler error: bvset: index 0 is out of bounds with length 0


goroutine 522 [running]:
runtime/debug.Stack()
	/workdir/go/src/runtime/debug/stack.go:24 +0x7a
cmd/compile/internal/base.FatalfAt({0x1, 0x1000}, {0x11bd50f, 0x30}, {0xc0030268f0, 0x2, 0x2})
	/workdir/go/src/cmd/compile/internal/base/print.go:227 +0x22a
cmd/compile/internal/base.Fatalf({0x11bd50f, 0x30}, {0xc0030268f0, 0x2, 0x2})
	/workdir/go/src/cmd/compile/internal/base/print.go:196 +0x56
...
cmd/compile/internal/ssagen.genssa(0xc002e4c9c0, 0xc003202000)
	/workdir/go/src/cmd/compile/internal/ssagen/ssa.go:6906 +0x158
cmd/compile/internal/ssagen.Compile(0xc0005e7b80, 0x1)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:197 +0x325
cmd/compile/internal/gc.compileFunctions.func4.1(0x1)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5
2022-09-07 01:48 linux-amd64-noopt go@ba1ef54c cmd/go/internal/work
runtime: marked free object in span 0x7faddc0abde8, elemsize=192 freeindex=4 (bad use of unsafe.Pointer? try -d=checkptr)
0xc000000000 alloc marked  
0xc0000000c0 alloc marked  
0xc000000180 alloc marked  
0xc000000240 alloc marked  
0xc000000300 alloc marked  
0xc0000003c0 alloc marked  
0xc000000480 alloc marked  
0xc000000540 alloc marked  
0xc000000600 alloc marked  
...
fatal error: found pointer to free object

runtime stack:
runtime.throw({0x11aecc4?, 0xc000000a80?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc000611ce0 sp=0xc000611cb0 pc=0x43cf3d
runtime.(*mspan).reportZombies(0x7faddc0abde8)
	/workdir/go/src/runtime/mgcsweep.go:788 +0x2f6 fp=0xc000611d60 sp=0xc000611ce0 pc=0x429016
runtime.(*sweepLocked).sweep(0x40ced9?, 0x0)
	/workdir/go/src/runtime/mgcsweep.go:612 +0x8f9 fp=0xc000611e70 sp=0xc000611d60 pc=0x428a59
runtime.(*mcentral).uncacheSpan(0x1783200?, 0x177aee0?)
...
runtime.gcMarkTermination()
	/workdir/go/src/runtime/mgc.go:1076 +0x47a fp=0xc000064ef8 sp=0xc000064d20 pc=0x41d35a
runtime.gcMarkDone()
	/workdir/go/src/runtime/mgc.go:918 +0x22c fp=0xc000064f48 sp=0xc000064ef8 pc=0x41cdec
runtime.gcBgMarkWorker()
	/workdir/go/src/runtime/mgc.go:1366 +0x2f6 fp=0xc000064fe0 sp=0xc000064f48 pc=0x41dd96
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000064fe8 sp=0xc000064fe0 pc=0x4723a1
created by runtime.gcBgMarkStartWorkers
	/workdir/go/src/runtime/mgc.go:1158 +0x25
2022-09-07 06:18 linux-amd64-noopt go@e2d8ed2f net/http
unexpected fault address 0x12d11f8
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x12d11f8 pc=0x12d11f8]

goroutine 1057 [running]:
runtime.throw({0x119663d?, 0xc0be2d08d00fad92?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc007f3b640 sp=0xc007f3b610 pc=0x43cf3d
runtime.sigpanic()
	/workdir/go/src/runtime/signal_unix.go:844 +0x1ca fp=0xc007f3b670 sp=0xc007f3b640 pc=0x45424a
cmd/compile/internal/ssa.Compile(0xc007d916c0)
	/workdir/go/src/cmd/compile/internal/ssa/compile.go:98 +0xc46 fp=0xc007f3f5f0 sp=0xc007f3b670 pc=0x8a17a6
cmd/compile/internal/ssagen.buildssa(0xc0005ba280, 0x0)
	/workdir/go/src/cmd/compile/internal/ssagen/ssa.go:574 +0x21e5 fp=0xc007f3fdd8 sp=0xc007f3f5f0 pc=0xe21985
cmd/compile/internal/ssagen.Compile(0xc0005ba280, 0x0)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:187 +0x3e fp=0xc007f3ff48 sp=0xc007f3fdd8 pc=0xe178fe
cmd/compile/internal/gc.compileFunctions.func4.1(0x0)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47 fp=0xc007f3ffa0 sp=0xc007f3ff48 pc=0x1099527
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52 fp=0xc007f3ffe0 sp=0xc007f3ffa0 pc=0x10996d2
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc007f3ffe8 sp=0xc007f3ffe0 pc=0x4723a1
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5
2022-09-08 10:48 linux-amd64-noopt go@29604312 escape_struct_param2.go
# go run run.go -- escape_struct_param2.go
exit status 1
/workdir/go/test/escape_struct_param2.go:25: leaking param: u to result ~r0 level=0
/workdir/go/test/escape_struct_param2.go:29: leaking param: u to result ~r0 level=0
/workdir/go/test/escape_struct_param2.go:33: leaking param: u to result ~r0 level=1
/workdir/go/test/escape_struct_param2.go:38: moved to heap: s
/workdir/go/test/escape_struct_param2.go:41: &U{...} does not escape
/workdir/go/test/escape_struct_param2.go:46: moved to heap: s
/workdir/go/test/escape_struct_param2.go:49: &U{...} does not escape
/workdir/go/test/escape_struct_param2.go:55: moved to heap: s
...
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x100000013 pc=0x100000013]

goroutine 1 [running]:
runtime.throw({0x11995c0?, 0x10?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc000142f68 sp=0xc000142f38 pc=0x43cf3d
runtime.sigpanic()
	/workdir/go/src/runtime/signal_unix.go:844 +0x1ca fp=0xc000142f98 sp=0xc000142f68 pc=0x45424a
math/rand.(*Rand).Int63(0xc0006feba0)
	/workdir/go/src/math/rand/rand.go:89 +0x33 fp=0xc000142fc0 sp=0xc000142f98 pc=0x5e4993
...
cmd/compile/internal/gc.compileFunctions()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:163 +0x1f2 fp=0xc000147a90 sp=0xc000147a18 pc=0x109cdf2
cmd/compile/internal/gc.Main(0x11d0408)
	/workdir/go/src/cmd/compile/internal/gc/main.go:301 +0x1775 fp=0xc000147ed8 sp=0xc000147a90 pc=0x109f4f5
main.main()
	/workdir/go/src/cmd/compile/main.go:57 +0x171 fp=0xc000147f80 sp=0xc000147ed8 pc=0x10d76f1
runtime.main()
	/workdir/go/src/runtime/proc.go:250 +0x1d3 fp=0xc000147fe0 sp=0xc000147f80 pc=0x43f693
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000147fe8 sp=0xc000147fe0 pc=0x4723a1
2022-09-08 14:33 linux-amd64-noopt go@c263fa07 typeparam/issue48602.go
# go run run.go -- typeparam/issue48602.go
exit status 2
runtime: marked free object in span 0x7f4c4ac55308, elemsize=48 freeindex=25 (bad use of unsafe.Pointer? try -d=checkptr)
0xc00034e000 alloc marked  
0xc00034e030 alloc marked  
0xc00034e060 alloc marked  
0xc00034e090 alloc marked  
0xc00034e0c0 alloc marked  
0xc00034e0f0 alloc marked  
0xc00034e120 alloc marked  
...
fatal error: found pointer to free object

runtime stack:
runtime.throw({0xd7e226?, 0xc00034f020?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0x7f4c237fdb88 sp=0x7f4c237fdb58 pc=0x43cadd
runtime.(*mspan).reportZombies(0x7f4c4ac55308)
	/workdir/go/src/runtime/mgcsweep.go:788 +0x2f6 fp=0x7f4c237fdc08 sp=0x7f4c237fdb88 pc=0x42a896
runtime.(*sweepLocked).sweep(0x40e759?, 0x0)
	/workdir/go/src/runtime/mgcsweep.go:612 +0x8f9 fp=0x7f4c237fdd18 sp=0x7f4c237fdc08 pc=0x42a2d9
runtime.(*mcentral).uncacheSpan(0x11328c0?, 0x112f440?)
...
runtime.gcMarkTermination()
	/workdir/go/src/runtime/mgc.go:1076 +0x47a fp=0xc00035fef8 sp=0xc00035fd20 pc=0x41ebda
runtime.gcMarkDone()
	/workdir/go/src/runtime/mgc.go:918 +0x22c fp=0xc00035ff48 sp=0xc00035fef8 pc=0x41e66c
runtime.gcBgMarkWorker()
	/workdir/go/src/runtime/mgc.go:1366 +0x2f6 fp=0xc00035ffe0 sp=0xc00035ff48 pc=0x41f616
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00035ffe8 sp=0xc00035ffe0 pc=0x46ffe1
created by runtime.gcBgMarkStartWorkers
	/workdir/go/src/runtime/mgc.go:1158 +0x25
2022-09-08 21:16 linux-amd64-noopt go@a9a39822 bounds.go
# go run run.go -- bounds.go
exit status 1
/workdir/go/test/bounds.go:64: index bounds check elided
/workdir/go/test/bounds.go:65: index bounds check elided
/workdir/go/test/bounds.go:67: index bounds check elided
/workdir/go/test/bounds.go:68: index bounds check elided
/workdir/go/test/bounds.go:82: index bounds check elided
/workdir/go/test/bounds.go:85: index bounds check elided
/workdir/go/test/bounds.go:131: index bounds check elided
/workdir/go/test/bounds.go:132: index bounds check elided
...
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x12cf9f8 pc=0x12cf9f8]

goroutine 1 [running]:
runtime.throw({0x119ac00?, 0x0?})
	/workdir/go/src/runtime/panic.go:1047 +0x5d fp=0xc0005a0f68 sp=0xc0005a0f38 pc=0x43d2bd
runtime.sigpanic()
	/workdir/go/src/runtime/signal_unix.go:844 +0x1ca fp=0xc0005a0f98 sp=0xc0005a0f68 pc=0x4545ca
math/rand.(*Rand).Int63(0xc000551a70)
	/workdir/go/src/math/rand/rand.go:89 +0x33 fp=0xc0005a0fc0 sp=0xc0005a0f98 pc=0x5e4f53
...
cmd/compile/internal/gc.compileFunctions()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:163 +0x1f2 fp=0xc0005a5a90 sp=0xc0005a5a18 pc=0x109d6d2
cmd/compile/internal/gc.Main(0x11d1a80)
	/workdir/go/src/cmd/compile/internal/gc/main.go:301 +0x1775 fp=0xc0005a5ed8 sp=0xc0005a5a90 pc=0x109fdd5
main.main()
	/workdir/go/src/cmd/compile/main.go:57 +0x171 fp=0xc0005a5f80 sp=0xc0005a5ed8 pc=0x10d7fd1
runtime.main()
	/workdir/go/src/runtime/proc.go:250 +0x1d3 fp=0xc0005a5fe0 sp=0xc0005a5f80 pc=0x43fa13
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0005a5fe8 sp=0xc0005a5fe0 pc=0x472721
2022-09-09 15:30 linux-amd64-noopt go@f53b2111 cmd/internal/sys
panic: runtime error: index out of range [9616] with length 0

goroutine 51 [running]:
panic({0x1168720, 0xc0007100f0})
	/workdir/go/src/runtime/panic.go:987 +0x3cc fp=0xc00120e958 sp=0xc00120e898 pc=0x43ce8c
runtime.goPanicIndex(0x2590, 0x0)
	/workdir/go/src/runtime/panic.go:113 +0x7f fp=0xc00120e998 sp=0xc00120e958 pc=0x43af3f
cmd/compile/internal/ssa.AutoVar(0xc001185ce0)
	/workdir/go/src/cmd/compile/internal/ssa/value.go:553 +0x34a fp=0xc00120ead0 sp=0xc00120e998 pc=0xdf614a
cmd/compile/internal/liveness.affectedVar(0xc001185ce0)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:323 +0x85 fp=0xc00120ec20 sp=0xc00120ead0 pc=0xe06885
cmd/compile/internal/liveness.(*liveness).valueEffects(0xc0005a3400, 0xc001185ce0)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:254 +0x65 fp=0xc00120ecd0 sp=0xc00120ec20 pc=0xe064c5
cmd/compile/internal/liveness.(*liveness).prologue(0xc0005a3400)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:642 +0x126 fp=0xc00120ede0 sp=0xc00120ecd0 pc=0xe09006
cmd/compile/internal/liveness.Compute(0xc00056a500, 0xc000582820, 0x0, 0xc0004cad20)
	/workdir/go/src/cmd/compile/internal/liveness/plive.go:1338 +0x176 fp=0xc00120f008 sp=0xc00120ede0 pc=0xe0f436
cmd/compile/internal/ssagen.genssa(0xc000582820, 0xc0004cad20)
	/workdir/go/src/cmd/compile/internal/ssagen/ssa.go:6906 +0x158 fp=0xc00120fdd8 sp=0xc00120f008 pc=0xe580f8
cmd/compile/internal/ssagen.Compile(0xc00056a500, 0x2)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:197 +0x325 fp=0xc00120ff48 sp=0xc00120fdd8 pc=0xe1bfa5
cmd/compile/internal/gc.compileFunctions.func4.1(0x2)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47 fp=0xc00120ffa0 sp=0xc00120ff48 pc=0x109dc87
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52 fp=0xc00120ffe0 sp=0xc00120ffa0 pc=0x109de32
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00120ffe8 sp=0xc00120ffe0 pc=0x472721
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5
2022-09-16 17:59 linux-amd64-noopt go@a84f46a2 encoding/xml
<autogenerated>:1: internal compiler error: bvset: index 0 is out of bounds with length 0


goroutine 82 [running]:
runtime/debug.Stack()
	/workdir/go/src/runtime/debug/stack.go:24 +0x7a
cmd/compile/internal/base.FatalfAt({0x1, 0x1000}, {0x11ccee1, 0x30}, {0xc000c8e918, 0x2, 0x2})
	/workdir/go/src/cmd/compile/internal/base/print.go:227 +0x22a
cmd/compile/internal/base.Fatalf({0x11ccee1, 0x30}, {0xc000c8e918, 0x2, 0x2})
	/workdir/go/src/cmd/compile/internal/base/print.go:196 +0x56
...
cmd/compile/internal/ssagen.Compile(0xc0005b8000, 0x1)
	/workdir/go/src/cmd/compile/internal/ssagen/pgen.go:197 +0x325
cmd/compile/internal/gc.compileFunctions.func4.1(0x1)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:153 +0x47
cmd/compile/internal/gc.compileFunctions.func3.1()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:140 +0x52
created by cmd/compile/internal/gc.compileFunctions.func3
	/workdir/go/src/cmd/compile/internal/gc/compile.go:138 +0xa5

go tool dist: FAILED: /workdir/go/pkg/tool/linux_amd64/go_bootstrap install -tags=noopt -gcflags=all=-N -l std cmd: exit status 2
2022-09-19 15:51 linux-amd64-noopt go@f4becf15 escape_struct_param1.go
# go run run.go -- escape_struct_param1.go
exit status 1
/workdir/go/test/escape_struct_param1.go:25: leaking param: u to result ~r0 level=1
/workdir/go/test/escape_struct_param1.go:29: leaking param: u to result ~r0 level=1
/workdir/go/test/escape_struct_param1.go:33: leaking param: u to result ~r0 level=2
/workdir/go/test/escape_struct_param1.go:38: moved to heap: s
/workdir/go/test/escape_struct_param1.go:41: &U{...} does not escape
/workdir/go/test/escape_struct_param1.go:46: moved to heap: s
/workdir/go/test/escape_struct_param1.go:49: &U{...} does not escape
/workdir/go/test/escape_struct_param1.go:55: moved to heap: s
...
cmd/compile/internal/gc.compileFunctions.func2(0xc000796320)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:125 +0x23
cmd/compile/internal/gc.compileFunctions.func4({0xc0003f1e00, 0x26, 0x40})
	/workdir/go/src/cmd/compile/internal/gc/compile.go:152 +0x176
cmd/compile/internal/gc.compileFunctions()
	/workdir/go/src/cmd/compile/internal/gc/compile.go:163 +0x1f2
cmd/compile/internal/gc.Main(0x11dbab8)
	/workdir/go/src/cmd/compile/internal/gc/main.go:301 +0x1775
main.main()
	/workdir/go/src/cmd/compile/main.go:57 +0x171

watchflakes

@gopherbot gopherbot reopened this Sep 20, 2022
@rsc
Copy link
Contributor Author

rsc commented Sep 20, 2022

These are not newer than Keith's fix. Closing. Bot will reopen if we find any new ones.

@rsc rsc closed this as completed Sep 20, 2022
@gopherbot gopherbot reopened this Nov 17, 2022
@gopherbot
Copy link

gopherbot commented Nov 17, 2022

Found new dashboard test flakes for:

#!watchflakes
post <- builder == "linux-amd64-noopt"
2022-11-16 04:04 linux-amd64-noopt go@b1678e50 noinit.go (log)
# go run run.go -- noinit.go
exit status 1
1
panic: unexpected init funcs

goroutine 1 [running]:
panic({0x466d60, 0x4791c8})
	/workdir/go/src/runtime/panic.go:987 +0x3cc fp=0xc000108f58 sp=0xc000108e98 pc=0x4327cc
main.main()
	/workdir/go/test/noinit.go:341 +0x65 fp=0xc000108f80 sp=0xc000108f58 pc=0x461545
runtime.main()
	/workdir/go/src/runtime/proc.go:250 +0x1d3 fp=0xc000108fe0 sp=0xc000108f80 pc=0x435353
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000108fe8 sp=0xc000108fe0 pc=0x45d521

watchflakes

@seankhliao seankhliao added this to the Backlog milestone Nov 19, 2022
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.
Projects
Status: In Progress
Status: Done
Development

No branches or pull requests

4 participants