Skip to content

runtime: bootstrap fails on linux/arm #11853

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

Closed
mwhudson opened this issue Jul 24, 2015 · 3 comments
Closed

runtime: bootstrap fails on linux/arm #11853

mwhudson opened this issue Jul 24, 2015 · 3 comments
Milestone

Comments

@mwhudson
Copy link
Contributor

For example, from https://launchpadlibrarian.net/212522322/buildlog_ubuntu-wily-armhf.golang_2%3A1.5~snap~upstream201507222050git92390e4ubuntu1_BUILDING.txt.gz

...
go/build
hash
crypto
crypto/sha1
debug/dwarf
debug/elf
cmd/go

##### Building packages and commands for linux/arm.
./make.bash: line 161: 10782 Segmentation fault      CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd

But I can reproduce it locally. It's the fault of https://go.googlesource.com/go/+/77d38d9cbe9b4047e7155569e7b9485093807e17 ("runtime: handle linux CPU masks up to 64k CPUs"), but I don't understand why.

@ianlancetaylor ianlancetaylor added this to the Go1.5 milestone Jul 24, 2015
@mwhudson
Copy link
Contributor Author

Oh well I think the reason is clear enough: this code attempts to put 8kb on the system stack, which is only 8kb on ARM. I don't know why that would be -- all other platforms have it as 64kb.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/12622 mentions this issue.

mwhudson added a commit to mwhudson/go that referenced this issue Jul 24, 2015
The system stack is only around 8kb on ARM so one can't put an 8kb buffer on
the stack. More than 1024 ARM cores seems sufficiently unlikely for the
foreseeable future.

Fixes golang#11853

Change-Id: I7cb27c1250a6153f86e269c172054e9dfc218c72
mwhudson added a commit to mwhudson/go that referenced this issue Jul 24, 2015
The system stack is only around 8kb on ARM so one can't put an 8kb buffer on
the stack. More than 1024 ARM cores seems sufficiently unlikely for the
foreseeable future.

Fixes golang#11853

Change-Id: I7cb27c1250a6153f86e269c172054e9dfc218c72
@crawshaw
Copy link
Member

It looks like the 8kb system stack on arm has been around since the initial arm commit:

https://github.com/golang/go/blob/f52c02/src/runtime/arm/asm.s#L51

I cannot work out why it is so small. @mwhudson for Go 1.5 your change is probably the best minimal option, but for Go 1.6, should we bump the system stack to 64kb?

mwhudson added a commit to mwhudson/go that referenced this issue Jul 26, 2015
The system stack is only around 8kb on ARM so one can't put an 8kb buffer on
the stack. More than 1024 ARM cores seems sufficiently unlikely for the
foreseeable future.

Fixes golang#11853

Change-Id: I7cb27c1250a6153f86e269c172054e9dfc218c72
@golang golang locked and limited conversation to collaborators Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants