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: race in Now #4622

Closed
gopherbot opened this issue Jan 6, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@gopherbot
Copy link

commented Jan 6, 2013

by trolleriprofessorn:

What steps will reproduce the problem?
Run http://play.golang.org/p/a44Qi91zCe with "go run -race".

What do you see?
==================
WARNING: DATA RACE
Write by goroutine 0:
  time.initLocal()
      /home/sni/go/src/pkg/time/zoneinfo_unix.go:49 +0x128
  sync.(*Once).Do()
      /home/sni/go/src/pkg/sync/once.go:40 +0x8d
  time.(*Location).get()
      /home/sni/go/src/pkg/time/zoneinfo.go:69 +0x70
  time.(*Location).lookup()
      /home/sni/go/src/pkg/time/zoneinfo.go:102 +0x4c
  time.Time.locabs()
      /home/sni/go/src/pkg/time/time.go:274 +0x179
  time.Time.Format()
      /home/sni/go/src/pkg/time/format.go:379 +0x60
  time.Time.String()
      /home/sni/go/src/pkg/time/format.go:366 +0x58
  time.(*Time).String()
      /home/sni/go/src/pkg/time/format.go:0 +0xc7
  fmt.(*pp).handleMethods()
      /home/sni/go/src/pkg/fmt/print.go:712 +0x51a
  fmt.(*pp).printField()
      /home/sni/go/src/pkg/fmt/print.go:803 +0x5b2
  fmt.(*pp).doPrint()
      /home/sni/go/src/pkg/fmt/print.go:1134 +0x2d9
  fmt.Fprintln()
      /home/sni/go/src/pkg/fmt/print.go:279 +0x96
  fmt.Println()
      /home/sni/go/src/pkg/fmt/print.go:289 +0xaa
  main.main()
      /home/sni/Nada/Pallinda/raceTime.go:10 +0x188
  runtime.main()
      /home/sni/go/src/pkg/runtime/proc.c:248 +0x91

Previous read by goroutine 2:
  time.Time.locabs()
      /home/sni/go/src/pkg/time/time.go:270 +0x9a
  time.Time.Format()
      /home/sni/go/src/pkg/time/format.go:379 +0x60
  time.Time.String()
      /home/sni/go/src/pkg/time/format.go:366 +0x58
  time.(*Time).String()
      /home/sni/go/src/pkg/time/format.go:0 +0xc7
  fmt.(*pp).handleMethods()
      /home/sni/go/src/pkg/fmt/print.go:712 +0x51a
  fmt.(*pp).printField()
      /home/sni/go/src/pkg/fmt/print.go:803 +0x5b2
  fmt.(*pp).doPrint()
      /home/sni/go/src/pkg/fmt/print.go:1134 +0x2d9
  fmt.Fprintln()
      /home/sni/go/src/pkg/fmt/print.go:279 +0x96
  fmt.Println()
      /home/sni/go/src/pkg/fmt/print.go:289 +0xaa

Goroutine 2 (running) created at:
  main.main()
      /raceTime.go:9 +0xef
  runtime.main()
      /go/src/pkg/runtime/proc.c:248 +0x91

==================
2013-01-06 13:52:56.109210367 +0100 CET
2013-01-06 13:52:56.109020365 +0100 CET
Found 1 data race(s)
exit status 66

Which version are you using?  (run 'go version')
go version devel +28ee66c9003f Sat Jan 05 21:15:51 2013 +1100 linux/amd64
@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2013

Comment 1:

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

Status changed to Accepted.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jan 11, 2013

Comment 2:

https://golang.org/cl/7103046

Owner changed to @bradfitz.

Status changed to Started.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jan 14, 2013

Comment 3:

This issue was closed by revision fd1abac.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015

@rsc rsc removed the go1.1 label Apr 14, 2015

@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.
You can’t perform that action at this time.