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

TestWatchEventType: WaitGroup is reused before previous Wait has returned #6534

Closed
heyitsanthony opened this issue Sep 27, 2016 · 1 comment
Assignees
Milestone

Comments

@heyitsanthony
Copy link
Contributor

via semaphore (https://semaphoreci.com/coreos/etcd/branches/master/builds/995)

panic: sync: WaitGroup is reused before previous Wait has returned

goroutine 57085 [running]:
panic(0xf5aa20, 0xc420937640)
    /usr/local/golang/1.7/go/src/runtime/panic.go:500 +0x1ae
sync.(*WaitGroup).Wait(0xc4281f9ae8)
    /usr/local/golang/1.7/go/src/sync/waitgroup.go:133 +0x13e
github.com/coreos/etcd/etcdserver.(*EtcdServer).run.func1(0xc4281f98c0, 0x1568880, 0xc42214e8a0)
    /home/runner/workspace/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/etcdserver/server.go:580 +0x82
github.com/coreos/etcd/etcdserver.(*EtcdServer).run(0xc4281f98c0)
    /home/runner/workspace/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/etcdserver/server.go:645 +0xad7
created by github.com/coreos/etcd/etcdserver.(*EtcdServer).start
    /home/runner/workspace/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/etcdserver/server.go:503 +0x5aa
@xiang90 xiang90 added this to the v3.1.0-rc.0 milestone Sep 28, 2016
@gyuho
Copy link
Contributor

gyuho commented Sep 29, 2016

@heyitsanthony @xiang90 Go doc says

    // This goroutine has set counter to 0 when waiters > 0.
    // Now there can't be concurrent mutations of state:
    // - Adds must not happen concurrently with Wait,
    // - Wait does not increment waiters if it sees counter == 0.

We are calling Wait in defer statement, while concurrent Add call (from goAttach) happens.

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

No branches or pull requests

3 participants