Skip to content

Data race when handing out checkers #1168

@jakebailey

Description

@jakebailey
==================
WARNING: DATA RACE
Write at 0x00c0180e0510 by goroutine 9941:
  runtime.mapassign_fast64ptr()
      /home/jabaile/sdk/gotip/src/internal/runtime/maps/runtime_fast64_swiss.go:372 +0x0
  github.com/microsoft/typescript-go/internal/project.(*checkerPool).getCheckerLocked()
      /home/jabaile/work/TypeScript-go/internal/project/checkerpool.go:115 +0x2a4
  github.com/microsoft/typescript-go/internal/project.(*checkerPool).GetCheckerForFile()
      /home/jabaile/work/TypeScript-go/internal/project/checkerpool.go:73 +0x592
  github.com/microsoft/typescript-go/internal/compiler.(*Program).getSemanticDiagnosticsForFile()
      /home/jabaile/work/TypeScript-go/internal/compiler/program.go:431 +0x141
  github.com/microsoft/typescript-go/internal/compiler.(*Program).getSemanticDiagnosticsForFile-fm()
      <autogenerated>:1 +0x55
  github.com/microsoft/typescript-go/internal/compiler.(*Program).getDiagnosticsHelper()
      /home/jabaile/work/TypeScript-go/internal/compiler/program.go:600 +0x1fc
  github.com/microsoft/typescript-go/internal/compiler.(*Program).GetSemanticDiagnostics()
      /home/jabaile/work/TypeScript-go/internal/compiler/program.go:375 +0x1e7
  github.com/microsoft/typescript-go/internal/ls.(*LanguageService).GetDocumentDiagnostics()
      /home/jabaile/work/TypeScript-go/internal/ls/diagnostics.go:20 +0x1fa
  github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDocumentDiagnostic()
      /home/jabaile/work/TypeScript-go/internal/lsp/server.go:630 +0x15e
  github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification()
      /home/jabaile/work/TypeScript-go/internal/lsp/server.go:475 +0x6fd
  github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
      /home/jabaile/work/TypeScript-go/internal/lsp/server.go:365 +0x104

Previous read at 0x00c0180e0510 by goroutine 9939:
  runtime.mapaccess1_fast64()
      /home/jabaile/sdk/gotip/src/internal/runtime/maps/runtime_fast64_swiss.go:17 +0x0
  github.com/microsoft/typescript-go/internal/project.(*checkerPool).getRequestCheckerLocked()
      /home/jabaile/work/TypeScript-go/internal/project/checkerpool.go:134 +0x16a
  github.com/microsoft/typescript-go/internal/project.(*checkerPool).GetAllCheckers()
      /home/jabaile/work/TypeScript-go/internal/project/checkerpool.go:96 +0x125
  github.com/microsoft/typescript-go/internal/compiler.(*Program).getSemanticDiagnosticsForFile()
      /home/jabaile/work/TypeScript-go/internal/compiler/program.go:435 +0x1f1
  github.com/microsoft/typescript-go/internal/compiler.(*Program).getSemanticDiagnosticsForFile-fm()
      <autogenerated>:1 +0x55
  github.com/microsoft/typescript-go/internal/compiler.(*Program).getDiagnosticsHelper()
      /home/jabaile/work/TypeScript-go/internal/compiler/program.go:600 +0x1fc
  github.com/microsoft/typescript-go/internal/compiler.(*Program).GetSemanticDiagnostics()
      /home/jabaile/work/TypeScript-go/internal/compiler/program.go:375 +0x1e7
  github.com/microsoft/typescript-go/internal/ls.(*LanguageService).GetDocumentDiagnostics()
      /home/jabaile/work/TypeScript-go/internal/ls/diagnostics.go:20 +0x1fa
  github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDocumentDiagnostic()
      /home/jabaile/work/TypeScript-go/internal/lsp/server.go:630 +0x15e
  github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification()
      /home/jabaile/work/TypeScript-go/internal/lsp/server.go:475 +0x6fd
  github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
      /home/jabaile/work/TypeScript-go/internal/lsp/server.go:365 +0x104

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions