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

os/exec: TestStdinCloseRace flake on freebsd-amd64 #21994

Closed
mvdan opened this issue Sep 23, 2017 · 2 comments
Closed

os/exec: TestStdinCloseRace flake on freebsd-amd64 #21994

mvdan opened this issue Sep 23, 2017 · 2 comments
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Sep 23, 2017

freebsd-amd64-110 at bf7bd9f767bba4647b1c67b8bcb1e163351adb84

[...]

##### Testing race detector
ok  	runtime/race	10.602s
ok  	flag	1.102s
ok  	os	1.035s
ok  	os/exec	3.167s
PASS
scatter = 0x5f1110
hello from C
sqrt is: 0
ok  	_/tmp/workdir/go/misc/cgo/test	5.195s
ok  	flag	1.017s
==================
WARNING: DATA RACE
Write at 0x00c4200844c0 by goroutine 11:
  internal/poll.(*FD).destroy()
      /tmp/workdir/go/src/internal/poll/fd_unix.go:63 +0xa4
  internal/poll.(*FD).decref()
      /tmp/workdir/go/src/internal/poll/fd_mutex.go:211 +0x55
  internal/poll.(*FD).Close()
      /tmp/workdir/go/src/internal/poll/fd_unix.go:81 +0xf5
  os.(*file).close()
      /tmp/workdir/go/src/os/file_unix.go:201 +0x45
  os.(*File).Close()
      /tmp/workdir/go/src/os/file_unix.go:193 +0x52
  os/exec.(*closeOnce).close()
      /tmp/workdir/go/src/os/exec/exec.go:547 +0x4d
  os/exec.(*closeOnce).(os/exec.close)-fm()
      /tmp/workdir/go/src/os/exec/exec.go:542 +0x41
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:44 +0xe1
  os/exec.(*closeOnce).Close()
      /tmp/workdir/go/src/os/exec/exec.go:542 +0x81
  os/exec.(*Cmd).closeDescriptors()
      /tmp/workdir/go/src/os/exec/exec.go:273 +0x5c
  os/exec.(*Cmd).Wait()
      /tmp/workdir/go/src/os/exec/exec.go:459 +0x295
  os/exec_test.TestStdinCloseRace()
      /tmp/workdir/go/src/os/exec/exec_test.go:285 +0x264
  testing.tRunner()
      /tmp/workdir/go/src/testing/testing.go:748 +0x169

Previous read at 0x00c4200844c0 by goroutine 13:
  os.epipecheck()
      /tmp/workdir/go/src/os/file_unix.go:133 +0xa8
  os.(*File).Write()
      /tmp/workdir/go/src/os/file.go:148 +0xf2
  os.(*File).WriteString()
      /tmp/workdir/go/src/os/file.go:204 +0x7b
  os/exec.(*closeOnce).WriteString()
      <autogenerated>:1 +0x6e
  io.WriteString()
      /tmp/workdir/go/src/io/io.go:291 +0x83
  strings.(*Reader).WriteTo()
      /tmp/workdir/go/src/strings/reader.go:133 +0x144
  io.copyBuffer()
      /tmp/workdir/go/src/io/io.go:431 +0x3bd
  io.Copy()
      /tmp/workdir/go/src/io/io.go:411 +0x74
  os/exec_test.TestStdinCloseRace.func2()
      /tmp/workdir/go/src/os/exec/exec_test.go:280 +0xf5

Goroutine 11 (running) created at:
  testing.(*T).Run()
      /tmp/workdir/go/src/testing/testing.go:791 +0x535
  testing.runTests.func1()
      /tmp/workdir/go/src/testing/testing.go:1015 +0xa4
  testing.tRunner()
      /tmp/workdir/go/src/testing/testing.go:748 +0x169
  testing.runTests()
      /tmp/workdir/go/src/testing/testing.go:1013 +0x4bf
  testing.(*M).Run()
      /tmp/workdir/go/src/testing/testing.go:933 +0x270
  main.main()
      os/exec/_test/_testmain.go:98 +0x228

Goroutine 13 (running) created at:
  os/exec_test.TestStdinCloseRace()
      /tmp/workdir/go/src/os/exec/exec_test.go:274 +0x256
  testing.tRunner()
      /tmp/workdir/go/src/testing/testing.go:748 +0x169
==================
--- FAIL: TestStdinCloseRace (0.00s)
	testing.go:701: race detected during execution of test
FAIL
FAIL	os/exec	2.070s

/cc @ianlancetaylor since this smells a lot like the recent 8cb2952

@mvdan mvdan added this to the Go1.10 milestone Sep 23, 2017
@kardianos
Copy link
Contributor

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/65750 mentions this issue: os: don't refer directly to Sysfd in epipecheck

@golang golang locked and limited conversation to collaborators Sep 24, 2018
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

3 participants