{"action":"closed","number":272,"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/272","id":48508531,"html_url":"https://github.com/Particular/NServiceBus.Azure/pull/272","diff_url":"https://github.com/Particular/NServiceBus.Azure/pull/272.diff","patch_url":"https://github.com/Particular/NServiceBus.Azure/pull/272.patch","issue_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/272","number":272,"state":"closed","locked":false,"title":"Hotfix-6.1.6 CircularBuffer throws exception","user":{"login":"SeanFeldman","id":1309622,"avatar_url":"https://avatars.githubusercontent.com/u/1309622?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanFeldman","html_url":"https://github.com/SeanFeldman","followers_url":"https://api.github.com/users/SeanFeldman/followers","following_url":"https://api.github.com/users/SeanFeldman/following{/other_user}","gists_url":"https://api.github.com/users/SeanFeldman/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanFeldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanFeldman/subscriptions","organizations_url":"https://api.github.com/users/SeanFeldman/orgs","repos_url":"https://api.github.com/users/SeanFeldman/repos","events_url":"https://api.github.com/users/SeanFeldman/events{/privacy}","received_events_url":"https://api.github.com/users/SeanFeldman/received_events","type":"User","site_admin":false},"body":"## Who's affected\r\n\r\nAnyone who's using Azure Service Bus transports and using `Bus.Send()` or `Bus.Publish()` in a very tight loop with multiple threads.\r\n\r\n## Symptoms\r\n\r\nDue to a calculation error that can happen with concurrent access an `IndexOutOfRangeException` exception can be thrown\r\n\r\n---\r\n\r\nReported in GG: https://groups.google.com/forum/#!topic/particularsoftware/a1GigfXhI94\r\n\r\n[`CircularBuffer.Get()`](https://github.com/Particular/NServiceBus.AzureServiceBus/blob/master/src/Transport/Creation/Clients/CircularBuffer.cs#L166) is not thread safe and may throw exception when used in concurrent mode\r\n\r\nRepro:\r\n```c#\r\nParallel.ForEach(hugeArray, new ParallelOptions() { MaxDegreeOfParallelism = 5 }, item =>\r\n{\r\n    Bus.Send(new SomethingCommand\r\n    {\r\n        Item = item\r\n    });\r\n});\r\n```\r\n\r\nConnects to Particular/NServiceBus.AzureServiceBus#59","created_at":"2015-10-22T20:29:17Z","updated_at":"2015-10-26T16:03:02Z","closed_at":"2015-10-26T16:03:02Z","merged_at":"2015-10-26T16:03:02Z","merge_commit_sha":"ee37cba55bc52cb189983d7ad85a61008109b025","assignee":null,"milestone":{"url":"https://api.github.com/repos/Particular/NServiceBus.Azure/milestones/40","html_url":"https://github.com/Particular/NServiceBus.Azure/milestones/6.1.6","labels_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/milestones/40/labels","id":1371694,"number":40,"title":"6.1.6","description":null,"creator":{"login":"SeanFeldman","id":1309622,"avatar_url":"https://avatars.githubusercontent.com/u/1309622?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanFeldman","html_url":"https://github.com/SeanFeldman","followers_url":"https://api.github.com/users/SeanFeldman/followers","following_url":"https://api.github.com/users/SeanFeldman/following{/other_user}","gists_url":"https://api.github.com/users/SeanFeldman/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanFeldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanFeldman/subscriptions","organizations_url":"https://api.github.com/users/SeanFeldman/orgs","repos_url":"https://api.github.com/users/SeanFeldman/repos","events_url":"https://api.github.com/users/SeanFeldman/events{/privacy}","received_events_url":"https://api.github.com/users/SeanFeldman/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2015-10-23T03:18:15Z","updated_at":"2015-10-26T16:03:02Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/272/commits","review_comments_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/272/comments","review_comment_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/272/comments","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/statuses/bbe547063d3f0d8da3bd695e35f24ea690e6a191","head":{"label":"Particular:hotfix-6.1.6","ref":"hotfix-6.1.6","sha":"bbe547063d3f0d8da3bd695e35f24ea690e6a191","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":12157311,"name":"NServiceBus.Azure","full_name":"Particular/NServiceBus.Azure","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus.Azure","description":"Transports and storage for Windows Azure","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus.Azure","forks_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/releases{/id}","created_at":"2013-08-16T11:30:33Z","updated_at":"2015-08-18T16:16:43Z","pushed_at":"2015-10-26T16:03:02Z","git_url":"git://github.com/Particular/NServiceBus.Azure.git","ssh_url":"git@github.com:Particular/NServiceBus.Azure.git","clone_url":"https://github.com/Particular/NServiceBus.Azure.git","svn_url":"https://github.com/Particular/NServiceBus.Azure","homepage":null,"size":128623,"stargazers_count":13,"watchers_count":13,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":1,"forks":15,"open_issues":1,"watchers":13,"default_branch":"develop"}},"base":{"label":"Particular:support-6.1","ref":"support-6.1","sha":"c76d27af9e51d4f59f2d42f3137264d6264ab298","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":12157311,"name":"NServiceBus.Azure","full_name":"Particular/NServiceBus.Azure","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus.Azure","description":"Transports and storage for Windows Azure","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus.Azure","forks_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus.Azure/releases{/id}","created_at":"2013-08-16T11:30:33Z","updated_at":"2015-08-18T16:16:43Z","pushed_at":"2015-10-26T16:03:02Z","git_url":"git://github.com/Particular/NServiceBus.Azure.git","ssh_url":"git@github.com:Particular/NServiceBus.Azure.git","clone_url":"https://github.com/Particular/NServiceBus.Azure.git","svn_url":"https://github.com/Particular/NServiceBus.Azure","homepage":null,"size":128623,"stargazers_count":13,"watchers_count":13,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":1,"forks":15,"open_issues":1,"watchers":13,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/272"},"html":{"href":"https://github.com/Particular/NServiceBus.Azure/pull/272"},"issue":{"href":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/272"},"comments":{"href":"https://api.github.com/repos/Particular/NServiceBus.Azure/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/272/comments"},"review_comment":{"href":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Particular/NServiceBus.Azure/pulls/272/commits"},"statuses":{"href":"https://api.github.com/repos/Particular/NServiceBus.Azure/statuses/bbe547063d3f0d8da3bd695e35f24ea690e6a191"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"SeanFeldman","id":1309622,"avatar_url":"https://avatars.githubusercontent.com/u/1309622?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanFeldman","html_url":"https://github.com/SeanFeldman","followers_url":"https://api.github.com/users/SeanFeldman/followers","following_url":"https://api.github.com/users/SeanFeldman/following{/other_user}","gists_url":"https://api.github.com/users/SeanFeldman/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanFeldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanFeldman/subscriptions","organizations_url":"https://api.github.com/users/SeanFeldman/orgs","repos_url":"https://api.github.com/users/SeanFeldman/repos","events_url":"https://api.github.com/users/SeanFeldman/events{/privacy}","received_events_url":"https://api.github.com/users/SeanFeldman/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":87,"deletions":10,"changed_files":4}}