{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/remoting/issues/221","repository_url":"https://api.github.com/repos/jenkinsci/remoting","labels_url":"https://api.github.com/repos/jenkinsci/remoting/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/remoting/issues/221/comments","events_url":"https://api.github.com/repos/jenkinsci/remoting/issues/221/events","html_url":"https://github.com/jenkinsci/remoting/pull/221","id":273383892,"number":221,"title":"[JENKINS-47965, JENKINS-38696] - IOHub should not wait infinitely for Selector in Windows.","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars0.githubusercontent.com/u/3000480?v=4","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-11-13T10:43:01Z","updated_at":"2017-11-13T14:35:25Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/jenkinsci/remoting/pulls/221","html_url":"https://github.com/jenkinsci/remoting/pull/221","diff_url":"https://github.com/jenkinsci/remoting/pull/221.diff","patch_url":"https://github.com/jenkinsci/remoting/pull/221.patch"},"body":"Windows implementation of NIO Channel Selector does not request \"Select now\" in https://github.com/jenkinsci/remoting/blob/6165d6fb6a71a7f4fce52ce5fc4cac479052ce04/src/main/java/org/jenkinsci/remoting/protocol/IOHub.java#L436 and hence calls selector#select()... and this method has no timeout.\r\n\r\nWhen the code gets into this branch, Selector will be waiting infinitely without calling selector#isOpen(). Such implementation relies on the Selector implementation, which shout interrupt the select() wait if the selector is being closed. But apparently it does not on my machine (Win 10, amd64, Oracle JDK 8u131)\r\n\r\nThis change adds wait timeout and makes the IOHub implementation to loop in the logic.\r\n\r\nhttps://issues.jenkins-ci.org/browse/JENKINS-47965\r\n\r\n@reviewbybees @stephenc @jtnord "},"comment":{"url":"https://api.github.com/repos/jenkinsci/remoting/issues/comments/343937198","html_url":"https://github.com/jenkinsci/remoting/pull/221#issuecomment-343937198","issue_url":"https://api.github.com/repos/jenkinsci/remoting/issues/221","id":343937198,"user":{"login":"jtnord","id":494726,"avatar_url":"https://avatars1.githubusercontent.com/u/494726?v=4","gravatar_id":"","url":"https://api.github.com/users/jtnord","html_url":"https://github.com/jtnord","followers_url":"https://api.github.com/users/jtnord/followers","following_url":"https://api.github.com/users/jtnord/following{/other_user}","gists_url":"https://api.github.com/users/jtnord/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnord/subscriptions","organizations_url":"https://api.github.com/users/jtnord/orgs","repos_url":"https://api.github.com/users/jtnord/repos","events_url":"https://api.github.com/users/jtnord/events{/privacy}","received_events_url":"https://api.github.com/users/jtnord/received_events","type":"User","site_admin":false},"created_at":"2017-11-13T14:35:25Z","updated_at":"2017-11-13T14:35:25Z","author_association":"MEMBER","body":"@oleg-nenashev \r\n\r\n> Even if it is fixed in newer Java 8 versions, it would not help with remoting use-cases much\r\n\r\nJenkins is JDK8 for a while now and jenkins is pretty much the only consumer of remoting AFAICT, so if we can say the bug can be fixed by using JDK 8 > update xyz then that should be ok with us."}}
{"actor":{"display_login":"jtnord"}}