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

TestElectionOnSessionRestart: data race in kerlseguin/ccache #7279

Closed
mitake opened this issue Feb 6, 2017 · 1 comment
Closed

TestElectionOnSessionRestart: data race in kerlseguin/ccache #7279

mitake opened this issue Feb 6, 2017 · 1 comment

Comments

@mitake
Copy link
Contributor

mitake commented Feb 6, 2017

From CI of #7260

Full log can be viewed here: https://jenkins-etcd-public.prod.coreos.systems/job/etcd-proxy/644/console

=== RUN   TestElectionOnSessionRestart
==================
WARNING: DATA RACE
Read at 0x00c42373b740 by goroutine 986:
  runtime.chansend()
      /usr/lib/go-1.7/src/runtime/chan.go:122 +0x0
  github.com/karlseguin/ccache.(*Cache).Delete()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/karlseguin/ccache/cache.go:103 +0xbb
  github.com/coreos/etcd/proxy/grpcproxy/cache.(*cache).Invalidate()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/cache/store.go:152 +0x350
  github.com/coreos/etcd/proxy/grpcproxy.(*kvProxy).DeleteRange()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/kv.go:80 +0xd7
  github.com/coreos/etcd/proxy/grpcproxy.(*kvs2kvc).DeleteRange()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/kv_client_adapter.go:38 +0x73
  github.com/coreos/etcd/clientv3.(*kv).do()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/kv.go:159 +0x1ab
  github.com/coreos/etcd/clientv3.(*kv).Do()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/kv.go:124 +0x8d
  github.com/coreos/etcd/clientv3.(*kv).Delete()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/kv.go:103 +0xf2
  github.com/coreos/etcd/clientv3/concurrency.(*Election).Resign()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/concurrency/election.go:113 +0x139
  github.com/coreos/etcd/clientv3/concurrency.(*Election).Campaign()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/concurrency/election.go:77 +0xa12

Previous write at 0x00c42373b740 by goroutine 373:
  runtime.closechan()
      /usr/lib/go-1.7/src/runtime/chan.go:303 +0x0
  github.com/karlseguin/ccache.(*Cache).worker()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/karlseguin/ccache/cache.go:169 +0x520

Goroutine 986 (running) created at:
  github.com/coreos/etcd/integration.TestElectionOnSessionRestart()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/integration/v3_election_test.go:255 +0x47f
  testing.tRunner()
      /usr/lib/go-1.7/src/testing/testing.go:610 +0xc9

Goroutine 373 (finished) created at:
  github.com/karlseguin/ccache.New()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/karlseguin/ccache/cache.go:37 +0x53b
  github.com/coreos/etcd/proxy/grpcproxy/cache.NewCache()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/cache/store.go:57 +0x119
  github.com/coreos/etcd/proxy/grpcproxy.NewKvProxy()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/kv.go:33 +0x4e
  github.com/coreos/etcd/integration.toGRPC()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/integration/cluster_proxy.go:47 +0x1b1
  github.com/coreos/etcd/integration.newClientV3()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/integration/cluster_proxy.go:79 +0xe9
  github.com/coreos/etcd/integration.NewClientV3()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/integration/cluster.go:553 +0x23d
  github.com/coreos/etcd/integration.NewClusterV3()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/integration/cluster.go:843 +0x1b0
  github.com/coreos/etcd/integration.TestElectionOnSessionRestart()
      /home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/integration/v3_election_test.go:233 +0xf0
  testing.tRunner()
      /usr/lib/go-1.7/src/testing/testing.go:610 +0xc9
==================
panic: send on closed channel

goroutine 156147 [running]:
panic(0x10d1660, 0xc42ec4b090)
	/usr/lib/go-1.7/src/runtime/panic.go:500 +0x1ae
github.com/karlseguin/ccache.(*Cache).Delete(0xc423c80be0, 0xc42a56f560, 0x24, 0xc42b95d408)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/karlseguin/ccache/cache.go:103 +0xbc
github.com/coreos/etcd/proxy/grpcproxy/cache.(*cache).Invalidate(0xc42a0a6dc0, 0xc423e42540, 0x1b, 0x20, 0x0, 0x0, 0x0)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/cache/store.go:152 +0x351
github.com/coreos/etcd/proxy/grpcproxy.(*kvProxy).DeleteRange(0xc429e64040, 0x7fe2cfcbb3e8, 0xc42a0a6940, 0xc429e87800, 0xc42b95d628, 0x4128d8, 0x40)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/kv.go:80 +0xd8
github.com/coreos/etcd/proxy/grpcproxy.(*kvs2kvc).DeleteRange(0xc42ece0fb0, 0x7fe2cfcbb3e8, 0xc42a0a6940, 0xc429e87800, 0x0, 0x0, 0x0, 0xc42b95d718, 0x412248, 0xc4201ee400)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/proxy/grpcproxy/kv_client_adapter.go:38 +0x74
github.com/coreos/etcd/clientv3.(*kv).do(0xc42ece0fd0, 0x7fe2cfcbb3e8, 0xc42a0a6940, 0x3, 0xc423e42540, 0x1b, 0x20, 0x0, 0x0, 0x0, ...)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/kv.go:159 +0x1ac
github.com/coreos/etcd/clientv3.(*kv).Do(0xc42ece0fd0, 0x7fe2cfcbb3e8, 0xc42a0a6940, 0x3, 0xc423e42540, 0x1b, 0x20, 0x0, 0x0, 0x0, ...)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/kv.go:124 +0x8e
github.com/coreos/etcd/clientv3.(*kv).Delete(0xc42ece0fd0, 0x7fe2cfcbb3e8, 0xc42a0a6940, 0xc429e64e20, 0x1b, 0x0, 0x0, 0x0, 0xc42881aae0, 0xc423c0ac20, ...)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/kv.go:103 +0xf3
github.com/coreos/etcd/clientv3/concurrency.(*Election).Resign(0xc42a0a7c40, 0x7fe2cfcbb3e8, 0xc42a0a6940, 0xc42ece1501, 0xb)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/concurrency/election.go:113 +0x13a
github.com/coreos/etcd/clientv3/concurrency.(*Election).Campaign(0xc42a0a7c40, 0x7fe2cfcbb178, 0xc4236fcd80, 0x11f5bd5, 0x3, 0x13, 0xf)
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/clientv3/concurrency/election.go:77 +0xa13
created by github.com/coreos/etcd/integration.TestElectionOnSessionRestart
	/home/jenkins/workspace/etcd-proxy/gopath/src/github.com/coreos/etcd/integration/v3_election_test.go:255 +0x480
exit status 2
FAIL	github.com/coreos/etcd/integration	482.847s
Build step 'Execute shell' marked build as failure
Setting status of 9976d869c132c60fb3641d4a11d1621e5b5fdb9a to FAILURE with url https://jenkins-etcd-public.prod.coreos.systems/job/etcd-proxy/644 and message: 'Build finished. '
Using context: jenkins-proxy-ci
Finished: FAILURE
@heyitsanthony
Copy link
Contributor

duplicates #7259

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

No branches or pull requests

2 participants