{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/6922","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/6922/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/6922/comments","events_url":"https://api.github.com/repos/netty/netty/issues/6922/events","html_url":"https://github.com/netty/netty/pull/6922","id":239252203,"number":6922,"title":"KQueue crash due to close/cleanup sequencing","user":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars3.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"labels":[{"id":185727,"url":"https://api.github.com/repos/netty/netty/labels/defect","name":"defect","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars3.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"assignees":[{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars3.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/166","html_url":"https://github.com/netty/netty/milestone/166","labels_url":"https://api.github.com/repos/netty/netty/milestones/166/labels","id":2573265,"number":166,"title":"4.1.13.Final","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars0.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":35,"state":"open","created_at":"2017-06-09T07:46:09Z","updated_at":"2017-06-28T21:34:36Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2017-06-28T18:22:03Z","updated_at":"2017-06-28T21:34:36Z","closed_at":"2017-06-28T21:34:35Z","pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/6922","html_url":"https://github.com/netty/netty/pull/6922","diff_url":"https://github.com/netty/netty/pull/6922.diff","patch_url":"https://github.com/netty/netty/pull/6922.patch"},"body":"Motivation:\r\nThe kqueue documentation states that 'Calling close() on a file descriptor will remove any kevents that reference the descriptor.' [1], but doesn't mention if this cleanup will be done synchronously. Under some circumstances it has been observed that cleanup was not done immediately and when KQueueEventLoop attempted to access the channel associated with the event the JVM would crash, a ClassCastException, or generally undefined behavior would occur because of invalid pointer references.\r\n\r\n[1] https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2\r\n\r\nModifications:\r\n- AbstractKqueueChannel#doClose should not rely upon this assumption and instead should call doDeregister() to ensure cleanup is done synchronously.\r\n- Deleting a kevent should also set the jniSelfPtr stored in the udata of that kevent to NULL, to ensure we will not dereference it later.\r\n\r\nResult:\r\nNo more kqueue crash due to close/cleanup sequencing."},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/311798849","html_url":"https://github.com/netty/netty/pull/6922#issuecomment-311798849","issue_url":"https://api.github.com/repos/netty/netty/issues/6922","id":311798849,"user":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars3.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"created_at":"2017-06-28T21:34:35Z","updated_at":"2017-06-28T21:34:35Z","body":"4.1 (1df8f2ccd)"}}
{"actor":{"display_login":"Scottmitch"}}