{"action":"created","issue":{"url":"https://api.github.com/repos/cloudflare/cfssl/issues/572","repository_url":"https://api.github.com/repos/cloudflare/cfssl","labels_url":"https://api.github.com/repos/cloudflare/cfssl/issues/572/labels{/name}","comments_url":"https://api.github.com/repos/cloudflare/cfssl/issues/572/comments","events_url":"https://api.github.com/repos/cloudflare/cfssl/issues/572/events","html_url":"https://github.com/cloudflare/cfssl/pull/572","id":145310339,"number":572,"title":"Remove data race in initca (fixed #571).","user":{"login":"kisom","id":175578,"avatar_url":"https://avatars.githubusercontent.com/u/175578?v=3","gravatar_id":"","url":"https://api.github.com/users/kisom","html_url":"https://github.com/kisom","followers_url":"https://api.github.com/users/kisom/followers","following_url":"https://api.github.com/users/kisom/following{/other_user}","gists_url":"https://api.github.com/users/kisom/gists{/gist_id}","starred_url":"https://api.github.com/users/kisom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kisom/subscriptions","organizations_url":"https://api.github.com/users/kisom/orgs","repos_url":"https://api.github.com/users/kisom/repos","events_url":"https://api.github.com/users/kisom/events{/privacy}","received_events_url":"https://api.github.com/users/kisom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-01T23:42:23Z","updated_at":"2016-04-02T00:28:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cloudflare/cfssl/pulls/572","html_url":"https://github.com/cloudflare/cfssl/pull/572","diff_url":"https://github.com/cloudflare/cfssl/pull/572.diff","patch_url":"https://github.com/cloudflare/cfssl/pull/572.patch"},"body":"The default policy was previously a global variable, which caused\r\nissues when multiple CAs were being initialised in parallel (such\r\nas in testing, e.g. [1]).\r\n\r\nThis change causes the default policy to be a function returning a\r\ndefault policy. The function can still be swapped out in testing as\r\nneeded, but the functions now operate on local copies of the default\r\npolicy. A change to the default policy (which is only used in testing)\r\ncan now be accomplished by changing the function itself.\r\n\r\n[1] https://github.com/cloudflare/cfssl/issues/571"},"comment":{"url":"https://api.github.com/repos/cloudflare/cfssl/issues/comments/204616701","html_url":"https://github.com/cloudflare/cfssl/pull/572#issuecomment-204616701","issue_url":"https://api.github.com/repos/cloudflare/cfssl/issues/572","id":204616701,"user":{"login":"jsha","id":220205,"avatar_url":"https://avatars.githubusercontent.com/u/220205?v=3","gravatar_id":"","url":"https://api.github.com/users/jsha","html_url":"https://github.com/jsha","followers_url":"https://api.github.com/users/jsha/followers","following_url":"https://api.github.com/users/jsha/following{/other_user}","gists_url":"https://api.github.com/users/jsha/gists{/gist_id}","starred_url":"https://api.github.com/users/jsha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsha/subscriptions","organizations_url":"https://api.github.com/users/jsha/orgs","repos_url":"https://api.github.com/users/jsha/repos","events_url":"https://api.github.com/users/jsha/events{/privacy}","received_events_url":"https://api.github.com/users/jsha/received_events","type":"User","site_admin":false},"created_at":"2016-04-02T00:28:56Z","updated_at":"2016-04-02T00:28:56Z","body":"BTW, I'd recommend introducing the `-race` flag and `GORACE=\"halt_on_error=1\"` environment variable into your Travis tests, to help find such race conditions in the future."}}