{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/4876","repository_url":"https://api.github.com/repos/coreos/etcd","labels_url":"https://api.github.com/repos/coreos/etcd/issues/4876/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/4876/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/4876/events","html_url":"https://github.com/coreos/etcd/pull/4876","id":143795224,"number":4876,"title":"*: fix races from clientv3/integration tests","user":{"login":"heyitsanthony","id":16294350,"avatar_url":"https://avatars.githubusercontent.com/u/16294350?v=3","gravatar_id":"","url":"https://api.github.com/users/heyitsanthony","html_url":"https://github.com/heyitsanthony","followers_url":"https://api.github.com/users/heyitsanthony/followers","following_url":"https://api.github.com/users/heyitsanthony/following{/other_user}","gists_url":"https://api.github.com/users/heyitsanthony/gists{/gist_id}","starred_url":"https://api.github.com/users/heyitsanthony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heyitsanthony/subscriptions","organizations_url":"https://api.github.com/users/heyitsanthony/orgs","repos_url":"https://api.github.com/users/heyitsanthony/repos","events_url":"https://api.github.com/users/heyitsanthony/events{/privacy}","received_events_url":"https://api.github.com/users/heyitsanthony/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-27T10:13:37Z","updated_at":"2016-03-28T22:13:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/4876","html_url":"https://github.com/coreos/etcd/pull/4876","diff_url":"https://github.com/coreos/etcd/pull/4876.diff","patch_url":"https://github.com/coreos/etcd/pull/4876.patch"},"body":"```\r\n================\r\nWARNING: DATA RACE\r\nWrite by goroutine 146:\r\n  github.com/coreos/etcd/clientv3.(*kv).switchRemote()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/kv.go:194 +0x158\r\n\r\nPrevious read by goroutine 307:\r\n  github.com/coreos/etcd/clientv3.(*kv).switchRemote()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/kv.go:186 +0x63\r\n  github.com/coreos/etcd/clientv3.(*kv).Do()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/kv.go:179 +0x490\r\n  github.com/coreos/etcd/clientv3.(*kv).Get()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/kv.go:103 +0xdb\r\n  github.com/coreos/etcd/clientv3/integration.TestKVPutFailGetRetry.func1()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/kv_test.go:437 +0xa1\r\n\r\nGoroutine 146 (running) created at:\r\n  github.com/coreos/etcd/clientv3.(*kv).Do()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/kv.go:175 +0x41e\r\n  github.com/coreos/etcd/clientv3.(*kv).Put()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/kv.go:98 +0xf5\r\n  github.com/coreos/etcd/clientv3/integration.TestKVPutFailGetRetry()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/kv_test.go:429 +0x4c0\r\n  testing.tRunner()\r\n      /usr/lib/go/src/testing/testing.go:473 +0xdc\r\n\r\nGoroutine 307 (running) created at:\r\n  github.com/coreos/etcd/clientv3/integration.TestKVPutFailGetRetry()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/kv_test.go:445 +0x5a6\r\n  testing.tRunner()\r\n      /usr/lib/go/src/testing/testing.go:473 +0xdc\r\n=================\r\n```\r\n\r\n```\r\n==================\r\nWARNING: DATA RACE\r\nWrite by goroutine 63:\r\n  runtime.mapassign1()\r\n      /usr/lib/go/src/runtime/hashmap.go:429 +0x0\r\n  github.com/coreos/etcd/rafthttp.(*Transport).AddRemote()\r\n      /home/anthony/go/src/github.com/coreos/etcd/rafthttp/transport.go:220 +0x525\r\n  github.com/coreos/etcd/rafthttp.(*streamHandler).ServeHTTP()\r\n      /home/anthony/go/src/github.com/coreos/etcd/rafthttp/http.go:283 +0xa46\r\n  net/http.(*ServeMux).ServeHTTP()\r\n      /usr/lib/go/src/net/http/server.go:1910 +0x212\r\n  net/http.(*ServeMux).ServeHTTP()\r\n      /usr/lib/go/src/net/http/server.go:1910 +0x212\r\n  github.com/coreos/etcd/pkg/testutil.(*PauseableHandler).ServeHTTP()\r\n      /home/anthony/go/src/github.com/coreos/etcd/pkg/testutil/pauseable_handler.go:33 +0xf8\r\n  net/http.serverHandler.ServeHTTP()\r\n      /usr/lib/go/src/net/http/server.go:2081 +0x206\r\n  net/http.(*conn).serve()\r\n      /usr/lib/go/src/net/http/server.go:1472 +0x1565\r\n\r\nPrevious read by goroutine 279:\r\n  runtime.mapaccess2_fast64()\r\n      /usr/lib/go/src/runtime/hashmap_fast.go:148 +0x0\r\n  github.com/coreos/etcd/rafthttp.(*Transport).Send()\r\n      /home/anthony/go/src/github.com/coreos/etcd/rafthttp/transport.go:179 +0x331\r\n  github.com/coreos/etcd/etcdserver.(*EtcdServer).send()\r\n      /home/anthony/go/src/github.com/coreos/etcd/etcdserver/server.go:954 +0x5b8\r\n  github.com/coreos/etcd/etcdserver.(*raftNode).start.func1()\r\n      /home/anthony/go/src/github.com/coreos/etcd/etcdserver/raft.go:224 +0xe7d\r\n\r\nGoroutine 63 (running) created at:\r\n  net/http.(*Server).Serve()\r\n      /usr/lib/go/src/net/http/server.go:2137 +0x4d1\r\n  net/http/httptest.(*Server).goServe.func1()\r\n      /usr/lib/go/src/net/http/httptest/server.go:237 +0xac\r\n\r\nGoroutine 279 (running) created at:\r\n  github.com/coreos/etcd/etcdserver.(*raftNode).start()\r\n      /home/anthony/go/src/github.com/coreos/etcd/etcdserver/raft.go:234 +0x329\r\n  github.com/coreos/etcd/etcdserver.(*EtcdServer).run()\r\n      /home/anthony/go/src/github.com/coreos/etcd/etcdserver/server.go:499 +0x1eb\r\n==================\r\n```\r\n\r\n```\r\n==================\r\nWARNING: DATA RACE\r\nRead by goroutine 759:\r\n  github.com/coreos/etcd/clientv3.(*watcher).resumeWatchers()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:506 +0x31a\r\n  github.com/coreos/etcd/clientv3.(*watcher).resume()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:470 +0x9e\r\n  github.com/coreos/etcd/clientv3.(*watcher).newWatchClient()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:457 +0x4a\r\n  github.com/coreos/etcd/clientv3.(*watcher).run()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:321 +0xb94\r\n\r\nPrevious write by goroutine 467:\r\n  github.com/coreos/etcd/clientv3.(*watcher).serveStream()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:412 +0x7d1\r\n\r\nGoroutine 759 (running) created at:\r\n  github.com/coreos/etcd/clientv3.NewWatcher()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:145 +0x559\r\n  github.com/coreos/etcd/clientv3/integration.runWatchTest()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:50 +0x11c\r\n  github.com/coreos/etcd/clientv3/integration.TestWatchReconnRunning()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:231 +0x3a\r\n  testing.tRunner()\r\n      /usr/lib/go/src/testing/testing.go:473 +0xdc\r\n\r\nGoroutine 467 (running) created at:\r\n  github.com/coreos/etcd/clientv3.(*watcher).addStream()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:244 +0x496\r\n  github.com/coreos/etcd/clientv3.(*watcher).run()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/watch.go:295 +0x802\r\n==================\r\n```\r\n\r\n```\r\n==================\r\nWARNING: DATA RACE\r\nWrite by goroutine 953:\r\n  github.com/coreos/etcd/clientv3/integration.testWatchWithProgressNotify()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:390 +0x1d7\r\n  github.com/coreos/etcd/clientv3/integration.TestWatchWithProgressNotify()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:376 +0x33\r\n  testing.tRunner()\r\n      /usr/lib/go/src/testing/testing.go:473 +0xdc\r\n\r\nPrevious read by goroutine 699:\r\n  [failed to restore the stack]\r\n\r\nGoroutine 953 (running) created at:\r\n  testing.RunTests()\r\n      /usr/lib/go/src/testing/testing.go:582 +0xae2\r\n  testing.(*M).Run()\r\n      /usr/lib/go/src/testing/testing.go:515 +0x11d\r\n  github.com/coreos/etcd/clientv3/integration.TestMain()\r\n      /home/anthony/go/src/github.com/coreos/etcd/clientv3/integration/main_test.go:15 +0x2e\r\n  main.main()\r\n      github.com/coreos/etcd/clientv3/integration/_test/_testmain.go:114 +0x20a\r\n\r\nGoroutine 699 (finished) created at:\r\n  github.com/coreos/etcd/etcdserver/api/v3rpc.(*watchServer).Watch()\r\n      /home/anthony/go/src/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go:93 +0x2a4\r\n  github.com/coreos/etcd/etcdserver/etcdserverpb._Watch_Watch_Handler()\r\n      /home/anthony/go/src/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go:1834 +0xfe\r\n  github.com/coreos/etcd/vendor/google.golang.org/grpc.(*Server).processStreamingRPC()\r\n      /home/anthony/go/src/github.com/coreos/etcd/vendor/google.golang.org/grpc/server.go:586 +0x647\r\n  github.com/coreos/etcd/vendor/google.golang.org/grpc.(*Server).handleStream()\r\n      /home/anthony/go/src/github.com/coreos/etcd/vendor/google.golang.org/grpc/server.go:661 +0x150a\r\n  github.com/coreos/etcd/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()\r\n      /home/anthony/go/src/github.com/coreos/etcd/vendor/google.golang.org/grpc/server.go:323 +0xad\r\n==================\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/202601070","html_url":"https://github.com/coreos/etcd/pull/4876#issuecomment-202601070","issue_url":"https://api.github.com/repos/coreos/etcd/issues/4876","id":202601070,"user":{"login":"heyitsanthony","id":16294350,"avatar_url":"https://avatars.githubusercontent.com/u/16294350?v=3","gravatar_id":"","url":"https://api.github.com/users/heyitsanthony","html_url":"https://github.com/heyitsanthony","followers_url":"https://api.github.com/users/heyitsanthony/followers","following_url":"https://api.github.com/users/heyitsanthony/following{/other_user}","gists_url":"https://api.github.com/users/heyitsanthony/gists{/gist_id}","starred_url":"https://api.github.com/users/heyitsanthony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heyitsanthony/subscriptions","organizations_url":"https://api.github.com/users/heyitsanthony/orgs","repos_url":"https://api.github.com/users/heyitsanthony/repos","events_url":"https://api.github.com/users/heyitsanthony/events{/privacy}","received_events_url":"https://api.github.com/users/heyitsanthony/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T22:13:55Z","updated_at":"2016-03-28T22:13:55Z","body":"Reworked the client logger code ptal /cc @gyuho @xiang90 "}}