Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Data race in BuildContext() #244

Closed
keegancsmith opened this issue Feb 27, 2018 · 1 comment
Closed

Data race in BuildContext() #244

keegancsmith opened this issue Feb 27, 2018 · 1 comment
Assignees

Comments

@keegancsmith
Copy link
Member

==================
WARNING: DATA RACE
Read at 0x000001149900 by goroutine 49:
  github.com/sourcegraph/go-langserver/langserver.(*LangHandler).BuildContext()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/build_context.go:37 +0x579
  github.com/sourcegraph/go-langserver/langserver.(*LangHandler).typecheck()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/loader.go:51 +0x588
Previous write at 0x000001149900 by goroutine 18:
  github.com/sourcegraph/go-langserver/langserver.TestIntegration_FileSystem.func1()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/integration_test.go:29 +0x4a
  github.com/sourcegraph/go-langserver/langserver.TestIntegration_FileSystem()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/integration_test.go:138 +0x1bd4
  testing.tRunner()
      /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/testing/testing.go:746 +0x16c
Goroutine 49 (running) created at:
  github.com/sourcegraph/go-langserver/langserver.(*LangHandler).Handle()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/handler.go:396 +0x685
  github.com/sourcegraph/go-langserver/langserver.(*LangHandler).handle()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/handler.go:137 +0x7f
  github.com/sourcegraph/go-langserver/langserver.(*LangHandler).(github.com/sourcegraph/go-langserver/langserver.handle)-fm()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/handler.go:31 +0x76
  github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/handler_with_error.go:21 +0x9a
  github.com/sourcegraph/go-langserver/langserver.lspHandler.Handle()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/handler.go:52 +0xc9
  github.com/sourcegraph/go-langserver/langserver.(*lspHandler).Handle()
      <autogenerated>:1 +0x99
  github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.(*Conn).readMessages()
      /home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go:504 +0x1e5
Goroutine 18 (running) created at:
  testing.(*T).Run()
      /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/testing/testing.go:789 +0x568
  testing.runTests.func1()
      /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/testing/testing.go:1004 +0xa7
  testing.tRunner()
      /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/testing/testing.go:746 +0x16c
  testing.runTests()
      /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/testing/testing.go:1002 +0x521
  testing.(*M).Run()
      /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/testing/testing.go:921 +0x206
  main.main()
      github.com/sourcegraph/go-langserver/langserver/_test/_testmain.go:66 +0x1d3
==================
--- FAIL: TestIntegration_FileSystem (0.05s)

on #238

@keegancsmith
Copy link
Member Author

This race is benign and is triggered by our test suite modifying a global.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant