Go build receives SIGKILL

2.0
golang

#1

I’m trying to move our builds to 2.0, and currently experiencing an intermittent issue with go build. Probably about half the time, my builds fail with /usr/local/go/pkg/tool/linux_amd64/link: signal: killed when building a go package using go test -v -race ./.... Usually this only affects one package, but not always the same one. In my most recent build, it affected two separate packages.

This seems likely to be and OOM problem, but I don’t have the same tools to debug this as in 1.0, where a snapshot of system RAM was placed into the artifacts.


#2

Could you give me a build URL please?


#3

I’m seeing the same cryptic signal: killed message after go run main.go has been running for about a minute.

I too suspect OOM. The script succeeds running locally, although it takes a while. I’m running in docker image golang:1.8

Thanks!


#4

@levlaz I’m also running into the same issue while trying to upgrade to 2.0. Disabling the race detector fixed it (just one try), but that’s needed to avoid production bugs. I agree with other posters it may be a memory issue but I don’t see any way to track memory usage in 2.0.


#5

We also meet this issue. Does anyone have a solution?


#6

Just ran this on golang:1.9rc2 and still having the same issue but now getting this message: cannot allocate memory

https://golang.org/doc/articles/race_detector.html#Runtime_Overheads

The cost of race detection varies by program, but for a typical program, memory usage may increase by 5-10x and execution time by 2-20x.


#7