{"action":"created","issue":{"url":"https://api.github.com/repos/weaveworks/weave/issues/2047","repository_url":"https://api.github.com/repos/weaveworks/weave","labels_url":"https://api.github.com/repos/weaveworks/weave/issues/2047/labels{/name}","comments_url":"https://api.github.com/repos/weaveworks/weave/issues/2047/comments","events_url":"https://api.github.com/repos/weaveworks/weave/issues/2047/events","html_url":"https://github.com/weaveworks/weave/issues/2047","id":140939294,"number":2047,"title":"Data race in IPAM unit test","user":{"login":"awh","id":1504438,"avatar_url":"https://avatars.githubusercontent.com/u/1504438?v=3","gravatar_id":"","url":"https://api.github.com/users/awh","html_url":"https://github.com/awh","followers_url":"https://api.github.com/users/awh/followers","following_url":"https://api.github.com/users/awh/following{/other_user}","gists_url":"https://api.github.com/users/awh/gists{/gist_id}","starred_url":"https://api.github.com/users/awh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awh/subscriptions","organizations_url":"https://api.github.com/users/awh/orgs","repos_url":"https://api.github.com/users/awh/repos","events_url":"https://api.github.com/users/awh/events{/privacy}","received_events_url":"https://api.github.com/users/awh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/weaveworks/weave/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/weaveworks/weave/labels/[component/ipam]","name":"[component/ipam]","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-15T11:04:00Z","updated_at":"2016-03-19T13:10:01Z","closed_at":null,"body":"In a build of the `--ipam-seed` branch - believed to be unrelated to the changes on that branch: https://circleci.com/gh/weaveworks/weave/4958\r\n\r\n```\r\ngit submodule update --init\r\nsudo -E docker run  -ti \\\r\n\t    -v /home/ubuntu/src/github.com/weaveworks/weave:/go/src/github.com/weaveworks/weave \\\r\n\t\t-v /home/ubuntu/src/github.com/weaveworks/weave/.pkg:/go/pkg \\\r\n\t\t-e GOARCH -e GOOS -e CIRCLECI -e CIRCLE_BUILD_NUM -e CIRCLE_NODE_TOTAL -e CIRCLE_NODE_INDEX -e COVERDIR -e SLOW \\\r\n\t\tweaveworks/weavebuild COVERAGE= WEAVE_VERSION=git-488d2f85c12c tests\r\nWARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded.\r\nmake: Entering directory '/go/src/github.com/weaveworks/weave'\r\n./tools/test -no-go-get\r\n./ipam ./ipam/paxos ./net\r\nINFO: 2016/03/14 17:54:33.224358 [allocator 01:00:00:01:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.228080 [allocator 01:00:00:01:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.228308 [allocator 02:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.337403 [allocator 00:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.337851 [allocator 01:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.341069 [allocator 01:00:00:02:00:00] Claim 10.0.3.2/24 for b01df00d: address allocator still initializing; will try later.\r\nINFO: 2016/03/14 17:54:33.361307 [allocator 01:00:00:02:00:00] Address 10.0.4.2/24 claimed by abcdef - not in our range\r\nINFO: 2016/03/14 17:54:33.363092 [allocator 01:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.363345 [allocator 02:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.474388 [allocator 01:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.575802 [allocator 01:00:00:01:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.576357 [allocator 01:00:00:01:00:00] Shutdown\r\nINFO: 2016/03/14 17:54:33.577058 [allocator 00:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.577441 [allocator 01:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.577815 [allocator 02:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.624015 [allocator 00:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.624426 [allocator 01:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.637501 [allocator 00:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.638206 [allocator 01:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.638727 [allocator 02:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.639159 [allocator 03:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:33.639580 [allocator 04:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:54.036961 [allocator 00:00:00:02:00:00] Initialising via deferred consensus\r\n==================\r\nWARNING: DATA RACE\r\nWrite by goroutine 72:\r\n  github.com/weaveworks/weave/ipam/ring.(*Ring).Merge()\r\n      github.com/weaveworks/weave/ipam/ring/_obj/ring.go:334 +0x125e\r\n  github.com/weaveworks/weave/ipam.(*Allocator).update()\r\n      github.com/weaveworks/weave/ipam/_test/_obj_test/allocator.go:859 +0x899\r\n  github.com/weaveworks/weave/ipam.(*Allocator).OnGossipBroadcast.func1()\r\n      github.com/weaveworks/weave/ipam/_test/_obj_test/allocator.go:591 +0xad\r\n  github.com/weaveworks/weave/ipam.(*Allocator).actorLoop()\r\n      github.com/weaveworks/weave/ipam/_test/_obj_test/allocator.go:698 +0x1aa\r\n\r\nPrevious read by goroutine 70:\r\n  github.com/weaveworks/weave/ipam/ring.(*Ring).checkInvariants()\r\n      github.com/weaveworks/weave/ipam/ring/_obj/ring.go:99 +0x75f\r\n  github.com/weaveworks/weave/ipam/ring.(*Ring).assertInvariants()\r\n      github.com/weaveworks/weave/ipam/ring/_obj/ring.go:33 +0x4a\r\n  github.com/weaveworks/weave/ipam/ring.(*Ring).OwnedRanges()\r\n      github.com/weaveworks/weave/ipam/ring/_obj/ring.go:378 +0x7b\r\n  github.com/weaveworks/weave/ipam.TestSpaceRequest()\r\n      /go/src/github.com/weaveworks/weave/ipam/allocator_test.go:595 +0x510\r\n  testing.tRunner()\r\n      /tmp/workdir/go/src/testing/testing.go:456 +0xdc\r\n\r\nGoroutine 72 (running) created at:\r\n  github.com/weaveworks/weave/ipam.(*Allocator).Start()\r\n      github.com/weaveworks/weave/ipam/_test/_obj_test/allocator.go:108 +0x135\r\n  github.com/weaveworks/weave/ipam.makeNetworkOfAllocators()\r\n      /go/src/github.com/weaveworks/weave/ipam/testutils_test.go:214 +0x3cb\r\n  github.com/weaveworks/weave/ipam.TestSpaceRequest()\r\n      /go/src/github.com/weaveworks/weave/ipam/allocator_test.go:586 +0x54\r\n  testing.tRunner()\r\n      /tmp/workdir/go/src/testing/testing.go:456 +0xdc\r\n\r\nGoroutine 70 (running) created at:\r\n  testing.RunTests()\r\n      /tmp/workdir/go/src/testing/testing.go:561 +0xaa3\r\n  testing.(*M).Run()\r\n      /tmp/workdir/go/src/testing/testing.go:494 +0xe4\r\n  main.main()\r\n      github.com/weaveworks/weave/ipam/_test/_testmain.go:186 +0x38d\r\n==================\r\nINFO: 2016/03/14 17:54:54.044634 [allocator 02:00:00:02:00:00] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:54.051640 [allocator 08:00:27:01:c3:9a] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:54.064915 [allocator 08:00:27:01:c3:9a] Initialising via deferred consensus\r\nINFO: 2016/03/14 17:54:54.072675 [allocator 08:00:27:01:c3:9a] Initialising via deferred consensus\r\nPASS\r\ncoverage: 64.3% of statements in github.com/weaveworks/weave/ipam, github.com/weaveworks/weave/common, github.com/weaveworks/weave/common/docker, github.com/weaveworks/weave/db, github.com/weaveworks/weave/ipam/paxos, github.com/weaveworks/weave/ipam/ring, github.com/weaveworks/weave/ipam/space, github.com/weaveworks/weave/net/address\r\nFound 1 data race(s)\r\nFAIL\tgithub.com/weaveworks/weave/ipam\t21.987s\r\nok  \tgithub.com/weaveworks/weave/ipam/paxos\t22.110s\tcoverage: 88.9% of statements in github.com/weaveworks/weave/ipam/paxos\r\nok  \tgithub.com/weaveworks/weave/net\t1.128s\tcoverage: 1.4% of statements in github.com/weaveworks/weave/net\r\n\r\nMakefile:119: recipe for target 'tests' failed\r\nmake: *** [tests] Error 1\r\nmake: Leaving directory '/go/src/github.com/weaveworks/weave'\r\n\r\nmake: *** [tests] Error 2 cd $SRCDIR; COVERDIR=test/coverage make RM= tests returned exit code 2\r\n```"},"comment":{"url":"https://api.github.com/repos/weaveworks/weave/issues/comments/198701010","html_url":"https://github.com/weaveworks/weave/issues/2047#issuecomment-198701010","issue_url":"https://api.github.com/repos/weaveworks/weave/issues/2047","id":198701010,"user":{"login":"rade","id":109109,"avatar_url":"https://avatars.githubusercontent.com/u/109109?v=3","gravatar_id":"","url":"https://api.github.com/users/rade","html_url":"https://github.com/rade","followers_url":"https://api.github.com/users/rade/followers","following_url":"https://api.github.com/users/rade/following{/other_user}","gists_url":"https://api.github.com/users/rade/gists{/gist_id}","starred_url":"https://api.github.com/users/rade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rade/subscriptions","organizations_url":"https://api.github.com/users/rade/orgs","repos_url":"https://api.github.com/users/rade/repos","events_url":"https://api.github.com/users/rade/events{/privacy}","received_events_url":"https://api.github.com/users/rade/received_events","type":"User","site_admin":false},"created_at":"2016-03-19T13:10:01Z","updated_at":"2016-03-19T13:10:01Z","body":"and [again](https://circleci.com/gh/weaveworks/weave/5038)"}}