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

cmd/go: panic: internal error: can't find reason for requirement #56662

Closed
rsc opened this issue Nov 8, 2022 · 3 comments
Closed

cmd/go: panic: internal error: can't find reason for requirement #56662

rsc opened this issue Nov 8, 2022 · 3 comments
Assignees
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Nov 8, 2022

Reproduction case for an internal error panic in cmd/go.

% cd golang.org/x/build
% git change 432398/2
git-codereview: changed to CL 432398/2.
	internal/diff: copy from main repo
% git checkout 'HEAD^' go.mod go.sum
Updated 2 paths from 9c7ed77c
% go get golang.org/x/tools
panic: internal error: can't find reason for requirement on golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c

goroutine 1 [running]:
cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc00063f188, 0x11}, {0xc000028f30, 0x22}})
	/Users/rsc/go/src/cmd/go/internal/modget/get.go:1760 +0xd4
cmd/go/internal/modget.(*resolver).updateBuildList(0xc000138000, {0x172fb70, 0xc00002a158}, {0x0, 0x0, 0x0})
	/Users/rsc/go/src/cmd/go/internal/modget/get.go:1765 +0x54c
cmd/go/internal/modget.(*resolver).resolveQueries(0xc000138000, {0x172fb70, 0xc00002a158}, {0xc000014058, 0x1, 0xc0000b5d78?})
	/Users/rsc/go/src/cmd/go/internal/modget/get.go:1243 +0x1a5
cmd/go/internal/modget.runGet({0x172fb70, 0xc00002a158}, 0xc00002c528?, {0xc0000241d0, 0x1, 0x1})
	/Users/rsc/go/src/cmd/go/internal/modget/get.go:314 +0x408
main.invoke(0x1a3e2e0, {0xc0000241c0, 0x2, 0x2})
	/Users/rsc/go/src/cmd/go/main.go:225 +0x3d9
main.main()
	/Users/rsc/go/src/cmd/go/main.go:179 +0x7ce
% 

/cc @bcmills

@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Nov 8, 2022
@rsc rsc added this to the Go1.20 milestone Nov 8, 2022
@bcmills bcmills self-assigned this Nov 9, 2022
@bcmills bcmills added GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Nov 9, 2022
@bcmills
Copy link
Contributor

bcmills commented Nov 9, 2022

This is likely a duplicate of #56494, but assigning to myself to verify that the fix for that also addresses this reproducer.

@gopherbot gopherbot removed the NeedsFix The path to resolution is known, but the work has not been done. label Nov 9, 2022
@bcmills bcmills modified the milestones: Go1.20, Go1.21 Dec 12, 2022
@kokizzu
Copy link

kokizzu commented Apr 24, 2023

Hmm.. got same issue when doing this:

go get -u -v github.com/kokizzu/gotro@v1.2824.2048

go: downloading github.com/kokizzu/gotro v1.2824.2048
panic: internal error: can't find reason for requirement on github.com/jackc/puddle@v1.2.1

goroutine 1 [running]:
cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc000a5a300, 0x17}, {0xc000034f60, 0x6}})
        /usr/lib/go-1.20/src/cmd/go/internal/modget/get.go:1760 +0xd4
cmd/go/internal/modget.(*resolver).updateBuildList(0xc0007fa000, {0xb447f8, 0xc0000340d8}, {0xc000ad9000, 0x4c, 0x80})
        /usr/lib/go-1.20/src/cmd/go/internal/modget/get.go:1765 +0x54c
cmd/go/internal/modget.(*resolver).applyUpgrades(0xc0007fa000, {0xb447f8, 0xc0000340d8}, {0xc000447000?, 0x4c, 0xc0000e1d70?})
        /usr/lib/go-1.20/src/cmd/go/internal/modget/get.go:1312 +0x465
cmd/go/internal/modget.runGet({0xb447f8, 0xc0000340d8}, 0xc000030840?, {0xc0000240e0, 0x1, 0x1})
        /usr/lib/go-1.20/src/cmd/go/internal/modget/get.go:351 +0x458
main.invoke(0xe5c320, {0xc0000240b0, 0x4, 0x4})
        /usr/lib/go-1.20/src/cmd/go/main.go:225 +0x3d9
main.main()
        /usr/lib/go-1.20/src/cmd/go/main.go:179 +0x7ce

after removing jackc/puddle // indirect from go.mod it works fine now.

@bcmills
Copy link
Contributor

bcmills commented Apr 24, 2023

Duplicate of #56494

@bcmills bcmills marked this as a duplicate of #56494 Apr 24, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2023
@golang golang locked and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants