apiserver: avoid data race in shutdown #2694

Merged
merged 1 commit into from Jul 2, 2015

Conversation

Projects
None yet
2 participants
Contributor

davecheney commented Jul 1, 2015

Fixes LP 1465115

Ensure that the listening socket is always the first thing that is closed
when Server.Kill or Stop is issued. This avoids a race where requests in
fly may increase the waitgroup count while the final wg.Wait() defer is in
effect.

(Review request: http://reviews.vapour.ws/r/2072/)

apiserver: avoid data race in shutdown
Fixes LP 1465115

Ensure that the listening socket is always the first thing that is closed
when Server.Kill or Stop is issued. This avoids a race where requests in
fly may increase the waitgroup count while the final wg.Wait() defer is in
effect.
Contributor

davecheney commented Jul 1, 2015

@rogpeppe PTAL

Contributor

davecheney commented Jul 1, 2015

$$merge$$

Contributor

jujubot commented Jul 1, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jul 1, 2015

Build failed: Does not match ['fixes-1470601']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/3852

Contributor

davecheney commented Jul 1, 2015

$$JFDI$$

Contributor

jujubot commented Jul 1, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jul 1, 2015

Build failed: Does not match ['fixes-1470601']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/3853

Contributor

davecheney commented Jul 2, 2015

$$merge$$

Contributor

jujubot commented Jul 2, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jul 2, 2015

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/3858

Contributor

davecheney commented Jul 2, 2015

$$merge$$

Contributor

jujubot commented Jul 2, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Jul 2, 2015

Merge pull request #2694 from davecheney/fixedbugs/1465115
apiserver: avoid data race in shutdown

Fixes LP 1465115

Ensure that the listening socket is always the first thing that is closed
when Server.Kill or Stop is issued. This avoids a race where requests in
fly may increase the waitgroup count while the final wg.Wait() defer is in
effect.

(Review request: http://reviews.vapour.ws/r/2072/)

@jujubot jujubot merged commit 34e7ddd into juju:master Jul 2, 2015

@davecheney davecheney deleted the davecheney:fixedbugs/1465115 branch Apr 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment