Skip to content
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

time: data race on local Location #3967

Closed
dvyukov opened this issue Aug 17, 2012 · 2 comments
Closed

time: data race on local Location #3967

dvyukov opened this issue Aug 17, 2012 · 2 comments
Assignees

Comments

@dvyukov
Copy link
Member

@dvyukov dvyukov commented Aug 17, 2012

On a proprietary test ThreadSanitizer says:

WARNING: DATA RACE
Write by goroutine 4:
  time.initLocal()
      src/pkg/time/zoneinfo_unix.go:49 +0x11f
  sync.(*Once).Do()
      src/pkg/sync/once.go:40 +0x7a
  time.(*Location).lookup()
      src/pkg/time/zoneinfo.go:102 +0x46
  time.Time.abs()
      src/pkg/time/time.go:253 +0xf9
  time.Time.date()
      src/pkg/time/time.go:647 +0x31
  time.Time.Date()
      src/pkg/time/time.go:286 +0x36
  [stripped]

Previous read by goroutine 57:
  time.Time.abs()
      src/pkg/time/time.go:250 +0x6b
  time.Time.date()
      src/pkg/time/time.go:647 +0x31
  time.Time.Date()
      src/pkg/time/time.go:286 +0x36
  [stripped]

One goroutine reads local Location while another mutates it.
@robpike
Copy link
Contributor

@robpike robpike commented Aug 19, 2012

Comment 1:

Labels changed: added priority-soon, removed priority-triage.

Status changed to Accepted.

@robpike
Copy link
Contributor

@robpike robpike commented Aug 22, 2012

Comment 2:

This issue was closed by revision 84a5a9b.

Status changed to Fixed.

@dvyukov dvyukov added fixed labels Aug 22, 2012
robpike added a commit that referenced this issue May 11, 2015
««« backport b2855a1654b6
time: avoid data race in abs
Fixes #3967.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6460115

»»»
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.