Skip to content

x/tools/gopls: sigpanic in persistent.(*mapNode).forEach (bad SP) #71115

Open
@adonovan

Description

@adonovan
#!stacks
"runtime.sigpanic" && "persistent.(*mapNode).forEach:+1"

Issue created by stacks.

This stack looks wrong, perhaps another example of the off-by-one problems in the traceback?
(Is it possible that somehow the tree has become a cyclic graph and what we are seeing is a stack overflow? The line number supports that, but I would expect the failure in that case to occur in runtime.morestack_noctxt.)

func (node *mapNode) forEach(f func(key, value any)) {
	if node == nil {   // <--- sigpanic
		return
	}
	node.left.forEach(f)
	f(node.key, node.value.value)
	node.right.forEach(f)
}

This stack dVh6PA was reported by telemetry:

golang.org/x/tools/[email protected] go1.23.2 linux/amd64 vscode (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/memory-corruption"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)gopls/telemetry-wins

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions