{"action":"closed","issue":{"url":"https://api.github.com/repos/phpv8/v8js/issues/282","repository_url":"https://api.github.com/repos/phpv8/v8js","labels_url":"https://api.github.com/repos/phpv8/v8js/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/phpv8/v8js/issues/282/comments","events_url":"https://api.github.com/repos/phpv8/v8js/issues/282/events","html_url":"https://github.com/phpv8/v8js/issues/282","id":199788931,"number":282,"title":"V8JS php instable after a \"die\" or PHP error during a callback","user":{"login":"sourisdudesert","id":9135042,"avatar_url":"https://avatars.githubusercontent.com/u/9135042?v=3","gravatar_id":"","url":"https://api.github.com/users/sourisdudesert","html_url":"https://github.com/sourisdudesert","followers_url":"https://api.github.com/users/sourisdudesert/followers","following_url":"https://api.github.com/users/sourisdudesert/following{/other_user}","gists_url":"https://api.github.com/users/sourisdudesert/gists{/gist_id}","starred_url":"https://api.github.com/users/sourisdudesert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourisdudesert/subscriptions","organizations_url":"https://api.github.com/users/sourisdudesert/orgs","repos_url":"https://api.github.com/users/sourisdudesert/repos","events_url":"https://api.github.com/users/sourisdudesert/events{/privacy}","received_events_url":"https://api.github.com/users/sourisdudesert/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-10T10:49:18Z","updated_at":"2017-01-20T09:44:16Z","closed_at":"2017-01-20T09:44:16Z","body":"At first, thanks for your work on phpv8.\r\n\r\nI successfully manage to use V8JS with PHP/Apache for my project, but I discover than V8JS engine seems to become instable when a \"die\" happens.\r\n\r\nIt seems non reproductible according to #122 , but I reproduce this 100% of the time.\r\n\r\n**Symptom :**\r\nV8JS works perfectly fine until the first \"die\" happens. Starting from this, all uses of V8JS by other following requests crashes randomly with no explanation/exception. The only possible way to get back to a stable situation is to restart Apache.\r\n\r\n\r\n**Tested on 2 different systems :**\r\nLinux Mint 17.2  / Ubuntu 16.04\r\nApache 2.4.7 / 2.4.18\r\nV8JS 5.7 (on both system)\r\nphpv8 1.3.3 (on both system, with all options / defaults)\r\n\r\n**Crash test code used :**\r\n[crash.php.txt](https://github.com/phpv8/v8js/files/695843/crash.php.txt)\r\n\r\n**What this crash test file is doing :**\r\n_ during the 5 first steps, the V8JS javascript script makes a callback to a PHP function that \"die()\".\r\n_ during all the steps afterwards, the V8JS javascript makes a simple callback to a PHP function that returns a normal results.\r\n\r\n**What happens :**\r\n_ The behavior when PHP die is correct (the whole script die).\r\n_ The behavior during the steps afterwards is not correct, as the V8JS crashes and the \"Normal end\" message do not appear ~50% of the time. The V8JS seems to be frozen.\r\n\r\n**How to recover from this :**\r\nrestart Apache.\r\n\r\n**Conclusion & questions :**\r\nI know that using \"die\" is a bad practice, but this bug gives the feeling that something bad may happens to V8JS that crashes all requests afterwards. This prevents me to go with V8JS in production, because I cannot risk to crash the whole server if something is going wrong with a single request.\r\n\r\n1. shouldn't phpv8 be totally \"stateless\", so that 1 request crash do not impact any other request?\r\n2. is it safe to use phpv8 in a production environment at now?\r\n\r\nThanks again for your work & answer."}}
{"actor":{"display_login":"sourisdudesert"}}