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

Closed
josharian opened this issue May 2, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@josharian
Copy link
Contributor

commented May 2, 2018

Using tip at 8cd0094 on darwin/amd64.

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

Result:

$ 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
<hang>

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%.

@randall77

@CAFxX

This comment has been minimized.

Copy link
Contributor

commented May 28, 2018

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

@randall77

This comment has been minimized.

Copy link
Contributor

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 join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.