{"action":"created","issue":{"url":"https://api.github.com/repos/cocreature/hasql-notifications/issues/1","repository_url":"https://api.github.com/repos/cocreature/hasql-notifications","labels_url":"https://api.github.com/repos/cocreature/hasql-notifications/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/cocreature/hasql-notifications/issues/1/comments","events_url":"https://api.github.com/repos/cocreature/hasql-notifications/issues/1/events","html_url":"https://github.com/cocreature/hasql-notifications/issues/1","id":168888189,"number":1,"title":"Race condition in getNotification","user":{"login":"cocreature","id":1313584,"avatar_url":"https://avatars.githubusercontent.com/u/1313584?v=3","gravatar_id":"","url":"https://api.github.com/users/cocreature","html_url":"https://github.com/cocreature","followers_url":"https://api.github.com/users/cocreature/followers","following_url":"https://api.github.com/users/cocreature/following{/other_user}","gists_url":"https://api.github.com/users/cocreature/gists{/gist_id}","starred_url":"https://api.github.com/users/cocreature/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocreature/subscriptions","organizations_url":"https://api.github.com/users/cocreature/orgs","repos_url":"https://api.github.com/users/cocreature/repos","events_url":"https://api.github.com/users/cocreature/events{/privacy}","received_events_url":"https://api.github.com/users/cocreature/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-08-02T13:42:50Z","updated_at":"2016-08-30T19:19:38Z","closed_at":null,"body":"Alright I have tracked it down to a single line which seems to deterministically toggle a deterministic deadlock. The problem is solved by a call to [threadWaitRead](https://github.com/cocreature/hasql-notifications/blob/9f707cf53e01bc3e33cbb46d83e8f756cd486418/test/Hasql/NotificationSpec.hs#L88).\r\n\r\nWithout the threaded runtime the test fails always when I don’t call `threadWaitRead`, with the threaded runtime it sometimes passes. I have never seen it fail with `threadWaitRead` inside.\r\n\r\nI’m sadly a bit out of ideas here. I don’t see why the call to `threadWaitRead` should change how the other thread calling `threadWaitRead` behaves.\r\n\r\n@lpsmith Sorry for bothering you but you obviously know a lot more about this than I do, any ideas what could cause this?"},"comment":{"url":"https://api.github.com/repos/cocreature/hasql-notifications/issues/comments/243549494","html_url":"https://github.com/cocreature/hasql-notifications/issues/1#issuecomment-243549494","issue_url":"https://api.github.com/repos/cocreature/hasql-notifications/issues/1","id":243549494,"user":{"login":"cocreature","id":1313584,"avatar_url":"https://avatars.githubusercontent.com/u/1313584?v=3","gravatar_id":"","url":"https://api.github.com/users/cocreature","html_url":"https://github.com/cocreature","followers_url":"https://api.github.com/users/cocreature/followers","following_url":"https://api.github.com/users/cocreature/following{/other_user}","gists_url":"https://api.github.com/users/cocreature/gists{/gist_id}","starred_url":"https://api.github.com/users/cocreature/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocreature/subscriptions","organizations_url":"https://api.github.com/users/cocreature/orgs","repos_url":"https://api.github.com/users/cocreature/repos","events_url":"https://api.github.com/users/cocreature/events{/privacy}","received_events_url":"https://api.github.com/users/cocreature/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T19:19:38Z","updated_at":"2016-08-30T19:19:38Z","body":"Thanks for the detailed analysis and sorry that I didn’t reply (got busy with finishing by Bachelor’s thesis) on your previous comment.\r\n\r\nI don’t think having this as a separate project from `hasql` makes sense if it means we have to rely on subtle properties of `hasql` (i.e., calling `threadWaitRead` in `exec`). So making a new PR that includes the threadWaitRead as well as the actual code for getting notifications is imho the right way forward.\r\n\r\nI’m still busy with exams for the next two weeks, so I’m not sure I’ll get to it before then. If you want to do it, I’ll happily support your PR :)"}}
{"actor":{"display_login":"cocreature"}}