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

runtime: debugCheckBP = true crashes compiler compilation on Windows #41995

Open
egonelbre opened this issue Oct 15, 2020 · 4 comments
Open

runtime: debugCheckBP = true crashes compiler compilation on Windows #41995

egonelbre opened this issue Oct 15, 2020 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@egonelbre
Copy link
Contributor

Using 8cd75f3 (and also 1.15.3) with enabling debugBP = true it crashes the compiler compilation on Windows. On Linux, it compiles fine.

Reporting to ensure that this isn't an indication of a bug somewhere.

Here's the line I changed:

debugCheckBP = false

Crash:

c:\Go.tip\src>make.bat
Building Go cmd/dist using C:\Go\
Building Go toolchain1 using C:\Go\.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
runtime: found invalid top frame pointer
bp=0xc0009d53d8 min=0xc00080e000 max=0xc000810000
fatal error: bad top frame pointer

runtime stack:
runtime.throw(0x85fbcf, 0x15)
        c:/Go.tip/src/runtime/panic.go:1121 +0x79
runtime.adjustctxt(0xc000914780, 0x298dfc28)
        c:/Go.tip/src/runtime/stack.go:727 +0x168
runtime.copystack(0xc000914780, 0x4000)
        c:/Go.tip/src/runtime/stack.go:894 +0x1a8
runtime.newstack()
        c:/Go.tip/src/runtime/stack.go:1078 +0x2b6
runtime.morestack()
        c:/Go.tip/src/runtime/asm_amd64.s:449 +0x97

goroutine 158 [copystack]:
runtime.gcMarkDone()
        c:/Go.tip/src/runtime/mgc.go:1444 +0x32c fp=0xc00080f388 sp=0xc00080f380 pc=0x41d38c
runtime.gcAssistAlloc(0xc000914780)
        c:/Go.tip/src/runtime/mgcmark.go:455 +0x225 fp=0xc00080f3e8 sp=0xc00080f388 pc=0x4201a5
runtime.mallocgc(0x60, 0x80dfa0, 0x1, 0xc000b3e000)
        c:/Go.tip/src/runtime/malloc.go:959 +0xa9c fp=0xc00080f488 sp=0xc00080f3e8 pc=0x40e4bc
runtime.growslice(0x80dfa0, 0xc000b3e000, 0x2, 0x2, 0x3, 0x0, 0x1, 0x2)
        c:/Go.tip/src/runtime/slice.go:230 +0x209 fp=0xc00080f4f0 sp=0xc00080f488 pc=0x44cac9
go/build.(*Context).Import(0xad2e60, 0x856278, 0x1, 0xc0008c60a8, 0x13, 0x0, 0xc000000008, 0xc00040dc78, 0xc000a06d58)
        c:/Go.tip/src/go/build/build.go:917 +0x279c fp=0xc00080fbc8 sp=0xc00080f4f0 pc=0x5a641c
go/build.(*Context).ImportDir(...)
        c:/Go.tip/src/go/build/build.go:458
cmd/go/internal/load.loadPackageData.func2(0xad2560, 0x7df1c0)
        c:/Go.tip/src/cmd/go/internal/load/pkg.go:795 +0x5e5 fp=0xc00080fca8 sp=0xc00080fbc8 pc=0x6d6245
cmd/go/internal/par.(*Cache).Do(0xad2560, 0x7df1c0, 0xc0007e6050, 0xc00040dea8, 0x818fe0, 0xc000668090)
        c:/Go.tip/src/cmd/go/internal/par/work.go:128 +0xff fp=0xc00080fd08 sp=0xc00080fca8 pc=0x5f947f
cmd/go/internal/load.loadPackageData(0xc000332287, 0x5, 0xc00012c091, 0x5, 0xc0003d6060, 0x13, 0xc00000c410, 0x9, 0xc00008c201, 0x1, ...)
        c:/Go.tip/src/cmd/go/internal/load/pkg.go:787 +0x4d7 fp=0xc00080ff20 sp=0xc00080fd08 pc=0x6c4077
cmd/go/internal/load.(*preload).preloadImports.func1(0xc000172000, 0x1, 0xc0007ac5c0, 0xc000332287, 0x5)
        c:/Go.tip/src/cmd/go/internal/load/pkg.go:945 +0xa6 fp=0xc00080ffb8 sp=0xc00080ff20 pc=0x6d6506
runtime.goexit()
        c:/Go.tip/src/runtime/asm_amd64.s:1376 +0x1 fp=0xc00080ffc0 sp=0xc00080ffb8 pc=0x46b4a1
created by cmd/go/internal/load.(*preload).preloadImports
        c:/Go.tip/src/cmd/go/internal/load/pkg.go:944 +0x19e

...
@egonelbre egonelbre changed the title runtime: debugBP = true crashes compiler compilation on Windows runtime: debugCheckBP = true crashes compiler compilation on Windows Oct 15, 2020
@toothrot
Copy link
Contributor

@toothrot toothrot added this to the Backlog milestone Oct 15, 2020
@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 15, 2020
@egonelbre
Copy link
Contributor Author

egonelbre commented Jan 4, 2021

Note, this also happens with latest go (b01fb2a).

@egonelbre
Copy link
Contributor Author

@zx2c4 maybe you know the answer to the question, whether debugCheckBP is intended to work on Windows.

@networkimprov
Copy link

cc @alexbrainman

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
Status: Triage Backlog
Development

No branches or pull requests

4 participants