{"action":"created","issue":{"url":"https://api.github.com/repos/mixxxdj/mixxx/issues/655","labels_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/655/labels{/name}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/655/comments","events_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/655/events","html_url":"https://github.com/mixxxdj/mixxx/pull/655","id":95955542,"number":655,"title":"Scannerlock","user":{"login":"daschuer","id":1777442,"avatar_url":"https://avatars.githubusercontent.com/u/1777442?v=3","gravatar_id":"","url":"https://api.github.com/users/daschuer","html_url":"https://github.com/daschuer","followers_url":"https://api.github.com/users/daschuer/followers","following_url":"https://api.github.com/users/daschuer/following{/other_user}","gists_url":"https://api.github.com/users/daschuer/gists{/gist_id}","starred_url":"https://api.github.com/users/daschuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daschuer/subscriptions","organizations_url":"https://api.github.com/users/daschuer/orgs","repos_url":"https://api.github.com/users/daschuer/repos","events_url":"https://api.github.com/users/daschuer/events{/privacy}","received_events_url":"https://api.github.com/users/daschuer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-19T22:52:45Z","updated_at":"2015-08-12T20:52:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/655","html_url":"https://github.com/mixxxdj/mixxx/pull/655","diff_url":"https://github.com/mixxxdj/mixxx/pull/655.diff","patch_url":"https://github.com/mixxxdj/mixxx/pull/655.patch"},"body":"I experience a hard to reproduce deadlock in LibraryScanner destructor by starting Mixxx and closing it just after \r\n\r\nThis fixes some race condition in that code part and hopefully fixes the deadlock. \r\n\r\nBefore this patch It could happen that a scan request is on the LibraryScanner event queue when the destructor is called. \r\nIn this state cancel() is not called. But we will have a running scan later.  "},"comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/issues/comments/130444441","html_url":"https://github.com/mixxxdj/mixxx/pull/655#issuecomment-130444441","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/655","id":130444441,"user":{"login":"daschuer","id":1777442,"avatar_url":"https://avatars.githubusercontent.com/u/1777442?v=3","gravatar_id":"","url":"https://api.github.com/users/daschuer","html_url":"https://github.com/daschuer","followers_url":"https://api.github.com/users/daschuer/followers","following_url":"https://api.github.com/users/daschuer/following{/other_user}","gists_url":"https://api.github.com/users/daschuer/gists{/gist_id}","starred_url":"https://api.github.com/users/daschuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daschuer/subscriptions","organizations_url":"https://api.github.com/users/daschuer/orgs","repos_url":"https://api.github.com/users/daschuer/repos","events_url":"https://api.github.com/users/daschuer/events{/privacy}","received_events_url":"https://api.github.com/users/daschuer/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T20:52:18Z","updated_at":"2015-08-12T20:52:18Z","body":"Now I have changed the code in a way that the mutex is looked before modifying m_state. \r\nI think it actually fixes a race condition if you cancel just at the time the scanner finishes. \r\n\r\nHowever the mutex does still not protect m_state write when setting to idle, it still just protects the starting and stopping phase.\r\nThere is a possible remaining race if we set idle just before setting canceling but after locking the mutex. I am working for a fix.\r\n"}}