4d7bf41beb
TestExec and TestExecHelper check for a workaround of a particular OS bug on darwin that's triggered more often via asynchronous preemption. As part of this, the test sets up 100 CPU-bound goroutines, and sets GOMAXPROCS to 50, sleeping for a little bit before calling Exec. Thus far, this is fine because the scheduler runs the Execing goroutine in a timely manner. However, CL 309869 will reduce the minimum heap size, causing a GC to happen during the test. On a 16 CPU machine, with GOMAXPROCS at 50, and 100 CPU-bound goroutines, both the OS scheduler and the Go scheduler are severly oversaturated. As a result, the test often (not always, but often) runs out for the full lifetime of those 100 goroutines, which run for about 1 second. The minimum heap size reduction is not necessary to trigger this; an additional call to runtime.GC in the helper is also sufficient to trigger this delay. The delay on its own isn't great, since it adds a whole second to all.bash on its own. However, it also seems correlated with other subprocess tests in the syscall package, namely TestPassFD and TestFcntlFlock. These tests fail in a fairly superficial way: the file descriptor for the temporary directories they make gets clobbered, is closed, or becomes stale. Change-Id: I213dd5e38967d19a8b317e6d4c5024b57f9e3fed Reviewed-on: https://go-review.googlesource.com/c/go/+/360574 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.md |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.