Skip to content

x/tools/gopls: SEGV in prolog of metadata.Graph.Update (bad g or sp) #74256

Open
@adonovan

Description

@adonovan
#!stacks
"sigpanic" && "metadata.(*Graph).Update:+0"

Issue created by stacks.

These are the only instructions at the indicated line:

TEXT golang.org/x/tools/gopls/internal/cache/metadata.(*Graph).Update(SB) /tmp/stacks-cache/tools/gopls/internal/ca
che/metadata/graph.go
  graph.go:40           0x100762910             f9400b90                MOVD 16(R28), R16                        <---- SEGV
  graph.go:40           0x100762914             d102c3f1                SUB $176, RSP, R17                      
  graph.go:40           0x100762918             eb10023f                CMP R16, R17                            
  graph.go:40           0x10076291c             540018e9                BLS 199(PC)                             
  graph.go:40           0x100762920             d104c3f4                SUB $304, RSP, R20                      
  graph.go:40           0x100762924             a93ffa9d                STP (R29, R30), -8(R20)                 
  graph.go:40           0x100762928             9100029f                MOVD R20, RSP                           
  graph.go:40           0x10076292c             d10023fd                SUB $8, RSP, R29                        

Only the initial load (MOVD) or later store (STP) can SEGV, so this indicates either a bad g register, or a g struct with a bad stack pointer.

This stack Lb6hkg was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.23.5 darwin/arm64 other,vscode-insiders (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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions