{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/2262","labels_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/2262/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/2262/comments","events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/2262/events","html_url":"https://github.com/ethereum/cpp-ethereum/pull/2262","id":90363870,"number":2262,"title":"Potential fix for EthashAux race condition","user":{"login":"LefterisJP","id":1658405,"avatar_url":"https://avatars.githubusercontent.com/u/1658405?v=3","gravatar_id":"","url":"https://api.github.com/users/LefterisJP","html_url":"https://github.com/LefterisJP","followers_url":"https://api.github.com/users/LefterisJP/followers","following_url":"https://api.github.com/users/LefterisJP/following{/other_user}","gists_url":"https://api.github.com/users/LefterisJP/gists{/gist_id}","starred_url":"https://api.github.com/users/LefterisJP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LefterisJP/subscriptions","organizations_url":"https://api.github.com/users/LefterisJP/orgs","repos_url":"https://api.github.com/users/LefterisJP/repos","events_url":"https://api.github.com/users/LefterisJP/events{/privacy}","received_events_url":"https://api.github.com/users/LefterisJP/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/labels/pleasereview","name":"pleasereview","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-23T11:39:37Z","updated_at":"2015-06-23T11:54:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/2262","html_url":"https://github.com/ethereum/cpp-ethereum/pull/2262","diff_url":"https://github.com/ethereum/cpp-ethereum/pull/2262.diff","patch_url":"https://github.com/ethereum/cpp-ethereum/pull/2262.patch"},"body":"Some EthashAux functions are protected by mutexes. These mutexes are\r\nnormal members of the EthashAux class which itself is a singleton. It\r\ncan happen that multiple threads will get inside the singleton creation\r\n`get()` functions when requesting a lock, but the lock will not be\r\nacquired due to the singleton not yet existing.\r\n\r\nThis leads to multiple threads going in the same code and causing double\r\nfree corruption.\r\n\r\nMaking the mutexes static members of the singleton should hopefully\r\naddress the issue"},"comment":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/comments/114466139","html_url":"https://github.com/ethereum/cpp-ethereum/pull/2262#issuecomment-114466139","issue_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/2262","id":114466139,"user":{"login":"gavofyork","id":138296,"avatar_url":"https://avatars.githubusercontent.com/u/138296?v=3","gravatar_id":"","url":"https://api.github.com/users/gavofyork","html_url":"https://github.com/gavofyork","followers_url":"https://api.github.com/users/gavofyork/followers","following_url":"https://api.github.com/users/gavofyork/following{/other_user}","gists_url":"https://api.github.com/users/gavofyork/gists{/gist_id}","starred_url":"https://api.github.com/users/gavofyork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavofyork/subscriptions","organizations_url":"https://api.github.com/users/gavofyork/orgs","repos_url":"https://api.github.com/users/gavofyork/repos","events_url":"https://api.github.com/users/gavofyork/events{/privacy}","received_events_url":"https://api.github.com/users/gavofyork/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T11:54:47Z","updated_at":"2015-06-23T11:54:47Z","body":"true - it's not ideal; but it cuts it down from 3 infractions to 1. could also make it a static global in the .cpp file."}}