- 27 Jul, 2015 31 commits
-
-
Austin Clements authored
Currently it's possible to perform GC work on a system stack or when locks are held if there's an allocation that triggers an assist. This is generally a bad idea because of the fragility of these contexts, and it's incompatible with two changes we're about to make: one is to yield after signaling mark completion (which we can't do from a non-preemptible context) and the other is to make assists block if there's no other way for them to pay off the assist debt. This commit simply skips the assist if it's called from a non-preemptible context. The allocation will still count toward the assist debt, so it will be paid off by a later assist. There should be little allocation from non-preemptible contexts, so this shouldn't harm the overall assist mechanism. Change-Id: I7bf0e6c73e659fe6b52f27437abf39d76b245c79 Reviewed-on: https://go-review.googlesource.com/12649Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
When notetsleep_internal is called from notetsleepg, notetsleepg has just given up the P, so write barriers are not allowed in notetsleep_internal. Change-Id: I1b214fa388b1ea05b8ce2dcfe1c0074c0a3c8870 Reviewed-on: https://go-review.googlesource.com/12647Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
Currently fractional and idle mark workers dispose of their gcWork cache during mark 2 after incrementing work.nwait and after checking whether there are any workers or any work available. This creates a window for two races: 1) If the only remaining work is in this worker's gcWork cache, it will see that there are no more workers and no more work on the global lists (since it has not yet flushed its own cache) and prematurely signal mark 2 completion. 2) After this worker has incremented work.nwait but before it has flushed its cache, another worker may observe that there are no more workers and no more work and prematurely signal mark 2 completion. We can fix both of these by simply moving the cache flush above the increment of nwait and the test of the completion condition. This is probably contributing to #11694, though this alone is not enough to fix it. Change-Id: Idcf9656e5c460c5ea0d23c19c6c51e951f7716c3 Reviewed-on: https://go-review.googlesource.com/12646Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
GC assists are supposed to steal at most the amount of background GC credit available so that background GC credit doesn't go negative. However, they are instead stealing the *total* amount of their debt but only claiming up to the amount of credit that was available. This results in draining the background GC credit pool too quickly, which results in unnecessary assist work. The fix is trivial: steal the amount of work we meant to steal (which is already computed). Change-Id: I837fe60ed515ba91c6baf363248069734a7895ef Reviewed-on: https://go-review.googlesource.com/12643Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
CL https://golang.org/cl/12470 has reportedly fixed the problems that the misc/cgo/testsovar test encountered on darwin and netbsd. Let's actually run the test. Update #10360. Update #11654. Change-Id: I4cdd27a8ec8713620e0135780a03f63cfcc538d0 Reviewed-on: https://go-review.googlesource.com/12702Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
This race was identified in #9796, but a sequence of fixes proposed in golang.org/cl/4152 were rolled into golang.org/cl/5910 which both fixed the race and modified the name space behavior. We rolled back the name space changes and lost the race fix. Fix the race separate from the name space changes, following the suggestion made by Roger Peppe in https://go-review.googlesource.com/#/c/4152/7/src/encoding/xml/marshal.go@897 Fixes #9796. Fixes #11885. Change-Id: Ib2b68982da83dee9e04db8b8465a8295259bba46 Reviewed-on: https://go-review.googlesource.com/12687Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
Fixes build dashboard failures for android and nacl. Change-Id: Id13896570061d3d8186f7b666ca1c37bcc789b0f Reviewed-on: https://go-review.googlesource.com/12703Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Austin Clements authored
Fixes #10348. Change-Id: I3eea9738e3f6fdc1998d04a601dc9b556dd2db72 Reviewed-on: https://go-review.googlesource.com/12453Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
Currently the gctrace output reports the trigger heap size, rather than the actual heap size at the beginning of GC. Often these are the same, or at least very close. However, it's possible for the heap to already have exceeded this trigger when we first check the trigger and start GC; in this case, this output is very misleading. We've encountered this confusion a few times when debugging and this behavior is difficult to document succinctly. Change the gctrace output to report the actual heap size when GC starts, rather than the trigger. Change-Id: I246b3ccae4c4c7ea44c012e70d24a46878d7601f Reviewed-on: https://go-review.googlesource.com/12452Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
Whenever someone pastes gctrace output into GitHub, it helpfully turns the GC cycle number into a link to some unrelated issue. Prevent this by removing the pound before the cycle number. The fact that this is a cycle number is probably more obvious at a glance than most of the other numbers. Change-Id: Ifa5fc7fe6c715eac50e639f25bc36c81a132ffea Reviewed-on: https://go-review.googlesource.com/12413Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Fixes #11839. Change-Id: Ie092a3a512a2d35967364b41081a066ab3a6aab4 Reviewed-on: https://go-review.googlesource.com/12571Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
svn dies due to not being able to validate the googlecode.com certificate. hg does not even attempt to validate it. Fixes #11806. Change-Id: I84ced5aa84bb1e4a4cdb2254f2d08a64a1ef23f6 Reviewed-on: https://go-review.googlesource.com/12558Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes TestGoGetWorksWithVanityWildcards, but that test uses the network and is not run on the builders. For #11806. Change-Id: I35c6677deaf84e2fa9bdb98b62d80d388b5248ae Reviewed-on: https://go-review.googlesource.com/12557Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
This extends https://golang.org/cl/2811, which only applied to Darwin and GNU/Linux, to all Unix systems. Fixes #9591. Change-Id: Iec3fb438564ba2924b15b447c0480f87c0bfd009 Reviewed-on: https://go-review.googlesource.com/12661 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Broke most builders. This reverts commit a60c5366. Change-Id: Iae952cfcc73ef5da621616a0b3d586b60d1ce9c9 Reviewed-on: https://go-review.googlesource.com/12684Reviewed-by: Russ Cox <rsc@golang.org>
-
Carlos C authored
Change-Id: Ib4fb8256863d908580a07e6f2e1c92ea109ea989 Reviewed-on: https://go-review.googlesource.com/11249Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Fixes #11343. Change-Id: I46efc24b687b9d060ad864fbb238c74544348e38 Reviewed-on: https://go-review.googlesource.com/12556Reviewed-by: Rob Pike <r@golang.org>
-
Brad Fitzpatrick authored
Fixes #11020 Change-Id: I52760a01420a11f3c979f678812b3775a3af61e4 Reviewed-on: https://go-review.googlesource.com/12545Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
From https://github.com/golang/go/issues/11745#issuecomment-123555313 : The http.RoundTripper interface says you get either a *Response, or an error. But in the case of a client writing a large request and the server replying prematurely (e.g. 403 Forbidden) and closing the connection without reading the request body, what does the client want? The 403 response, or the error that the body couldn't be copied? This CL implements the aforementioned comment's option c), making the Transport give an N millisecond advantage to responses over body write errors. Updates #11745 Change-Id: I4485a782505d54de6189f6856a7a1f33ce4d5e5e Reviewed-on: https://go-review.googlesource.com/12590Reviewed-by: Russ Cox <rsc@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: I9b8a6ac1ff6bef3b7f1e033bfd029f2a59e30297 Reviewed-on: https://go-review.googlesource.com/12623Reviewed-by: Russ Cox <rsc@golang.org>
-
Mikio Hara authored
Fixes #11872. Change-Id: Ibc7d8438374c9d90fd4cbefb61426c7f4f96af0d Reviewed-on: https://go-review.googlesource.com/12691Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
We used to use build.Import to get the dependencies, but that meant we had to repeat the check for every possible GOOS/GOARCH/cgo combination, which took too long. So we made the test in short mode only check the current GOOS/GOARCH/cgo combination. But some combinations can't run the test at all. For example darwin/arm64 does not run tests with a full source file systems, so it cannot test itself, so nothing was testing darwin/arm64. This led to bugs like #10455 not being caught. Rewrite the test to read the imports out of the source files ourselves, so that we can look at all source files in a directory in one pass, regardless of which GOOS/GOARCH/cgo/etc they require. This one complete pass runs in the same amount of time as the old single combination check ran, so we can now test all systems, even in short mode. Change-Id: Ie216303c2515bbf1b6fb717d530a0636e271cb6d Reviewed-on: https://go-review.googlesource.com/12576Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Peter Waldschmidt authored
This change adds new methods to Decoder. * Decoder.Token steps through a JSON document, returning a value for each token. * Decoder.Decode unmarshals the entire value at the token stream's current position (in addition to its existing function in a stream of JSON values) Fixes #6050. Fixes #6499. Change-Id: Iff283e0e7b537221ae256392aca6529f06ebe211 Reviewed-on: https://go-review.googlesource.com/9073Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
A while back we discovered that the dependencies test allowed arbitrary dependencies for packages we forgot to list. To stop the damage we added a grandfathered list and fixed the code to expect unlisted packages to have no dependencies. This CL replaces the grandfathered list with some more careful placement of dependency rules. Thankfully, there were no terrible inversions. Fixes #10487. Change-Id: I5a6f92435bd2c66c47ec8ab629edbd88b189f028 Reviewed-on: https://go-review.googlesource.com/12575Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
It's not clear this really belongs anywhere at all, but this is a better place for it than package os. This way package os can avoid importing "C". Fixes #10455. Change-Id: Ibe321a93bf26f478951c3a067d75e22f3d967eb7 Reviewed-on: https://go-review.googlesource.com/12574Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
Russ Cox authored
It was not running because of invalid use of ArchChar. I didn't catch this when I scrubbed ArchChar from the tree because this code wasn't in the tree yet. The test seems to pass, which is nice. Change-Id: I59761a7a04a73681e147e25c1e7f010068276aa8 Reviewed-on: https://go-review.googlesource.com/12573Reviewed-by: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
There is clearly work to do here with respect to xml name spaces, but I don't believe the changes in this cycle are clearly correct. The changes in this cycle have visible impact on the generated xml, possibly breaking existing programs, and yet it's not clear that they are the end of the story: there is still significant confusion about how name spaces work or should work (see #9519, #9775, #8167, #7113). I would like to wait to make breaking changes until we completely understand what the behavior should be and can evaluate the benefit of those breaking changes. My main concern here is that we will break programs in Go 1.5 for the sake of name space adjustments and then while trying to fix those other bugs we'll break programs in Go 1.6 too. Let's wait until we know all the changes we want to make before we decide whether or how to break existing programs. This CL reverts: 5ae822ba encoding/xml: minor changes bb7e6656 encoding/xml: fix xmlns= behavior 9f9d66d3 encoding/xml: fix default namespace of tags b69ea018 encoding/xml: fix namespaces in a>b tags 3be158d6 encoding/xml: encoding name spaces correctly and adjusts tests from a9dddb53 encoding/xml: add more EncodeToken tests. to expect Go 1.4 behavior. I have confirmed that the name space parts of the test suite as of this CL passes against the Go 1.4 encoding/xml package, indicating that this CL successfully restores the Go 1.4 behavior. (Other tests do not, but that's because there were some real bug fixes in this cycle that are being kept. Specifically, the tests that don't pass in Go 1.4 are TestMarshal's NestedAndComment case, TestEncodeToken's encoding of newlines, and TestSimpleUseOfEncodeToken returning an error for invalid token types.) I also checked that the Go 1.4 tests pass when run against this copy of the sources. Fixes #11841. Change-Id: I97de06761038b40388ef6e3a55547ff43edee7cb Reviewed-on: https://go-review.googlesource.com/12570Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
Brad Fitzpatrick authored
The "add a Request.Cancel channel" change (https://golang.org/cl/11601) added support for "race free" cancellation, but introduced a data race. :) Noticed while running "go test -race net/http". The test is skipped in short mode, so we never saw it on the dashboard. Change-Id: Ica14579d8723f8f9d1691e8d56c30b585b332c64 Reviewed-on: https://go-review.googlesource.com/12663Reviewed-by: Aaron Jacobs <jacobsa@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brian Gitonga Marete authored
Change-Id: I2c21b012534be20443157c6b77ef21bd585902b0 Reviewed-on: https://go-review.googlesource.com/12636Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
Not everyone is aware that go build is a wrapper for other tools. Mention this in the text for go help build so people using other build systems won't just wrap go build, which is usually a mistake (it doesn't do incremental builds by default, for instance). Update #11854. Change-Id: I759f91f23ccd3671204c39feea12a3bfaf9f0114 Reviewed-on: https://go-review.googlesource.com/12625Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
The system stack is only around 8kb on ARM so one can't put an 8kb buffer on the stack. More than 1024 ARM cores seems sufficiently unlikely for the foreseeable future. Fixes #11853 Change-Id: I7cb27c1250a6153f86e269c172054e9dfc218c72 Reviewed-on: https://go-review.googlesource.com/12622Reviewed-by: Austin Clements <austin@google.com>
-
- 26 Jul, 2015 3 commits
-
-
Ian Lance Taylor authored
Fixes #9530. Change-Id: Iadfc027c7164e3ba35adb5c67deb42b51d3498ca Reviewed-on: https://go-review.googlesource.com/12603Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dave Cheney <dave@cheney.net>
-
Austin Clements authored
Currently TestDoDupSuppress can fail if the goroutines created by its loop run sequentially. This is rare, but it has caused failures on the dashboard and in stress testing. While I think there's no way to eliminate all possible thread schedules that could make this test fail because it depends on waiting until a Group.Do blocks, it is possible to make it much more robust. This commit deflakes this test by forcing at least one invocation of fn to start and all goroutines to reach the line just before the Do call before allowing fn to proceed. fn then waits 10 milliseconds before returning to allow the goroutines to pass through the Do. With this change, in 50,000 runs of the stress testing configuration, the number of calls to fn never even exceeded 1. Fixes #11784. Change-Id: Ie5adf5764545050ec407619769a656251c4cff04 Reviewed-on: https://go-review.googlesource.com/12681Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Jeff R. Allen authored
Update the docs to explain the code added in commit 67e1d400. Fixes #11831. Change-Id: I8fe72e449507847c4bd9d77de40947ded7f2ff9d Reviewed-on: https://go-review.googlesource.com/12515Reviewed-by: Dave Cheney <dave@cheney.net>
-
- 24 Jul, 2015 4 commits
-
-
Matthew Dempsky authored
Change-Id: I102901e3df76830ccd5ab74d757203d103eef9e8 Reviewed-on: https://go-review.googlesource.com/12657Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Issue 11214 reports problems with older versions of gdb. It does work with gdb 7.9 on my Ubuntu Trusty system, so take that as the minimum required version. Fixes #11214. Change-Id: I61b732895506575be7af595f81fc1bcf696f58c2 Reviewed-on: https://go-review.googlesource.com/12626Reviewed-by: Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
This adds documentation for all the environment variables I could locate in the go tool and the commands that it invokes. Fixes #9672. Change-Id: Id5f09160a3a8a938af4a3fcb8757eb3eced05416 Reviewed-on: https://go-review.googlesource.com/12620Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
Fixes #11847. Change-Id: I21736a4c6f6fb2f61aec1396ce2c965e3e329e92 Reviewed-on: https://go-review.googlesource.com/12621Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
- 23 Jul, 2015 2 commits
-
-
Damian Gryski authored
In https://go-review.googlesource.com/#/c/8611/ , these tests were supposed to be skipped only for linux and darwin, as the comment says. This patch fixes the logic in the if test. Change-Id: Iff0a32186267457a414912c4c3ee4495650891a2 Reviewed-on: https://go-review.googlesource.com/12517Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
-
David Chase authored
Old code appended, did not play well with a closure with a ... param. Fixes #11075. Change-Id: Ib7c8590c5c4e576e798837e7499e00f3494efb4a Reviewed-on: https://go-review.googlesource.com/12580Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: David Chase <drchase@google.com>
-