Skip to content

x/tools/gopls: idle goroutine crashes in pthread_cond_wait [darwin] #81103

Open

Description

@adonovan
#!stacks
"crash/crash" && "mPark" && "notesleep" && "semasleep" && "runtime.pthread_cond_wait:+1"

Issue created by stacks.

TEXT runtime.pthread_cond_wait.abi0(SB) /var/folders/fy/dn6v01n16zjdwsqy_8qfbbxr000_9w/T/tmp.1KRwczq5uq/go/pkg/mod/golang.org/toolchain
@v0.0.1-go1.26.4.darwin-arm64/src/runtime/sys_darwin.go
  sys_darwin.go:487     0x10006d210             f81d0ffe                MOVD.W R30, -48(RSP)            
  sys_darwin.go:487     0x10006d214             f81f83fd                MOVD R29, -8(RSP)               
  sys_darwin.go:487     0x10006d218             d10023fd                SUB $8, RSP, R29                
  sys_darwin.go:487     0x10006d21c             b9004bff                MOVW ZR, 72(RSP)                
  sys_darwin.go:488     0x10006d220             f00000e0                ADRP 126976(PC), R0             
  sys_darwin.go:488     0x10006d224             91010000                ADD $64, R0, R0                 
  sys_darwin.go:488     0x10006d228             9100e3e1                ADD $56, RSP, R1                
  sys_darwin.go:488     0x10006d22c             94000099                CALL runtime.libcCall(SB)         <--- here? (PC points at last byte of CALL)
  sys_darwin.go:489     0x10006d230             f9401fe2                MOVD 56(RSP), R2                
...

This stack flnhRA was reported by telemetry:

golang.org/x/tools/gopls@v0.23.0 go1.26.4 darwin/arm64 gopls.client=claude,vscode (1)

Use this command to reproduce the executable:
(HOME=$(mktemp -d); GOOS=darwin GOARCH=arm64 GOTOOLCHAIN=go1.26.4 go install golang.org/x/tools/gopls@v0.23.0 && find $HOME/go/bin -type f)
To disassemble: go tool objdump exe | less

Activity

  1. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    goplsIssues related to the Go language server, gopls.
    ToolsThis label describes issues relating to any tools in the x/tools repository.
    on Aug 25, 2026
  2. added this to the Unreleased milestone on Aug 25, 2026
  3. adonovan commented on Aug 25, 2026

    @adonovan
    MemberAuthor

    @prattmic more random memory corruption, I assume, but the misaligned PC value is a bit odd.

  4. prattmic commented on Aug 25, 2026

    @prattmic
    Member

    I'm not sure if it translates to telemetry crash collection, but usually when I see stacks like this it's not because that thread actually crashed. Instead, the process was sent a process-wide signal (like SIGABRT), and this just happens to be the thread that the kernel chose to deliver to.

  5. prattmic commented on Aug 25, 2026

    @prattmic
    Member

    PC points at last byte of CALL

    The PC was probably the return instruction (next instruction). Go's traceback subtracts 1 from PCs in various cases to make sure it points into the CALL instead of the return PC.

  6. adonovan commented on Aug 25, 2026

    @adonovan
    MemberAuthor

    the process was sent a process-wide signal (like SIGABRT), and this just happens to be the thread that the kernel chose to deliver to.

    Ah, good to know. So this is a continuous shotgun of noise even on perfectly working hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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/telemetry-wins

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions