Skip to content

x/tools/gopls: "negative WaitGroup counter" panic in diagnoseChangedViews #71177

Closed as not planned
@adonovan

Description

@adonovan
#!stacks
"runtime.gopanic" && "sync.(*WaitGroup).Add:+19" && "diagnoseChangedViews.func1:+16`"

Issue created by stacks.

func (wg *WaitGroup) Add(delta int) {
...
	state := wg.state.Add(uint64(delta) << 32)
	v := int32(state >> 32)
	w := uint32(state)
...
	if v < 0 {
		panic("sync: negative WaitGroup counter") // <---------- here
	}

This stack OKWeGA was reported by telemetry:

golang.org/x/tools/[email protected] go1.23.3 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.compiler/runtimeIssues related to the Go compiler and/or runtime.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

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions