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/go: go build crashes #16180

Closed
alexbrainman opened this issue Jun 25, 2016 · 7 comments
Closed

cmd/go: go build crashes #16180

alexbrainman opened this issue Jun 25, 2016 · 7 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@alexbrainman
Copy link
Member

C:\Test>go version
go version devel +4fcb4eb Sat Jun 25 00:36:40 2016 +0000 windows/amd64

C:\Test>set GOARCH=386

C:\Test>type a.go

package main

import "fmt"

func main() {
        fmt.Println("hello")
}

C:\Test>go build "-gcflags=-N -l" -o a.exe a.go
# command-line-arguments
runtime.cgocall: nosplit stack overflow
        588     assumed on entry to runtime.cgocall (nosplit)
        540     after runtime.cgocall (nosplit) uses 48
        536     on entry to runtime.exitsyscall (nosplit)
        360     after runtime.exitsyscall (nosplit) uses 176
        356     on entry to runtime.exitsyscallfast (nosplit)
        196     after runtime.exitsyscallfast (nosplit) uses 160
        192     on entry to runtime.writebarrierptr (nosplit)
        152     after runtime.writebarrierptr (nosplit) uses 40
        148     on entry to runtime.cgoCheckWriteBarrier (nosplit)
        92      after runtime.cgoCheckWriteBarrier (nosplit) uses 56
        88      on entry to runtime.cgoIsGoPointer (nosplit)
        64      after runtime.cgoIsGoPointer (nosplit) uses 24
        60      on entry to runtime.inHeapOrStack (nosplit)
        4       after runtime.inHeapOrStack (nosplit) uses 56
        0       on entry to runtime.panicindex
        -4      on entry to runtime.morestack (nosplit)
runtime.cgocallbackg: nosplit stack overflow
        588     assumed on entry to runtime.cgocallbackg (nosplit)
        540     after runtime.cgocallbackg (nosplit) uses 48
        536     on entry to runtime.exitsyscall (nosplit)
        360     after runtime.exitsyscall (nosplit) uses 176
        356     on entry to runtime.exitsyscallfast (nosplit)
        196     after runtime.exitsyscallfast (nosplit) uses 160
        192     on entry to runtime.writebarrierptr (nosplit)
        152     after runtime.writebarrierptr (nosplit) uses 40
        148     on entry to runtime.cgoCheckWriteBarrier (nosplit)
        92      after runtime.cgoCheckWriteBarrier (nosplit) uses 56
        88      on entry to runtime.cgoIsGoPointer (nosplit)
        64      after runtime.cgoIsGoPointer (nosplit) uses 24
        60      on entry to runtime.inHeapOrStack (nosplit)
        4       after runtime.inHeapOrStack (nosplit) uses 56
        0       on entry to runtime.panicindex
        -4      on entry to runtime.morestack (nosplit)
syscall.loadsystemlibrary: nosplit stack overflow
        588     assumed on entry to syscall.loadsystemlibrary (nosplit)
        508     after syscall.loadsystemlibrary (nosplit) uses 80
        504     on entry to runtime.cgocall (nosplit)
        456     after runtime.cgocall (nosplit) uses 48
        452     on entry to runtime.entersyscall (nosplit)
        436     after runtime.entersyscall (nosplit) uses 16
        432     on entry to runtime.reentersyscall (nosplit)
        296     after runtime.reentersyscall (nosplit) uses 136
        292     on entry to runtime.casgstatus (nosplit)
        108     after runtime.casgstatus (nosplit) uses 184
        104     on entry to runtime.throw (nosplit)
        80      after runtime.throw (nosplit) uses 24
        76      on entry to runtime.dopanic (nosplit)
        16      after runtime.dopanic (nosplit) uses 60
        12      on entry to runtime.getcallerpc (nosplit)
        8       after runtime.getcallerpc (nosplit) uses 4
        4       on entry to runtime.nextBarrierPC (nosplit)
        -4      after runtime.nextBarrierPC (nosplit) uses 8
syscall.loadlibrary: nosplit stack overflow
        588     assumed on entry to syscall.loadlibrary (nosplit)
        552     after syscall.loadlibrary (nosplit) uses 36
        548     on entry to runtime.cgocall (nosplit)
        500     after runtime.cgocall (nosplit) uses 48
        496     on entry to runtime.entersyscall (nosplit)
        480     after runtime.entersyscall (nosplit) uses 16
        476     on entry to runtime.reentersyscall (nosplit)
        340     after runtime.reentersyscall (nosplit) uses 136
        336     on entry to runtime.casgstatus (nosplit)
        152     after runtime.casgstatus (nosplit) uses 184
        148     on entry to runtime.nanotime (nosplit)
        128     after runtime.nanotime (nosplit) uses 20
        124     on entry to runtime.systime (nosplit)
        -8      after runtime.systime (nosplit) uses 132
syscall.getprocaddress: nosplit stack overflow
        588     assumed on entry to syscall.getprocaddress (nosplit)
        552     after syscall.getprocaddress (nosplit) uses 36
        548     on entry to runtime.cgocall (nosplit)
        500     after runtime.cgocall (nosplit) uses 48
        496     on entry to runtime.entersyscall (nosplit)
        480     after runtime.entersyscall (nosplit) uses 16
        476     on entry to runtime.reentersyscall (nosplit)
        340     after runtime.reentersyscall (nosplit) uses 136
        336     on entry to runtime.casgstatus (nosplit)
        152     after runtime.casgstatus (nosplit) uses 184
        148     on entry to runtime.nanotime (nosplit)
        128     after runtime.nanotime (nosplit) uses 20
        124     on entry to runtime.systime (nosplit)
        -8      after runtime.systime (nosplit) uses 132
syscall.Syscall: nosplit stack overflow
        588     assumed on entry to syscall.Syscall (nosplit)
        548     after syscall.Syscall (nosplit) uses 40
        544     on entry to runtime.cgocall (nosplit)
        496     after runtime.cgocall (nosplit) uses 48
        492     on entry to runtime.entersyscall (nosplit)
        476     after runtime.entersyscall (nosplit) uses 16
        472     on entry to runtime.reentersyscall (nosplit)
        336     after runtime.reentersyscall (nosplit) uses 136
        332     on entry to runtime.casgstatus (nosplit)
        148     after runtime.casgstatus (nosplit) uses 184
        144     on entry to runtime.nanotime (nosplit)
        124     after runtime.nanotime (nosplit) uses 20
        120     on entry to runtime.systime (nosplit)
        -12     after runtime.systime (nosplit) uses 132
syscall.Syscall6: nosplit stack overflow
        588     assumed on entry to syscall.Syscall6 (nosplit)
        548     after syscall.Syscall6 (nosplit) uses 40
        544     on entry to runtime.cgocall (nosplit)
        496     after runtime.cgocall (nosplit) uses 48
        492     on entry to runtime.entersyscall (nosplit)
        476     after runtime.entersyscall (nosplit) uses 16
        472     on entry to runtime.reentersyscall (nosplit)
        336     after runtime.reentersyscall (nosplit) uses 136
        332     on entry to runtime.casgstatus (nosplit)
        148     after runtime.casgstatus (nosplit) uses 184
        144     on entry to runtime.nanotime (nosplit)
        124     after runtime.nanotime (nosplit) uses 20
        120     on entry to runtime.systime (nosplit)
        -12     after runtime.systime (nosplit) uses 132
syscall.Syscall9: nosplit stack overflow
        588     assumed on entry to syscall.Syscall9 (nosplit)
        548     after syscall.Syscall9 (nosplit) uses 40
        544     on entry to runtime.cgocall (nosplit)
        496     after runtime.cgocall (nosplit) uses 48
        492     on entry to runtime.entersyscall (nosplit)
        476     after runtime.entersyscall (nosplit) uses 16
        472     on entry to runtime.reentersyscall (nosplit)
        336     after runtime.reentersyscall (nosplit) uses 136
        332     on entry to runtime.casgstatus (nosplit)
        148     after runtime.casgstatus (nosplit) uses 184
        144     on entry to runtime.nanotime (nosplit)
        124     after runtime.nanotime (nosplit) uses 20
        120     on entry to runtime.systime (nosplit)
        -12     after runtime.systime (nosplit) uses 132
runtime.cgocallback_gofunc: nosplit stack overflow
        588     assumed on entry to runtime.cgocallback_gofunc (nosplit)
        576     after runtime.cgocallback_gofunc (nosplit) uses 12
        572     on entry to runtime.cgocallbackg (nosplit)
        524     after runtime.cgocallbackg (nosplit) uses 48
        520     on entry to runtime.exitsyscall (nosplit)
        344     after runtime.exitsyscall (nosplit) uses 176
        340     on entry to runtime.exitsyscallfast (nosplit)
        180     after runtime.exitsyscallfast (nosplit) uses 160
        176     on entry to runtime.writebarrierptr (nosplit)
        136     after runtime.writebarrierptr (nosplit) uses 40
        132     on entry to runtime.cgoCheckWriteBarrier (nosplit)
        76      after runtime.cgoCheckWriteBarrier (nosplit) uses 56
        72      on entry to runtime.cgoIsGoPointer (nosplit)
        48      after runtime.cgoIsGoPointer (nosplit) uses 24
        44      on entry to runtime.inHeapOrStack (nosplit)
        -12     after runtime.inHeapOrStack (nosplit) uses 56

C:\Test>
@alexbrainman
Copy link
Member Author

I have no idea how to debug this.

Alex

@aarzilli
Copy link
Contributor

I can reproduce this cross compiling from linux amd64 to linux i386 with go 1.7beta2.

@ALTree
Copy link
Member

ALTree commented Jun 25, 2016

This is not new, it happens with go1.6.2 too. There's an amd64 no-optimization builder, but no 368 no-optimization builder, that's probably why no one ever noticed.

@aarzilli
Copy link
Contributor

@ALTree: I just tried with go1.6.2 and it doesn't crash.

@ALTree
Copy link
Member

ALTree commented Jun 25, 2016

To make it crash on go1.6.2, remove the -l flag, i.e. run

env GOARCH=386 go build -gcflags -N prova.go

@josharian josharian added this to the Go1.8 milestone Jun 25, 2016
@josharian
Copy link
Contributor

Marking as go1.8 since this is not a regression. Hopefully moving 386 to SSA will fix this for free.

aarzilli added a commit to go-delve/delve that referenced this issue Jul 3, 2016
@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 6, 2016
@quentinmit
Copy link
Contributor

I'm unable to reproduce on HEAD from linux/amd64 to linux/386. Please comment if you think this is still an issue.

@golang golang locked and limited conversation to collaborators Oct 6, 2017
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