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: WinDBG can't unwind runtime.mcall #67007

Closed
qmuntal opened this issue Apr 24, 2024 · 1 comment
Closed

runtime: WinDBG can't unwind runtime.mcall #67007

qmuntal opened this issue Apr 24, 2024 · 1 comment
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Debugging OS-Windows

Comments

@qmuntal
Copy link
Contributor

qmuntal commented Apr 24, 2024

Go version

go version devel go1.23-0304d035cd Tue Apr 23 02:53:00 2024 +0000 windows/amd64

Output of go env in your module/workspace:

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\qmuntaldiaz\AppData\Local\go-build
set GOENV=C:\Users\qmuntaldiaz\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\qmuntaldiaz\go\pkg\mod
set GONOPROXY=github.com/microsoft/*,dev.azure.com/*
set GONOSUMDB=github.com/microsoft/*,dev.azure.com/*
set GOOS=windows
set GOPATH=C:\Users\qmuntaldiaz\go
set GOPRIVATE=github.com/microsoft/*,dev.azure.com/*
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\qmuntaldiaz\code\golang-go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Users\qmuntaldiaz\code\golang-go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=devel go1.23-0304d035cd Tue Apr 23 02:53:00 2024 +0000
set GODEBUG=
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\qmuntaldiaz\code\gotest\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\QMUNTA~1\AppData\Local\Temp\go-build402316087=/tmp/go-build -gno-record-gcc-switches

What did you do?

  1. Build the following program:
package main

import (
	"runtime"
	"time"
)

func main() {
	runtime.Breakpoint()
	time.Sleep(10 * time.Minute)
}
  1. Run it with WinDBG with the following command:
> g
> g KERNELBASE!GetQueuedCompletionStatusEx

What did you see happen?

The stack traces show some corrupted entries and a partial g0 stack:

image

What did you expect to see?

The stack traces should reach the main function and attribute the runtime.mcall to the userland time.Sleep call:

image

@qmuntal qmuntal self-assigned this Apr 24, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Apr 24, 2024
@gopherbot
Copy link

Change https://go.dev/cl/581335 mentions this issue: runtime: fix mcall unwinding on Windows

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. Debugging OS-Windows
Projects
Development

No branches or pull requests

2 participants