Closed ghost closed 4 years ago
I don't think there is much that we can do here. The failure is occurring because some code in gvisor.dev/gvisor/pkg/abi/linux is marked nosplit. I guess that is working for normal compilation, but when you disable optimizations and inlining the code takes up too much stack space.
The only fix for this is for the nosplit code to use less stack space when not optimizing. It looks like the biggest culprit is
gvisor.dev/gvisor/pkg/abi/linux.(*Statx).CopyOutN (nosplit) uses 288
In order for this to work that function, and perhaps others, will need to be simplified. Or not marked as nosplit, but presumably there is a good reason for it to be nosplit. But that function is not part of the Go project, so there isn't anything that the Go project can do about it.
So I'm going to close this issue since I don't see any action that we can take. Please comment if you disagree.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?The faulty operating system is the latest version of ubuntu 20.04 (2020-05-30), ubuntu 18.04 does not have this problem
go env
OutputWhat did you do?
The faulting code is https://play.golang.org/p/eX7XVgcMFJt
This code is from the google / gvisor project example https://github.com/google/gvisor/blob/master/pkg/tcpip/sample/tun_tcp_echo/main.go
Need to use this command to get dependent libraries
go get gvisor.dev/gvisor/pkg/tcpip@go
Use the following command to compile
go build -gcflags "all=-N -l"
What did you expect to see?
Compiled successfully
What did you see instead?