go-delve / delve

Delve is a debugger for the Go programming language.
MIT License
22.37k stars 2.13k forks source link

trace: allow tracing from (or skip tracing on) G-less threads #3758

Closed aktau closed 2 days ago

aktau commented 1 week ago

Delve version:

  1. What version of Delve are you using (dlv version)? Version: 1.22.1
  2. What version of Go are you using? (go version)? go version 1.23 pre-release +7f76c00fc5
  3. What operating system and processor architecture are you using? Linux AMD64
  4. What did you do? dlv trace '.*mallocgc.*' )
  5. What did you expect to see? No crashing
  6. What did you see instead? A crash

Program:

package main

func main() {
        x := make([]byte, 2147483632)
        y := make([]byte, 2147483632)
        _, _ = x, y
        for {
        }
}

Crash:

$ dlv trace '.*mallocgc.*' 
> goroutine(0): runtime.mallocgc()
no G executing on thread 2379080