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: go build panic #20361

Closed
lunny opened this issue May 15, 2017 · 9 comments
Closed

cmd/compile: go build panic #20361

lunny opened this issue May 15, 2017 · 9 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@lunny
Copy link

lunny commented May 15, 2017

Please answer these questions before submitting your issue. Thanks!

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

go version go1.8.1 darwin/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/lunny/gopath"
GORACE=""
GOROOT="/Users/lunny/goroot"
GOTOOLDIR="/Users/lunny/goroot/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/00/n3p889nx3sl82rjbh1kftjd80000gn/T/go-build946732682=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

just run go build

What did you expect to see?

build successfully

What did you see instead?

I think this is the first compile today. I go to an old project which last build 3 days ago. then

go build
signal 28 received on thread with no signal stack
fatal error: non-Go code disabled sigaltstack

runtime stack:
runtime.throw(0x149a683, 0x20)
       	/Users/lunny/go1.8.1/src/runtime/panic.go:596 +0x95
runtime.noSignalStack(0x1c)
       	/Users/lunny/go1.8.1/src/runtime/signal_unix.go:455 +0x94
runtime.sigtrampgo(0x1c, 0xc420500d10, 0xc420500d78)
       	/Users/lunny/go1.8.1/src/runtime/signal_unix.go:238 +0x2d8
runtime.sigtramp(0xd, 0xc420233021, 0xd, 0x200000c00000085, 0x16958f8, 0x0, 0xc42002cc00, 0xc420500e30, 0x0, 0xc42025adc0, ...)
       	/Users/lunny/go1.8.1/src/runtime/sys_darwin_amd64.s:240 +0x28

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
       	/Users/lunny/go1.8.1/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc42003afe8 sp=0xc42003afe0

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc4204c8ddc)
       	/Users/lunny/go1.8.1/src/runtime/sema.go:47 +0x34
sync.(*WaitGroup).Wait(0xc4204c8dd0)
       	/Users/lunny/go1.8.1/src/sync/waitgroup.go:131 +0x7a
main.(*builder).do(0xc42014c980, 0xc42018a1a0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1370 +0x4be
main.runBuild(0x168e5e0, 0xc420090070, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:508 +0x67c
main.main()
       	/Users/lunny/go1.8.1/src/cmd/go/main.go:184 +0x69d

goroutine 35 [syscall]:
os/signal.signal_recv(0x0)
       	/Users/lunny/go1.8.1/src/runtime/sigqueue.go:116 +0xff
os/signal.loop()
       	/Users/lunny/go1.8.1/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
       	/Users/lunny/go1.8.1/src/os/signal/signal_unix.go:28 +0x41

goroutine 53 [syscall]:
syscall.Syscall(0x3, 0x6, 0xc4202bd200, 0x200, 0xc4202bd200, 0x200, 0x0)
       	/Users/lunny/go1.8.1/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x6, 0xc4202bd200, 0x200, 0x200, 0xc42002d000, 0x177b4b0, 0x0)
       	/Users/lunny/go1.8.1/src/syscall/zsyscall_darwin_amd64.go:973 +0x55
syscall.Read(0x6, 0xc4202bd200, 0x200, 0x200, 0x10298bf, 0x14b3ab0, 0xc420024dc0)
       	/Users/lunny/go1.8.1/src/syscall/syscall_unix.go:162 +0x49
os.(*File).read(0xc4200c2078, 0xc4202bd200, 0x200, 0x200, 0x106765b, 0x13fd5c0, 0x200)
       	/Users/lunny/go1.8.1/src/os/file_unix.go:165 +0x6a
os.(*File).Read(0xc4200c2078, 0xc4202bd200, 0x200, 0x200, 0x103286e, 0xc420061380, 0xc420024e60)
       	/Users/lunny/go1.8.1/src/os/file.go:101 +0x76
bytes.(*Buffer).ReadFrom(0xc4201843f0, 0x165dc00, 0xc4200c2078, 0x1b08160, 0xc4201843f0, 0xc420024f01)
       	/Users/lunny/go1.8.1/src/bytes/buffer.go:179 +0x160
io.copyBuffer(0x165cbc0, 0xc4201843f0, 0x165dc00, 0xc4200c2078, 0x0, 0x0, 0x0, 0xc4204ed3d8, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/io/io.go:384 +0x2cb
io.Copy(0x165cbc0, 0xc4201843f0, 0x165dc00, 0xc4200c2078, 0x13f9700, 0xc4204ed380, 0xc420024fb0)
       	/Users/lunny/go1.8.1/src/io/io.go:360 +0x68
os/exec.(*Cmd).writerDescriptor.func1(0x13f9700, 0xc4204ed380)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:254 +0x4d
os/exec.(*Cmd).Start.func1(0xc420162b00, 0xc4201e0c80)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:371 +0x27
created by os/exec.(*Cmd).Start
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:372 +0x4e4

goroutine 4 [running]:
       	goroutine running on other thread; stack unavailable
created by main.(*builder).do
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1367 +0x495

goroutine 5 [syscall]:
syscall.Syscall6(0xad, 0x1, 0x5eb, 0xc42051d118, 0x24, 0x0, 0x0, 0x177be10, 0x0, 0xc4201e0c40)
       	/Users/lunny/go1.8.1/src/syscall/asm_darwin_amd64.s:41 +0x5
os.(*Process).blockUntilWaitable(0xc420201200, 0xc420162b00, 0xc4201e0c80, 0x20)
       	/Users/lunny/go1.8.1/src/os/wait_waitid.go:28 +0xa5
os.(*Process).wait(0xc420201200, 0xc42019bc00, 0xc4200c2090, 0xc42039ec00)
       	/Users/lunny/go1.8.1/src/os/exec_unix.go:22 +0x4d
os.(*Process).Wait(0xc420201200, 0x0, 0x0, 0x14b43e8)
       	/Users/lunny/go1.8.1/src/os/exec.go:115 +0x2b
os/exec.(*Cmd).Wait(0xc420162b00, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:435 +0x62
os/exec.(*Cmd).Run(0xc420162b00, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:280 +0x5c
main.(*builder).runOut(0xc42014c980, 0xc42033d310, 0x4a, 0xc420211a80, 0x32, 0x0, 0x0, 0x0, 0xc42054edc0, 0x1c, ...)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:2141 +0x42b
main.gcToolchain.gc(0xc42014c980, 0xc4203a5b00, 0xc4203ab980, 0x77, 0xc4203ab880, 0x7b, 0xc4201cb700, 0xc4201e0b00, 0x2, 0x2, ...)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:2401 +0xfc1
main.(*gcToolchain).gc(0x16b2380, 0xc42014c980, 0xc4203a5b00, 0xc4203ab980, 0x77, 0xc4203ab880, 0x7b, 0x0, 0xc4201e0b00, 0x2, ...)
       	<autogenerated>:5 +0x105
main.(*builder).build(0xc42014c980, 0xc4204c1a00, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1537 +0xadc
main.(*builder).do.func1(0xc4204c1a00)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1302 +0x7d
main.(*builder).do.func2(0xc4204c8dd0, 0xc42014c980, 0xc4203a82a0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1361 +0x145
created by main.(*builder).do
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1367 +0x495

goroutine 6 [syscall]:
syscall.Syscall6(0xad, 0x1, 0x5f2, 0xc420503118, 0x24, 0x0, 0x0, 0x177b4b0, 0x0, 0xc4202d5dc0)
       	/Users/lunny/go1.8.1/src/syscall/asm_darwin_amd64.s:41 +0x5
os.(*Process).blockUntilWaitable(0xc4204cbce0, 0xc42032a840, 0xc4202d5e20, 0x10)
       	/Users/lunny/go1.8.1/src/os/wait_waitid.go:28 +0xa5
os.(*Process).wait(0xc4204cbce0, 0xc420332e00, 0xc420146150, 0xc4201e5a00)
       	/Users/lunny/go1.8.1/src/os/exec_unix.go:22 +0x4d
os.(*Process).Wait(0xc4204cbce0, 0x0, 0x0, 0x14b43e8)
       	/Users/lunny/go1.8.1/src/os/exec.go:115 +0x2b
os/exec.(*Cmd).Wait(0xc42032a840, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:435 +0x62
os/exec.(*Cmd).Run(0xc42032a840, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:280 +0x5c
main.(*builder).runOut(0xc42014c980, 0xc42033ca00, 0x4b, 0xc42018e200, 0x33, 0x0, 0x0, 0x0, 0xc42032a6e0, 0xd, ...)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:2141 +0x42b
main.gcToolchain.gc(0xc42014c980, 0xc420316000, 0xc4203b6a80, 0x78, 0xc4203b6a00, 0x7c, 0xc4201cb700, 0xc4202d5c20, 0x2, 0x2, ...)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:2401 +0xfc1
main.(*gcToolchain).gc(0x16b2380, 0xc42014c980, 0xc420316000, 0xc4203b6a80, 0x78, 0xc4203b6a00, 0x7c, 0x0, 0xc4202d5c20, 0x2, ...)
       	<autogenerated>:5 +0x105
main.(*builder).build(0xc42014c980, 0xc42050e270, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1537 +0xadc
main.(*builder).do.func1(0xc42050e270)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1302 +0x7d
main.(*builder).do.func2(0xc4204c8dd0, 0xc42014c980, 0xc4203a82a0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1361 +0x145
created by main.(*builder).do
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1367 +0x495

goroutine 7 [syscall]:
syscall.Syscall6(0xad, 0x1, 0x5f4, 0xc4204ff118, 0x24, 0x0, 0x0, 0x177be10, 0x0, 0xc420294820)
       	/Users/lunny/go1.8.1/src/syscall/asm_darwin_amd64.s:41 +0x5
os.(*Process).blockUntilWaitable(0xc420387740, 0xc420163e40, 0xc420294860, 0x18)
       	/Users/lunny/go1.8.1/src/os/wait_waitid.go:28 +0xa5
os.(*Process).wait(0xc420387740, 0xc4203b9180, 0xc4200c2180, 0xc4201da300)
       	/Users/lunny/go1.8.1/src/os/exec_unix.go:22 +0x4d
os.(*Process).Wait(0xc420387740, 0x0, 0x0, 0x14b43e8)
       	/Users/lunny/go1.8.1/src/os/exec.go:115 +0x2b
os/exec.(*Cmd).Wait(0xc420163e40, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:435 +0x62
os/exec.(*Cmd).Run(0xc420163e40, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:280 +0x5c
main.(*builder).runOut(0xc42014c980, 0xc4203ea870, 0x50, 0xc420089980, 0x38, 0x0, 0x0, 0x0, 0xc420163ce0, 0x15, ...)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:2141 +0x42b
main.gcToolchain.gc(0xc42014c980, 0xc420317680, 0xc4203b6e80, 0x7d, 0xc42001c7e0, 0x81, 0xc4201cb700, 0xc4202946c0, 0x2, 0x2, ...)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:2401 +0xfc1
main.(*gcToolchain).gc(0x16b2380, 0xc42014c980, 0xc420317680, 0xc4203b6e80, 0x7d, 0xc42001c7e0, 0x81, 0x0, 0xc4202946c0, 0x2, ...)
       	<autogenerated>:5 +0x105
main.(*builder).build(0xc42014c980, 0xc42050e4e0, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1537 +0xadc
main.(*builder).do.func1(0xc42050e4e0)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1302 +0x7d
main.(*builder).do.func2(0x164e525, 0xc420500020, 0x1046e3b)
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1361 +0x145
created by main.(*builder).do
       	/Users/lunny/go1.8.1/src/cmd/go/build.go:1367 +0x495

goroutine 58 [syscall]:
syscall.Syscall(0x3, 0x5, 0xc4203bea00, 0x200, 0xc4203bea00, 0x200, 0x0)
       	/Users/lunny/go1.8.1/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x5, 0xc4203bea00, 0x200, 0x200, 0xc4200bec00, 0x177b4b0, 0x0)
       	/Users/lunny/go1.8.1/src/syscall/zsyscall_darwin_amd64.go:973 +0x55
syscall.Read(0x5, 0xc4203bea00, 0x200, 0x200, 0x10298bf, 0x14b3ab0, 0xc420029dc0)
       	/Users/lunny/go1.8.1/src/syscall/syscall_unix.go:162 +0x49
os.(*File).read(0xc4200c2168, 0xc4203bea00, 0x200, 0x200, 0x106765b, 0x13fd5c0, 0x200)
       	/Users/lunny/go1.8.1/src/os/file_unix.go:165 +0x6a
os.(*File).Read(0xc4200c2168, 0xc4203bea00, 0x200, 0x200, 0x103286e, 0xc42038c000, 0xc420029e60)
       	/Users/lunny/go1.8.1/src/os/file.go:101 +0x76
bytes.(*Buffer).ReadFrom(0xc420185260, 0x165dc00, 0xc4200c2168, 0x1b08160, 0xc420185260, 0xc420029f01)
       	/Users/lunny/go1.8.1/src/bytes/buffer.go:179 +0x160
io.copyBuffer(0x165cbc0, 0xc420185260, 0x165dc00, 0xc4200c2168, 0x0, 0x0, 0x0, 0xc42037f5b8, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/io/io.go:384 +0x2cb
io.Copy(0x165cbc0, 0xc420185260, 0x165dc00, 0xc4200c2168, 0x13f9700, 0xc42037f560, 0xc420029fb0)
       	/Users/lunny/go1.8.1/src/io/io.go:360 +0x68
os/exec.(*Cmd).writerDescriptor.func1(0x13f9700, 0xc42037f560)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:254 +0x4d
os/exec.(*Cmd).Start.func1(0xc420163e40, 0xc420294860)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:371 +0x27
created by os/exec.(*Cmd).Start
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:372 +0x4e4

goroutine 28 [syscall]:
syscall.Syscall(0x3, 0x8, 0xc42039fe00, 0x200, 0xc42039fe00, 0x200, 0x0)
       	/Users/lunny/go1.8.1/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x8, 0xc42039fe00, 0x200, 0x200, 0xc4200be000, 0x177be10, 0x0)
       	/Users/lunny/go1.8.1/src/syscall/zsyscall_darwin_amd64.go:973 +0x55
syscall.Read(0x8, 0xc42039fe00, 0x200, 0x200, 0x10298bf, 0x14b3ab0, 0xc420092dc0)
       	/Users/lunny/go1.8.1/src/syscall/syscall_unix.go:162 +0x49
os.(*File).read(0xc420146138, 0xc42039fe00, 0x200, 0x200, 0x106765b, 0x13fd5c0, 0x200)
       	/Users/lunny/go1.8.1/src/os/file_unix.go:165 +0x6a
os.(*File).Read(0xc420146138, 0xc42039fe00, 0x200, 0x200, 0x0, 0x0, 0xc420092e60)
       	/Users/lunny/go1.8.1/src/os/file.go:101 +0x76
bytes.(*Buffer).ReadFrom(0xc420177260, 0x165dc00, 0xc420146138, 0x1b08160, 0xc420177260, 0x1)
       	/Users/lunny/go1.8.1/src/bytes/buffer.go:179 +0x160
io.copyBuffer(0x165cbc0, 0xc420177260, 0x165dc00, 0xc420146138, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/io/io.go:384 +0x2cb
io.Copy(0x165cbc0, 0xc420177260, 0x165dc00, 0xc420146138, 0x0, 0x0, 0x0)
       	/Users/lunny/go1.8.1/src/io/io.go:360 +0x68
os/exec.(*Cmd).writerDescriptor.func1(0x0, 0x0)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:254 +0x4d
os/exec.(*Cmd).Start.func1(0xc42032a840, 0xc4202d5e20)
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:371 +0x27
created by os/exec.(*Cmd).Start
       	/Users/lunny/go1.8.1/src/os/exec/exec.go:372 +0x4e4
go build xxxx.com/<projname>/vendor/xxxx.com/xxxxx/xxxx: /Users/lunny/goroot/pkg/tool/darwin_amd64/compile: exit status 2

and when I type go build twice, it's normal.

@davecheney
Copy link
Contributor

davecheney commented May 15, 2017 via email

@ianlancetaylor
Copy link
Contributor

Is this repeatable at all?

Signal 28 is SIGWINCH, which is sent when the window size changes. Did you resize your window during the build? (Resizing the window should work, of course, I'm just trying to figure out where the SIGWINCH came from.)

@lunny
Copy link
Author

lunny commented May 15, 2017

@davecheney I didn't
@ianlancetaylor I think I didn't. I just opened iTerm2 and cd the project directory and type go build.

@davecheney
Copy link
Contributor

davecheney commented May 15, 2017 via email

@lunny
Copy link
Author

lunny commented May 18, 2017

➜  xorm git:(master) sw_vers -productVersion
10.12.4

@bradfitz bradfitz added this to the Go1.9Maybe milestone May 18, 2017
@bradfitz bradfitz added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 18, 2017
@bradfitz
Copy link
Contributor

/cc @bcmills @aclements

@aclements
Copy link
Member

@lunny, was this reproducible? What about if you intentionally resize the terminal while building?

@ianlancetaylor, dup of #18600?

@ianlancetaylor
Copy link
Contributor

Yes, I would guess this is the same as #18600.

@aclements
Copy link
Member

Closing as a dup of #18600.

@golang golang locked and limited conversation to collaborators Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants