{"action":"created","issue":{"url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus/issues/117","repository_url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus","labels_url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus/issues/117/comments","events_url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus/issues/117/events","html_url":"https://github.com/kodi-pvr/pvr.vuplus/pull/117","id":370767026,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMzcxMTA1","number":117,"title":"Potential fix for possible race condition on startup, fixes #114","user":{"login":"phunkyfish","id":4601187,"node_id":"MDQ6VXNlcjQ2MDExODc=","avatar_url":"https://avatars1.githubusercontent.com/u/4601187?v=4","gravatar_id":"","url":"https://api.github.com/users/phunkyfish","html_url":"https://github.com/phunkyfish","followers_url":"https://api.github.com/users/phunkyfish/followers","following_url":"https://api.github.com/users/phunkyfish/following{/other_user}","gists_url":"https://api.github.com/users/phunkyfish/gists{/gist_id}","starred_url":"https://api.github.com/users/phunkyfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phunkyfish/subscriptions","organizations_url":"https://api.github.com/users/phunkyfish/orgs","repos_url":"https://api.github.com/users/phunkyfish/repos","events_url":"https://api.github.com/users/phunkyfish/events{/privacy}","received_events_url":"https://api.github.com/users/phunkyfish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-16T19:36:54Z","updated_at":"2018-10-16T21:31:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus/pulls/117","html_url":"https://github.com/kodi-pvr/pvr.vuplus/pull/117","diff_url":"https://github.com/kodi-pvr/pvr.vuplus/pull/117.diff","patch_url":"https://github.com/kodi-pvr/pvr.vuplus/pull/117.patch"},"body":"@ksooo \r\nOk, let me preface this by me saying I understand this is a risky change but there is probably also some learning with it. I'm more than happy to close it if needs be.\r\n\r\nCurrently it takes somewhere between 20 and 50 restart attempts to make this happen so testing it is problematic. I would much rather fix the root of the problem but figuring out what that is is difficult.\r\n\r\nSome questions:\r\n\r\n1) What generally should be covered by a lock object? Surely you want them to be as minimal as possible so only for when reading and changing backend data to ensure these reads and writes are atomic, correct?\r\n\r\n2) You also mentioned that making the mutexes mutable is preferable to removing const from a function. Would the mutex not need to be a member variable to make it mutable? \r\n\r\n3) Are there any techniques I can use locally to make the race condition happen more often. Faced with a similar issue how would you go about tackling it? \r\n\r\nAnother approach would be to wait until a users has this occur more often and get a debug log from them to point me in the right direction. At least with this approach we do not risk deadlock which is better.\r\n\r\nAs I said at the start happy to bin this. I've mostly talked myself into the wait and see approach already but would like to hear your thoughts.\r\n\r\nThanks in advance ;)"},"comment":{"url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus/issues/comments/430408474","html_url":"https://github.com/kodi-pvr/pvr.vuplus/pull/117#issuecomment-430408474","issue_url":"https://api.github.com/repos/kodi-pvr/pvr.vuplus/issues/117","id":430408474,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDQwODQ3NA==","user":{"login":"ksooo","id":3226626,"node_id":"MDQ6VXNlcjMyMjY2MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/3226626?v=4","gravatar_id":"","url":"https://api.github.com/users/ksooo","html_url":"https://github.com/ksooo","followers_url":"https://api.github.com/users/ksooo/followers","following_url":"https://api.github.com/users/ksooo/following{/other_user}","gists_url":"https://api.github.com/users/ksooo/gists{/gist_id}","starred_url":"https://api.github.com/users/ksooo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksooo/subscriptions","organizations_url":"https://api.github.com/users/ksooo/orgs","repos_url":"https://api.github.com/users/ksooo/repos","events_url":"https://api.github.com/users/ksooo/events{/privacy}","received_events_url":"https://api.github.com/users/ksooo/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T21:31:48Z","updated_at":"2018-10-16T21:31:48Z","author_association":"MEMBER","body":"I would bin this PR and wait for users facing this problem more often - so I could get real life logs / struck traces and would have a chance to provide minimalistic fixes. ;-)"}}
{"actor":{"display_login":"ksooo"}}