-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Delve getting stuck on intentional sigpanic trigger (via go-stack package) #594
Comments
What operating system are you using? Can you give me some step to reproduce this problem?
but I have no problem debugging it. |
I am facing the same issue on windows 10 and here is the output of go env set GOARCH=amd64 the file I try to debug is The delve debug output:
|
I'm going to assume the original issue was about windows as well. |
Hi, |
I'm having the same issue. go version: go1.8.1 darwin/amd64 Debug logs show:
Breakpoints show my breakpoint, but it doesn't get reached. It gets stuck at // findSigpanic intentionally executes faulting code to generate a stack trace
// containing an entry for runtime.sigpanic.
func findSigpanic() *runtime.Func {
var fn *runtime.Func
var p *int
func() int {
defer func() {
if p := recover(); p != nil {
var pcs [512]uintptr
n := runtime.Callers(2, pcs[:])
for _, pc := range pcs[:n] {
f := runtime.FuncForPC(pc)
if f.Name() == "runtime.sigpanic" {
fn = f
break
}
}
}
}()
// intentional nil pointer dereference to trigger sigpanic
return *p // LINE 228
}()
return fn
} Here is a repo I made to duplicate the issue. It uses glide package manager to ensure dependencies are the same. |
This can't be supported on the lldb backend, either switch to the native backend or do not use go-stack. |
I've opened this issue on go-stack to address this. Is there any way, in the mean time, to force delve to ignore either this specific exception or this file/package entirely to continue debugging? I'm guessing not, since the issue appears to be related to the fact that LLVM cannot intercept this signal at all, but worth a shot. |
No, sorry. |
…o-delve#598) * proc: changed windows backend to deal with simultaneous breakpoints * bugfix: forgot to add windowsPrologue3 to the prologues list in e4c7df1 * Tolerate errors returned by Stacktrace in TestStacktraceGoroutine. * bugfix: proc: propagate debug events we don't cause back to the target process Fixes: go-delve#594 * proc: fixed TestStepConcurrentPtr Implementation of nextInProgress was wrong.
I'm using the log15 package for logging, which uses the go-stack package for stack tracing.
There is a particular line/method within the go-stack package that intentionally triggers a sigpanic:
https://github.com/go-stack/stack/blob/master/stack.go#L228
Due to this line, the debugger just keeps breaking at this same place over and over, and never allows me to continue or step over it, constantly printing out "continuing" from this line:
https://github.com/derekparker/delve/blob/master/service/debugger/debugger.go#L393
Not sure where to start in troubleshooting this.
The text was updated successfully, but these errors were encountered: