Failed to deference *G (EOF)

32 views
Skip to first unread message

Karan Chaudhary

unread,
Sep 24, 2018, 8:39:55 AM9/24/18
to delve-dev

Hi,

I'm trying to debug a production issue using coredump of Go program.

Go version: go1.11 linux/amd64
Delve: Build: $Id: 1990ba12450cab9425a2ae62e6ab988725023d5c $
Gdb version: 8.2
 
(dlv) goroutines
Command failed: error derefing *G EOF

But on local it seems to work fine with same config. 

Thank,
Karan

Alessandro Arzilli

unread,
Sep 25, 2018, 9:54:30 AM9/25/18
to delv...@googlegroups.com
See if https://github.com/derekparker/delve/pull/1354 solves the
problem. I imagine the problem is that the coredump was taken as the
list of goroutines changed (either that or it's incomplete, or for some
reason we can't read the core file correctly).
> --
> You received this message because you are subscribed to the Google
> Groups "delve-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to delve-dev+...@googlegroups.com
> <mailto:delve-dev+...@googlegroups.com>.
> To post to this group, send email to delv...@googlegroups.com
> <mailto:delv...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/delve-dev/3b3bfaa3-83d5-4676-b974-1fec40e5bf53%40googlegroups.com
> <https://groups.google.com/d/msgid/delve-dev/3b3bfaa3-83d5-4676-b974-1fec40e5bf53%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Karan Chaudhary

unread,
Nov 18, 2018, 2:05:31 AM11/18/18
to delve-dev
Thanks for the clean fix alessandro .  
As a way to skip the problem I had done this.


diff --git a/pkg/proc/proc.go b/pkg/proc/proc.go
index
3e88943..14fab21 100644
--- a/pkg/proc/proc.go
+++ b/pkg/proc/proc.go
@@ -497,7 +497,9 @@ func GoroutinesInfo(dbp Process) ([]*G, error) {
               
}
                g
, err := gvar.parseG()
               
if err != nil {
-                       return nil, err
+                       fmt.Println("bad g:", err)
+                       continue
+                       //return nil, err
               
}
               
if thg, allocated := threadg[g.ID]; allocated {
                        loc
, err := thg.Thread.Location()
Reply all
Reply to author
Forward
0 new messages