{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/758","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/758/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/758/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/758/events","html_url":"https://github.com/facebook/rocksdb/issues/758","id":110656539,"number":758,"title":"Mutex::lock in port_win is leading to serious crashes","user":{"login":"DoktorSeltsam","id":14925555,"avatar_url":"https://avatars.githubusercontent.com/u/14925555?v=3","gravatar_id":"","url":"https://api.github.com/users/DoktorSeltsam","html_url":"https://github.com/DoktorSeltsam","followers_url":"https://api.github.com/users/DoktorSeltsam/followers","following_url":"https://api.github.com/users/DoktorSeltsam/following{/other_user}","gists_url":"https://api.github.com/users/DoktorSeltsam/gists{/gist_id}","starred_url":"https://api.github.com/users/DoktorSeltsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoktorSeltsam/subscriptions","organizations_url":"https://api.github.com/users/DoktorSeltsam/orgs","repos_url":"https://api.github.com/users/DoktorSeltsam/repos","events_url":"https://api.github.com/users/DoktorSeltsam/events{/privacy}","received_events_url":"https://api.github.com/users/DoktorSeltsam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-09T13:12:36Z","updated_at":"2015-10-13T08:47:19Z","closed_at":null,"body":"The Member `Mutex::lock` in the windows port is implemented by a `std::unique_lock`. It is called from different threads but it is not thread safe. This may leading to crashes (when the compactions is called for example).\r\n\r\nAs a workaround i put the `std::unique_lock` in a map with thread id as key. So `Mutex` can provide a single  `std::unique_lock` for every thread its needed."},"comment":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/comments/147649974","html_url":"https://github.com/facebook/rocksdb/issues/758#issuecomment-147649974","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/758","id":147649974,"user":{"login":"DoktorSeltsam","id":14925555,"avatar_url":"https://avatars.githubusercontent.com/u/14925555?v=3","gravatar_id":"","url":"https://api.github.com/users/DoktorSeltsam","html_url":"https://github.com/DoktorSeltsam","followers_url":"https://api.github.com/users/DoktorSeltsam/followers","following_url":"https://api.github.com/users/DoktorSeltsam/following{/other_user}","gists_url":"https://api.github.com/users/DoktorSeltsam/gists{/gist_id}","starred_url":"https://api.github.com/users/DoktorSeltsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoktorSeltsam/subscriptions","organizations_url":"https://api.github.com/users/DoktorSeltsam/orgs","repos_url":"https://api.github.com/users/DoktorSeltsam/repos","events_url":"https://api.github.com/users/DoktorSeltsam/events{/privacy}","received_events_url":"https://api.github.com/users/DoktorSeltsam/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T08:47:19Z","updated_at":"2015-10-13T08:47:19Z","body":"The constructor of Mutex needs a little change for release mode yet...\r\n\r\n`   /* implicit */ Mutex(bool adaptive = false)`\r\n`#ifndef NDEBUG`\r\n`   : locked_(false)`\r\n`#endif`\r\n`   {}`"}}