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/gopls: runtime abort in go statement #71814

Open
adonovan opened this issue Feb 18, 2025 · 5 comments
Open

x/tools/gopls: runtime abort in go statement #71814

adonovan opened this issue Feb 18, 2025 · 5 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls/telemetry-wins 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

@adonovan
Copy link
Member

adonovan commented Feb 18, 2025

#!stacks
"runtime.systemstack_switch:+4" && "runtime.newproc:+3"

Issue created by stacks.

This stack D9Rnmg was reported by telemetry:

TEXT runtime·systemstack_switch(SB), NOSPLIT, $0-0
	UNDEF
	// Make sure this function is not leaf,
	// so the frame is saved.
	CALL	runtime·abort(SB)          <--- here?  What about UNDEF??
	RET
golang.org/x/tools/[email protected] go1.23.4 linux/amd64 vscode (1)

@golang/runtime

@adonovan adonovan added gopls Issues related to the Go language server, gopls. gopls/telemetry-wins 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. labels Feb 18, 2025
@gopherbot gopherbot added this to the Unreleased milestone Feb 18, 2025
@prattmic
Copy link
Member

runtime.systemstack puts systemstack_switch+8 as the saved PC. That is probably in the middle of that CALL instruction. systemstack_switch shouldn't actually be getting called. I think there is just a throw while on the systemstack and we aren't collecting the systemstack frames (which would be a nice improvement)

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Feb 18, 2025
@findleyr
Copy link
Member

@prattmic sorry I didn't entirely follow that--are you saying that the crash was likely somewhere in this function of the runtime, or that it could be in gopls logic?

@prattmic
Copy link
Member

Correct, somewhere transitively called from that closure you linked to. There is a trivially user-triggerable crash here if fn is nil in go fn(), though that doesn't look possible in this case.

The other cases seem to be either out of memory, or various internal runtime assertions.

@findleyr
Copy link
Member

Thanks. An OOM is certainly plausible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls/telemetry-wins 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
None yet
Development

No branches or pull requests

5 participants