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

net/smtp: data race in smtp.TestSendMail #4559

Closed
davecheney opened this issue Dec 17, 2012 · 3 comments
Closed

net/smtp: data race in smtp.TestSendMail #4559

davecheney opened this issue Dec 17, 2012 · 3 comments
Milestone

Comments

@davecheney
Copy link
Contributor

rev d68fadb4593f exposed a data race in the smtp tests

==================
WARNING: DATA RACE
Read by goroutine 9:
  bufio.(*Writer).Write()
      /usr/local/go/src/pkg/bufio/bufio.go:491 +0xa0
  net/smtp.func·002()
      /usr/local/go/src/pkg/net/smtp/smtp_test.go:407 +0x519

Previous write by goroutine 7:
  bufio.(*Writer).Flush()
      /usr/local/go/src/pkg/bufio/bufio.go:476 +0x3bb
  net/smtp.TestSendMail()
      /usr/local/go/src/pkg/net/smtp/smtp_test.go:432 +0x6a9
  testing.tRunner()
      /usr/local/go/src/pkg/testing/testing.go:301 +0xe8

Goroutine 9 (running) created at:
  net/smtp.TestSendMail()
      /usr/local/go/src/pkg/net/smtp/smtp_test.go:419 +0x40d
  testing.tRunner()
      /usr/local/go/src/pkg/testing/testing.go:301 +0xe8

Goroutine 7 (finished) created at:
  testing.RunTests()
      /usr/local/go/src/pkg/testing/testing.go:377 +0xaec
  testing.Main()
      /usr/local/go/src/pkg/testing/testing.go:313 +0xcd
  main.main()
      net/smtp/_test/_testmain.go:53 +0xda
  runtime.main()
      /usr/local/go/src/pkg/runtime/proc.c:248 +0x91

==================
==================
WARNING: DATA RACE
Write by goroutine 9:
  runtime.copy()
      /usr/local/go/src/pkg/runtime/slice.c:199 +0x0
  bufio.(*Writer).Write()
      /usr/local/go/src/pkg/bufio/bufio.go:508 +0x50e
  net/smtp.func·002()
      /usr/local/go/src/pkg/net/smtp/smtp_test.go:407 +0x519

Previous read by goroutine 7:
  runtime.copy()
      /usr/local/go/src/pkg/runtime/slice.c:199 +0x0
  bytes.(*Buffer).Write()
      /usr/local/go/src/pkg/bytes/buffer.go:122 +0x177
  bufio.(*Writer).Flush()
      /usr/local/go/src/pkg/bufio/bufio.go:464 +0x161
  net/smtp.TestSendMail()
      /usr/local/go/src/pkg/net/smtp/smtp_test.go:432 +0x6a9
  testing.tRunner()
      /usr/local/go/src/pkg/testing/testing.go:301 +0xe8

Goroutine 9 (running) created at:
  net/smtp.TestSendMail()
      /usr/local/go/src/pkg/net/smtp/smtp_test.go:419 +0x40d
  testing.tRunner()
      /usr/local/go/src/pkg/testing/testing.go:301 +0xe8

Goroutine 7 (finished) created at:
  testing.RunTests()
      /usr/local/go/src/pkg/testing/testing.go:377 +0xaec
  testing.Main()
      /usr/local/go/src/pkg/testing/testing.go:313 +0xcd
  main.main()
      net/smtp/_test/_testmain.go:53 +0xda
  runtime.main()
      /usr/local/go/src/pkg/runtime/proc.c:248 +0x91

==================
PASS
Found 2 data race(s)
FAIL    net/smtp    1.029s

http://build.golang.org/log/06613f019d1bee8778521f4505d908c2f58c0323
@gopherbot
Copy link

Comment 1 by rickarnoldjr:

Fixed by https://golang.org/cl/6944057

@dvyukov
Copy link
Member

dvyukov commented Dec 17, 2012

Comment 3:

Labels changed: added threadsanitizer.

@rsc
Copy link
Contributor

rsc commented Dec 17, 2012

Comment 4:

This issue was closed by revision bcb495b.

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.
Projects
None yet
Development

No branches or pull requests

4 participants