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

x/tools/cmd/guru: "panic: internal error in pointer analysis: not a tagged object" #27235

Closed
pennz opened this issue Aug 26, 2018 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@pennz
Copy link

pennz commented Aug 26, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10.1 darwin/amd64 and go version go1.11 darwin/amd64

Does this issue reproduce with the latest release?

Yes. It can be reproduced with the guru right after I upgraded to go 1.11 and ran go get -v -u golang.org/x/tools/...

System details

go version go1.11 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/vincent/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/vincent/works/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOROOT/bin/go version: go version go1.11 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.11
uname -v: Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.13.3
BuildVersion:	17D102
lldb --version: lldb-902.0.79.7
  Swift-4.1

What did you do?

go get -u v2ray.com/core/...
go get -u v2ray.com/ext/...
go install v2ray.com/ext/tools/build/vbuild # to generate the script for building the binary
$GOPATH/bin/vbuild #build, and building will pass

guru -scope v2ray.com/core callers $GOPATH/src/v2ray.com/core/proxy/vmess/inbound/inbound.go:#5662

The commit id for the code of v2ray.com/core is d828aa2fbaeb4c605fb9ee3dac73e8058b53e060.
v2ray.com/core/proxy/vmess/inbound/inbound.go:#5662 is the function name in Line 221 of https://play.golang.org/p/h-6fxISgsHt .

What did you expect to see?

Show the callers of the function Process in the code.

What did you see instead?

in go1.11 darwin/amd64

Internal panic in pointer analysis:
goroutine 1 [running]:
runtime/debug.Stack(0x24, 0x0, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
	/usr/local/go/src/runtime/debug/stack.go:16 +0x22
golang.org/x/tools/go/pointer.Analyze.func1(0xc05c19fcc8)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/analysis.go:227 +0x10b
panic(0x13027a0, 0xc01b82e060)
	/usr/local/go/src/runtime/panic.go:513 +0x1b9
golang.org/x/tools/go/pointer.(*analysis).taggedValue(0xc004d168c0, 0xc00001f80d, 0x1, 0x64, 0xc0151a8700)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/gen.go:272 +0x12a
golang.org/x/tools/go/pointer.(*typeFilterConstraint).solve(0xc01ab61680, 0xc004d168c0, 0xc02568d700)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/solve.go:273 +0xae
golang.org/x/tools/go/pointer.(*analysis).solveConstraints(0xc004d168c0, 0xc03176b5f0, 0xc02568d700)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/solve.go:165 +0x170
golang.org/x/tools/go/pointer.(*analysis).solve(0xc004d168c0)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/solve.go:59 +0x2e0
golang.org/x/tools/go/pointer.Analyze(0xc019fba780, 0x0, 0x1407b40, 0xc01b82e080)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/analysis.go:331 +0x4ce
main.ptrAnalysis(0xc019fba780, 0xc00c558390)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:316 +0x2b
main.callers(0xc0001100f0, 0x7, 0x137de3c)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/callers.go:72 +0x51d
main.Run(0x7ffeefbff8d3, 0x7, 0xc0001100f0, 0x1, 0xc0000f4200)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:88 +0x2b7
main.main()
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/main.go:222 +0x38f
panic: internal error in pointer analysis: not a tagged object: n129037 (please report this bug)

goroutine 1 [running]:
main.ptrAnalysis(0xc019fba780, 0xc00c558390)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:318 +0x65
main.callers(0xc0001100f0, 0x7, 0x137de3c)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/callers.go:72 +0x51d
main.Run(0x7ffeefbff8d3, 0x7, 0xc0001100f0, 0x1, 0xc0000f4200)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:88 +0x2b7
main.main()
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/main.go:222 +0x38f
FAIL: 2

in go1.10.1 darwin/amd64

$ guru -scope v2ray.com/core callers ~/works/go/src/v2ray.com/core/proxy/vmess/inbound/inbound.go:#5662                                                          [19:50:38]
Internal panic in pointer analysis:
goroutine 1 [running]:
runtime/debug.Stack(0x24, 0x0, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
	/usr/local/go/src/runtime/debug/stack.go:16 +0x22
golang.org/x/tools/go/pointer.Analyze.func1(0xc45740bc18)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/analysis.go:227 +0x110
panic(0x12f1400, 0xc444c04440)
	/usr/local/go/src/runtime/panic.go:502 +0x229
golang.org/x/tools/go/pointer.(*analysis).taggedValue(0xc44648c380, 0xc40001ee52, 0x1, 0x64, 0xc431852000)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/gen.go:272 +0x13a
golang.org/x/tools/go/pointer.(*typeFilterConstraint).solve(0xc44a0e93a0, 0xc44648c380, 0xc42f838340)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/solve.go:273 +0xae
golang.org/x/tools/go/pointer.(*analysis).solveConstraints(0xc44648c380, 0xc4446c3890, 0xc42f838340)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/solve.go:165 +0xa9
golang.org/x/tools/go/pointer.(*analysis).solve(0xc44648c380)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/solve.go:59 +0x2fb
golang.org/x/tools/go/pointer.Analyze(0xc43657b630, 0x0, 0x13dca80, 0xc444c04450)
	/Users/vincent/works/go/src/golang.org/x/tools/go/pointer/analysis.go:331 +0x51d
main.ptrAnalysis(0xc43657b630, 0xc446795f70)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:316 +0x2b
main.callers(0xc4200fc230, 0x7, 0x136e8c4)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/callers.go:72 +0x55a
main.Run(0x7ffeefbff8d3, 0x7, 0xc4200fc230, 0x1, 0xc4200f6230)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:88 +0x2d4
main.main()
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/main.go:222 +0x3a3
panic: internal error in pointer analysis: not a tagged object: n126546 (please report this bug)

goroutine 1 [running]:
main.ptrAnalysis(0xc43657b630, 0xc446795f70)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:318 +0x65
main.callers(0xc4200fc230, 0x7, 0x136e8c4)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/callers.go:72 +0x55a
main.Run(0x7ffeefbff8d3, 0x7, 0xc4200fc230, 0x1, 0xc4200f6230)
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/guru.go:88 +0x2d4
main.main()
	/Users/vincent/works/go/src/golang.org/x/tools/cmd/guru/main.go:222 +0x3a3
FAIL: 2
@FiloSottile FiloSottile changed the title guru callers got Internal panic in pointer analysis x/tools/cmd/guru: "panic: internal error in pointer analysis: not a tagged object" Aug 30, 2018
@gopherbot gopherbot added this to the Unreleased milestone Aug 30, 2018
@FiloSottile FiloSottile added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 30, 2018
@FiloSottile FiloSottile modified the milestones: Unreleased, Go1.12 Aug 30, 2018
@FiloSottile
Copy link
Contributor

/cc @alandonovan

@FiloSottile FiloSottile modified the milestones: Go1.12, Unreleased Aug 30, 2018
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
@pennz pennz closed this as completed Aug 12, 2020
@golang golang locked and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants