{"action":"created","issue":{"url":"https://api.github.com/repos/colder/php-weakref/issues/15","labels_url":"https://api.github.com/repos/colder/php-weakref/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/colder/php-weakref/issues/15/comments","events_url":"https://api.github.com/repos/colder/php-weakref/issues/15/events","html_url":"https://github.com/colder/php-weakref/pull/15","id":60557304,"number":15,"title":"Exception thrown during shutdown","user":{"login":"bmadzar","id":1139832,"avatar_url":"https://avatars.githubusercontent.com/u/1139832?v=3","gravatar_id":"","url":"https://api.github.com/users/bmadzar","html_url":"https://github.com/bmadzar","followers_url":"https://api.github.com/users/bmadzar/followers","following_url":"https://api.github.com/users/bmadzar/following{/other_user}","gists_url":"https://api.github.com/users/bmadzar/gists{/gist_id}","starred_url":"https://api.github.com/users/bmadzar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmadzar/subscriptions","organizations_url":"https://api.github.com/users/bmadzar/orgs","repos_url":"https://api.github.com/users/bmadzar/repos","events_url":"https://api.github.com/users/bmadzar/events{/privacy}","received_events_url":"https://api.github.com/users/bmadzar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-10T19:42:33Z","updated_at":"2016-01-14T02:47:05Z","closed_at":"2016-01-14T02:47:05Z","pull_request":{"url":"https://api.github.com/repos/colder/php-weakref/pulls/15","html_url":"https://github.com/colder/php-weakref/pull/15","diff_url":"https://github.com/colder/php-weakref/pull/15.diff","patch_url":"https://github.com/colder/php-weakref/pull/15.patch"},"body":"This is a pull request for bug 69131\r\n\r\n- If a strong reference is acquired but not freed and the Weakref instance is destroyed, an exception is thrown during shutdown (Failed to correctly release...) The Weakref instance is in an inconsistent state: `valid` is 0 but `acquired` is > 0.\r\n- This causes PHP not to clean up after the request correctly\r\n- The next request (FPM SAPI) errors out with a cryptic error message as some of the state from the previous request hasn't been cleaned up\r\n- Eventually the FPM child process dies (SIGSEGV)\r\n\r\nI've patched the destructor to release any strong references before setting `valid` to 0. This seems to fix the issue, though there might be something I'm missing."},"comment":{"url":"https://api.github.com/repos/colder/php-weakref/issues/comments/171513928","html_url":"https://github.com/colder/php-weakref/pull/15#issuecomment-171513928","issue_url":"https://api.github.com/repos/colder/php-weakref/issues/15","id":171513928,"user":{"login":"bmadzar","id":1139832,"avatar_url":"https://avatars.githubusercontent.com/u/1139832?v=3","gravatar_id":"","url":"https://api.github.com/users/bmadzar","html_url":"https://github.com/bmadzar","followers_url":"https://api.github.com/users/bmadzar/followers","following_url":"https://api.github.com/users/bmadzar/following{/other_user}","gists_url":"https://api.github.com/users/bmadzar/gists{/gist_id}","starred_url":"https://api.github.com/users/bmadzar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmadzar/subscriptions","organizations_url":"https://api.github.com/users/bmadzar/orgs","repos_url":"https://api.github.com/users/bmadzar/repos","events_url":"https://api.github.com/users/bmadzar/events{/privacy}","received_events_url":"https://api.github.com/users/bmadzar/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T02:47:05Z","updated_at":"2016-01-14T02:47:05Z","body":"Fixed"}}