Skip to content

x/tools/gopls/internal/test/marker: "go/packages failed to return non-test standalone package" test failure #70363

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

Closed
gopherbot opened this issue Nov 15, 2024 · 13 comments
Assignees
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. gopls Issues related to the Go language server, gopls. 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

@gopherbot
Copy link
Contributor

gopherbot commented Nov 15, 2024

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`

Issue created automatically to collect these failures.

Example (log):

=== RUN   Test/codeaction/inline_resolve.txt
=== PAUSE Test/codeaction/inline_resolve.txt

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 15, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/codeaction/inline_resolve.txt"
2024-11-14 23:38 x_tools-gotip-linux-amd64-nocgo tools@b1c39aa3 go@f99f5da1 x/tools/gopls/internal/test/marker.Test/codeaction/inline_resolve.txt [ABORT] (log)
=== RUN   Test/codeaction/inline_resolve.txt
=== PAUSE Test/codeaction/inline_resolve.txt

watchflakes

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 15, 2024
@gopherbot gopherbot added this to the Unreleased milestone Nov 15, 2024
@adonovan adonovan changed the title x/tools/gopls/internal/test/marker: Test/codeaction/inline_resolve.txt failures x/tools/gopls/internal/test/marker: "go/packages failed to return non-test standalone package" test failure Nov 15, 2024
@adonovan
Copy link
Member

Typical error and stack:

/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/cache/load.go:196: go/packages failed to return non-test standalone package

goroutine 175131 [running]:
golang.org/x/tools/gopls/internal/util/bug.report({0xc022c58e40, 0x38})
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/util/bug/bug.go:83 +0x514
golang.org/x/tools/gopls/internal/util/bug.Errorf({0x11b9ab2?, 0xc01c146fc0?}, {0x0?, 0x1?, 0xc02d7b6f00?})
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/util/bug/bug.go:61 +0x35
golang.org/x/tools/gopls/internal/cache.(*Snapshot).load(0xc016ef66c0, {0x143c180, 0xc00ea75310}, 0x0, {0xc01640b638, 0x1, 0xc01640b580?})
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/cache/load.go:196 +0x2283
golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile(0xc016ef66c0, {0x143c180, 0xc00ea75310}, {0xc016ffcd80, 0x6b})
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/cache/snapshot.go:697 +0x305
golang.org/x/tools/gopls/internal/cache.(*Snapshot).orphanedFileDiagnostics(0xc016ef66c0, {0x143c180, 0xc00ea75310}, {0xc027b958e0, 0x3, 0xc01a2cdc10?})
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/cache/snapshot.go:1289 +0x1b4
golang.org/x/tools/gopls/internal/cache.(*Session).OrphanedFileDiagnostics(0xc02fe51260, {0x143c180, 0xc00ea75310})
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/cache/session.go:1199 +0x60c
golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews(0xc02d23fb00, {0x143c180, 0xc00ea75310}, 0x3, 0xc0245fe2a0, 0x0)
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/server/diagnostics.go:175 +0x538
golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles.func2()
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/server/text_synchronization.go:270 +0x34
created by golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles in goroutine 175190
	/home/swarming/.swarming/w/ir/x/w/targetrepo499528649/gopls/internal/server/text_synchronization.go:269 +0x507

@findleyr
Copy link
Member

This new test requires cgo. However, it does suggest that this bug report is misguided.

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/628017 mentions this issue: gopls/internal/cache: fix handling of cgo standalone files

@findleyr findleyr added the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Nov 15, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`
2024-11-14 19:13 x_tools-gotip-linux-amd64-nocgo tools@221e94d0 go@672a53de x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 19:44 x_tools-go1.22-linux-amd64-nocgo tools@3c20e3f6 release-branch.go1.22@8af39d30 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 19:44 x_tools-gotip-linux-amd64-nocgo tools@3c20e3f6 go@f99f5da1 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 23:37 x_tools-go1.23-linux-amd64-nocgo tools@29f4edbc release-branch.go1.23@c390a1c2 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 23:37 x_tools-gotip-linux-amd64-nocgo tools@29f4edbc go@f99f5da1 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 23:37 x_tools-go1.22-linux-amd64-nocgo tools@c043599d release-branch.go1.22@8af39d30 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 23:37 x_tools-go1.23-linux-amd64-nocgo tools@c043599d release-branch.go1.23@c390a1c2 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 23:37 x_tools-gotip-linux-amd64-nocgo tools@c043599d go@f99f5da1 x/tools/gopls/internal/test/marker.Test/completion/imported-std.txt [ABORT] (log)
=== RUN   Test/completion/imported-std.txt
=== PAUSE Test/completion/imported-std.txt
2024-11-14 23:38 x_tools-go1.22-linux-amd64-nocgo tools@b1c39aa3 release-branch.go1.22@8af39d30 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-14 23:38 x_tools-go1.23-linux-amd64-nocgo tools@b1c39aa3 release-branch.go1.23@c390a1c2 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-15 16:15 x_tools-go1.22-linux-amd64-nocgo tools@56ec1110 release-branch.go1.22@8af39d30 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-15 16:15 x_tools-go1.23-linux-amd64-nocgo tools@56ec1110 release-branch.go1.23@c390a1c2 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-15 16:15 x_tools-gotip-linux-amd64-nocgo tools@56ec1110 go@400433af x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-15 16:16 x_tools-go1.22-linux-amd64-nocgo tools@254baba6 release-branch.go1.22@8af39d30 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt
2024-11-15 16:16 x_tools-go1.23-linux-amd64-nocgo tools@254baba6 release-branch.go1.23@c390a1c2 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`
2024-11-15 16:16 x_tools-gotip-linux-amd64-nocgo tools@254baba6 go@18c2461a x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`
2024-11-15 16:16 x_tools-gotip-linux-amd64-nocgo tools@254baba6 go@0531768b x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`
2024-11-15 16:16 x_tools-gotip-linux-amd64-nocgo tools@254baba6 go@6a2fb154 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`
2024-11-15 16:16 x_tools-gotip-linux-amd64-nocgo tools@254baba6 go@49b3ab0d x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`
2024-11-15 16:16 x_tools-gotip-linux-amd64-nocgo tools@254baba6 go@47da5a30 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && builder ~ `nocgo`
2024-11-15 16:16 x_tools-gotip-linux-amd64-nocgo tools@254baba6 go@a867e5e5 x/tools/gopls/internal/test/marker.Test/callhierarchy/issue64451.txt [ABORT] (log)
=== RUN   Test/callhierarchy/issue64451.txt
=== PAUSE Test/callhierarchy/issue64451.txt

watchflakes

@timothy-king
Copy link
Contributor

Stack trace:

panic: /home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/cache/load.go:196: go/packages failed to return non-test standalone package

goroutine 75695 [running]:
golang.org/x/tools/gopls/internal/util/bug.report({0xc034e35d00, 0x38})
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/util/bug/bug.go:83 +0x514
golang.org/x/tools/gopls/internal/util/bug.Errorf({0x11b9f0f?, 0xc01611bc00?}, {0x0?, 0x1?, 0xc0077b02d0?})
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/util/bug/bug.go:61 +0x35
golang.org/x/tools/gopls/internal/cache.(*Snapshot).load(0xc00f3179e0, {0x143c820, 0xc00f335220}, 0x0, {0xc01fc9b638, 0x1, 0x10?})
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/cache/load.go:196 +0x2283
golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile(0xc00f3179e0, {0x143c820, 0xc00f335220}, {0xc01adf0d00, 0x6b})
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/cache/snapshot.go:697 +0x305
golang.org/x/tools/gopls/internal/cache.(*Snapshot).orphanedFileDiagnostics(0xc00f3179e0, {0x143c820, 0xc00f335220}, {0xc01dea43c0, 0x3, 0xc00f0d0c00?})
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/cache/snapshot.go:1289 +0x1b4
golang.org/x/tools/gopls/internal/cache.(*Session).OrphanedFileDiagnostics(0xc00ce77f10, {0x143c820, 0xc00f335220})
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/cache/session.go:1199 +0x60c
golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews(0xc029d4f380, {0x143c820, 0xc00f335220}, 0x3, 0xc02a0a7890, 0x0)
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/server/diagnostics.go:175 +0x538
golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles.func2()
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/server/text_synchronization.go:270 +0x34
created by golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles in goroutine 75912
	/home/swarming/.swarming/w/ir/x/w/targetrepo636595513/gopls/internal/server/text_synchronization.go:269 +0x507
FAIL	golang.org/x/tools/gopls/internal/test/marker	8.183s

@findleyr
Copy link
Member

Yep, the associated pending CL fixes this flake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. gopls Issues related to the Go language server, gopls. 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
Archived in project
Development

No branches or pull requests

4 participants