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/link, runtime: signal causes 'fatal: morestack on g0' on darwin/amd64 #25229

josharian opened this issue May 2, 2018 · 2 comments


Copy link

@josharian josharian commented May 2, 2018

Using tip at 8cd0094 on darwin/amd64.

Run go tool compile -S x.go | head, for any x.go.


$ go tool compile -S x.go | head -n 10
"".main STEXT size=319 args=0x0 locals=0xf0
	0x0000 00000 (x.go:8)	TEXT	"".main(SB), $240-0
	0x0000 00000 (x.go:8)	MOVQ	(TLS), CX
	0x0009 00009 (x.go:8)	LEAQ	-112(SP), AX
	0x000e 00014 (x.go:8)	CMPQ	AX, 16(CX)
	0x0012 00018 (x.go:8)	JLS	309
	0x0018 00024 (x.go:8)	SUBQ	$240, SP
	0x001f 00031 (x.go:8)	MOVQ	BP, 232(SP)
	0x0027 00039 (x.go:8)	LEAQ	232(SP), BP
	0x002f 00047 (x.go:8)	FUNCDATA	$0, gclocals·7d2d5fca80364273fb07d5820a76fef4(SB)
fatal: morestack on g0

Presumably fails due to the SIGPIPE from head.

Probably a result of the libc darwin changes. Possibly a duplicate of other, known bugs, but filing because it reproduces 100%.


Copy link

@CAFxX CAFxX commented May 28, 2018

This likely happens also on golang 1.10.2: #23360 (comment)

Copy link

@randall77 randall77 commented Jun 13, 2018

I believe this is fixed now. Not sure the cause, but this may have been from a period where some signal code was moved to libc and some was still direct syscalls.

I now get:

go tool compile: signal: broken pipe

which is exactly what I get on linux.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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