{"action":"opened","issue":{"url":"https://api.github.com/repos/discourse/mini_racer/issues/111","repository_url":"https://api.github.com/repos/discourse/mini_racer","labels_url":"https://api.github.com/repos/discourse/mini_racer/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/discourse/mini_racer/issues/111/comments","events_url":"https://api.github.com/repos/discourse/mini_racer/issues/111/events","html_url":"https://github.com/discourse/mini_racer/issues/111","id":370466819,"node_id":"MDU6SXNzdWUzNzA0NjY4MTk=","number":111,"title":"Deadlocks when used in threaded environment (Cucumber)","user":{"login":"TJC","id":43905,"node_id":"MDQ6VXNlcjQzOTA1","avatar_url":"https://avatars2.githubusercontent.com/u/43905?v=4","gravatar_id":"","url":"https://api.github.com/users/TJC","html_url":"https://github.com/TJC","followers_url":"https://api.github.com/users/TJC/followers","following_url":"https://api.github.com/users/TJC/following{/other_user}","gists_url":"https://api.github.com/users/TJC/gists{/gist_id}","starred_url":"https://api.github.com/users/TJC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TJC/subscriptions","organizations_url":"https://api.github.com/users/TJC/orgs","repos_url":"https://api.github.com/users/TJC/repos","events_url":"https://api.github.com/users/TJC/events{/privacy}","received_events_url":"https://api.github.com/users/TJC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-16T07:03:02Z","updated_at":"2018-10-16T07:03:02Z","closed_at":null,"author_association":"NONE","body":"We're running MiniRacer 0.2.3 with libv8 6.7.288.46.1 inside a Rails application.\r\n\r\nEverything works fine when it's single-threaded, but (for reasons I don't quite understand), Cucumber launches multiple threads, several of which end up interacting with MiniRacer. (Although not simultaneously)\r\n\r\nWe're then seeing deadlocks inside MiniRacer during the eval() call. This is particularly strange because according to the logs, the code is not running these evals at the same time. They are seconds apart.\r\n\r\nThis mostly appears when we're creating a new MiniRacer::Context per call. If we keep the contexts around and re-use them, then the issue doesn't appear. (Or at least not frequently enough to be noticed.)\r\n\r\nWe're using a shared MiniRacer::Isolate for all contexts, in either situation.\r\n\r\nAlthough I can reproduce this regularly on the work systems, I'm struggling to make a minimal test-case that demonstrates it. I'll report back if I become successful there.\r\n\r\nI wondered if you have any advice on further ways to debug this?"}}
{"actor":{"display_login":"TJC"}}