Skip to content

fix(tailnet): data race in coordinator.Close() #4589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2022
Merged

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Oct 17, 2022

==================
WARNING: DATA RACE
Write at 0x00c0047998f0 by goroutine 94756:
  runtime.mapdelete()
      /opt/hostedtoolcache/go/1.19.1/x64/src/runtime/map.go:695 +0x0
  github.com/coder/coder/tailnet.(*coordinator).ServeAgent.func1()
      /home/runner/work/coder/coder/tailnet/coordinator.go:284 +0x104
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.19.1/x64/src/runtime/panic.go:476 +0x32
  github.com/coder/coder/coderd.(*API).workspaceAgentCoordinate.func4()
      /home/runner/work/coder/coder/coderd/workspaceagents.go:518 +0x191
Previous read at 0x00c0047998f0 by goroutine 12585:
  runtime.mapiternext()
      /opt/hostedtoolcache/go/1.19.1/x64/src/runtime/map.go:866 +0x0
  github.com/coder/coder/tailnet.(*coordinator).Close()
      /home/runner/work/coder/coder/tailnet/coordinator.go:349 +0x1d1
  github.com/coder/coder/coderd.(*API).Close()
      /home/runner/work/coder/coder/coderd/coderd.go:584 +0xe1
  github.com/coder/coder/coderd/coderdtest.NewWithAPI.func1()
      /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:289 +0x7b
  testing.(*common).Cleanup.func1()
      /opt/hostedtoolcache/go/1.19.1/x64/src/testing/testing.go:1041 +0x193
  testing.(*common).runCleanup()
      /opt/hostedtoolcache/go/1.19.1/x64/src/testing/testing.go:1210 +0x143
  testing.tRunner.func2()
      /opt/hostedtoolcache/go/1.19.1/x64/src/testing/testing.go:1440 +0x52
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.19.1/x64/src/runtime/panic.go:476 +0x32
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.19.1/x64/src/testing/testing.go:1493 +0x47

@coadler coadler self-assigned this Oct 17, 2022
@coadler coadler requested a review from kylecarbs October 17, 2022 16:34
@coadler coadler merged commit 9b5d627 into main Oct 17, 2022
@coadler coadler deleted the colin/coordinator-race branch October 17, 2022 16:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants