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: "Infinite" loop observed compiling capnproto2 with dev tip #38565

Open
dr2chase opened this issue Apr 21, 2020 · 1 comment
Open

cmd/compile: "Infinite" loop observed compiling capnproto2 with dev tip #38565

dr2chase opened this issue Apr 21, 2020 · 1 comment

Comments

@dr2chase
Copy link
Contributor

@dr2chase dr2chase commented Apr 21, 2020

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

$ go version
go version devel +066c47ca5f Tue Apr 21 00:38:53 2020 +0000 linux/amd64

Does this issue reproduce with the latest release?

I could not reproduce this on my first try, perhaps I was the victim of a cosmic ray, but I wanted to record this and keep an eye open.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/drchase/.cache/go-build"
GOENV="/usr/local/google/home/drchase/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/drchase/work/gocode/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/drchase/work/gocode"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/google/home/drchase/work/bent-cron/go-tip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/drchase/work/bent-cron/go-tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build067911220=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Running nightly benchmarks, observed that they did not finish at the expected time.

What did you expect to see?

A tweet about completion.

What did you see instead?

Logged into box, checked "top", saw hundreds of minutes of cpu time for "compile", killed it with a QUIT to capture the log:

chmod -R u+w /usr/local/google/home/drchase/work/bent-cron/gopath/pkg
rm -rf /usr/local/google/home/drchase/work/bent-cron/gopath/pkg /usr/local/google/home/drchase/work/bent-cron/gopath/bin
(cd /usr/local/google/home/drchase/work/bent-cron/gopath; GOPATH=/usr/local/google/home/drchase/work/bent-cron/gopath GOOS=linux GOARCH=amd64 GO111MODULE=auto GOROOT=/usr/local/google/home/drchase/work/bent-cron/goroots/Tip/ /usr/local/google/home/drchase/work/bent-cron/goroots/Tip/bin/go clean -cache )
(cd /usr/local/google/home/drchase/work/bent-cron/gopath/src/zombiezen.com/go/capnproto2; GOPATH=/usr/local/google/home/drchase/work/bent-cron/gopath GOOS=linux GOARCH=amd64 GO111MODULE=auto GOROOT=/usr/local/google/home/drchase/work/bent-cron/goroots/Tip/ /usr/bin/time -p /usr/local/google/home/drchase/work/bent-cron/goroots/Tip/bin/go test -vet=off -c . )
There was an error running 'go test', output = # zombiezen.com/go/capnproto2 [zombiezen.com/go/capnproto2.test]
SIGQUIT: quit
PC=0x467921 m=0 sigcode=0

goroutine 0 [idle]:
runtime.futex(0x122d6e8, 0x80, 0x0, 0x0, 0x0, 0xc000028748, 0xc000028758, 0x7ffe010ef8c8, 0x7ffe010ef8e8, 0x40b5ef, ...)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/sys_linux_amd64.s:567 +0x21
runtime.futexsleep(0x122d6e8, 0x7ffe00000000, 0xffffffffffffffff)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/os_linux.go:45 +0x46
runtime.notesleep(0x122d6e8)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/lock_futex.go:159 +0x9f
runtime.stopm()
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/proc.go:1881 +0xc4
runtime.findrunnable(0xc000027000, 0x0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/proc.go:2413 +0xa0b
runtime.schedule()
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/proc.go:2613 +0x324
runtime.park_m(0xc000582600)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/proc.go:2783 +0x9d
runtime.mcall(0x0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/asm_amd64.s:318 +0x5b

goroutine 1 [semacquire, 660 minutes]:
sync.runtime_Semacquire(0xc000619048)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc000619040)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/sync/waitgroup.go:130 +0x64
cmd/compile/internal/gc.compileFunctions()
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/gc/pgen.go:371 +0x1ce
cmd/compile/internal/gc.Main(0xc25bd0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/gc/main.go:756 +0x34d5
main.main()
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/main.go:52 +0xac

goroutine 32 [runnable]:
cmd/compile/internal/ssa.rewriteValuegeneric(0xc020909110, 0x0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/ssa/rewritegeneric.go:9 +0x2015
cmd/compile/internal/ssa.applyRewrite(0xc001a766e0, 0xc26350, 0xc263d0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/ssa/rewrite.go:109 +0x3f0
cmd/compile/internal/ssa.opt(0xc001a766e0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/ssa/opt.go:9 +0x43
cmd/compile/internal/ssa.Compile(0xc001a766e0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/ssa/compile.go:93 +0x9bb
cmd/compile/internal/gc.buildssa(0xc00098e2c0, 0x1, 0x0)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/gc/ssa.go:460 +0xcca
cmd/compile/internal/gc.compileSSA(0xc00098e2c0, 0x1)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/gc/pgen.go:296 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc00164baa0, 0xc000619040, 0x1)
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/gc/pgen.go:361 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/usr/local/google/home/drchase/work/bent-cron/go-tip/src/cmd/compile/internal/gc/pgen.go:359 +0x128

rax    0xca
rbx    0x122d5a0
rcx    0x467923
rdx    0x0
rdi    0x122d6e8
rsi    0x80
rbp    0x7ffe010ef8b0
rsp    0x7ffe010ef868
r8     0x0
r9     0x0
r10    0x0
r11    0x286
r12    0x3
r13    0x122d040
r14    0x80c021230000
r15    0x80c021237fff
rip    0x467921
rflags 0x286
cs     0x33
fs     0x0
gs     0x0
Command exited with non-zero status 2
real 39626.87
user 39815.97
sys 73.44
DISABLING benchmark capnproto2
@cuonglm
Copy link
Contributor

@cuonglm cuonglm commented Apr 21, 2020

Trying upgrading to latest tip. Commit 066c47c. causes infinite loop and was reverted.

@andybons andybons changed the title "Infinite" loop observed compiling capnproto2 with dev tip cmd/compile: "Infinite" loop observed compiling capnproto2 with dev tip Apr 21, 2020
@andybons andybons added this to the Unplanned milestone Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.