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

panic: bad uint16 type uintptr #33

Open
prologic opened this issue Feb 16, 2025 · 1 comment
Open

panic: bad uint16 type uintptr #33

prologic opened this issue Feb 16, 2025 · 1 comment

Comments

@prologic
Copy link

Describe the bug

I tried to follow the README and attach grf to a running yarnd process like so:

panic: bad uint16 type uintptr

goroutine 1 [running]:
github.com/cloudwego/goref/pkg/proc.(*region).Uint16(0x14000e47da0?)
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/pkg/proc/region.go:140 +0xc4
github.com/cloudwego/goref/pkg/proc.(*HeapScope).addSpecial(0x1400601c000, 0x14000e47bf0, 0x1400061cfc0, 0x1)
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/pkg/proc/heap.go:599 +0xcc
github.com/cloudwego/goref/pkg/proc.(*HeapScope).readAllSpans(0x1400601c000, 0x14000d6d290, 0x1, 0x1)
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/pkg/proc/heap.go:231 +0x344
github.com/cloudwego/goref/pkg/proc.(*HeapScope).readHeap(0x1400601c000)
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/pkg/proc/heap.go:190 +0x23c
github.com/cloudwego/goref/pkg/proc.ObjectReference(0x140000680f0, {0x10479ce1c, 0x7})
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/pkg/proc/reference.go:470 +0xec
github.com/cloudwego/goref/cmd/grf/cmds.execute(0x965c, {0x0, 0x0}, {0x0, 0x0}, {0x10479ce1c, 0x7}, 0x14000192500)
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/cmd/grf/cmds/commands.go:165 +0x388
github.com/cloudwego/goref/cmd/grf/cmds.attachCmd(0x140001da100?, {0x14000122700?, 0x1?, 0x104799abf?})
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/cmd/grf/cmds/commands.go:127 +0xf0
github.com/spf13/cobra.(*Command).execute(0x140001ec308, {0x140001226c0, 0x1, 0x1})
	/Users/prologic/go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0x818
github.com/spf13/cobra.(*Command).ExecuteC(0x140001ec008)
	/Users/prologic/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(0x104c39428?)
	/Users/prologic/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041 +0x1c
main.main()
	/Users/prologic/go/pkg/mod/github.com/cloudwego/[email protected]/cmd/grf/main.go:22 +0x24

This results in a Go panic somewhere in your codebase. I haven't tried to debug this yet.

To Reproduce

Steps to reproduce the behavior:

  1. Clone the yarn project
  2. Build a debug version: make build DEBUG=1 and run it.
  3. Attach grf to the pid.
  4. See error

Expected behavior

Well obviously I don't expect grf to crash.

Goref version:

Whatever the latest version was from today.

Environment:

Go v1.24 on macOS (Darwin).

@jayantxie
Copy link
Member

Not support Go1.24 yet. Will fix it soon.

@jayantxie jayantxie mentioned this issue Feb 19, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants