{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/remoting/pulls/comments/53630820","id":53630820,"diff_hunk":"@@ -516,19 +516,34 @@ public static void main(InputStream is, OutputStream os, Mode mode, boolean perf\n         if (os instanceof StandardOutputStream)\n             cb.withProperty(StandardOutputStream.class,os);\n \n-        Channel channel = cb.build(is, os);\n+        final Channel channel = cb.build(is, os);\n         System.err.println(\"channel started\");\n         long timeout = 1000 * Long.parseLong(\n                 System.getProperty(\"hudson.remoting.Launcher.pingTimeoutSec\", \"240\")),\n              interval = 1000 * Long.parseLong(\n                 System.getProperty(\"hudson.remoting.Launcher.pingIntervalSec\", \"600\"));\n+\n+        boolean pingFailureAnalyzer = Boolean.parseBoolean(System.getProperty(\"hudson.remoting.Launcher.pingFailureAnalyzer\", \"false\"));\n+\n         if (performPing && timeout > 0 && interval > 0) {\n-            new PingThread(channel, timeout, interval) {\n+            new PingThread(channel, timeout, interval, pingFailureAnalyzer) {\n+                @Deprecated\n                 @Override\n                 protected void onDead() {\n                     System.err.println(\"Ping failed. Terminating\");\n                     System.exit(-1);\n                 }\n+\n+                @Override\n+                protected void onDead(Throwable diagnosis) {\n+                    if (this.isPingFailureAnalyzer()) {","path":"src/main/java/hudson/remoting/Launcher.java","position":26,"original_position":26,"commit_id":"f2ed6a55259423db289d7003dffc0daf50006d1d","original_commit_id":"f2ed6a55259423db289d7003dffc0daf50006d1d","user":{"login":"jtnord","id":494726,"avatar_url":"https://avatars.githubusercontent.com/u/494726?v=3","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},"body":"Will this will spam the logs for orderly shutdown?\r\n\r\nhttps://github.com/jenkinsci/remoting/pull/74/files#diff-ba801c8ba3eabb55537cfff979bb3655L117","created_at":"2016-02-22T14:25:59Z","updated_at":"2016-02-22T14:25:59Z","html_url":"https://github.com/jenkinsci/remoting/pull/74#discussion_r53630820","pull_request_url":"https://api.github.com/repos/jenkinsci/remoting/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/remoting/pulls/comments/53630820"},"html":{"href":"https://github.com/jenkinsci/remoting/pull/74#discussion_r53630820"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/remoting/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/remoting/pulls/74","id":60175350,"html_url":"https://github.com/jenkinsci/remoting/pull/74","diff_url":"https://github.com/jenkinsci/remoting/pull/74.diff","patch_url":"https://github.com/jenkinsci/remoting/pull/74.patch","issue_url":"https://api.github.com/repos/jenkinsci/remoting/issues/74","number":74,"state":"open","locked":false,"title":"[WiP][FIXED JENKINS-33082] Record PingThread diagnosis information on agent pingthread failure","user":{"login":"fbelzunc","id":3898648,"avatar_url":"https://avatars.githubusercontent.com/u/3898648?v=3","gravatar_id":"","url":"https://api.github.com/users/fbelzunc","html_url":"https://github.com/fbelzunc","followers_url":"https://api.github.com/users/fbelzunc/followers","following_url":"https://api.github.com/users/fbelzunc/following{/other_user}","gists_url":"https://api.github.com/users/fbelzunc/gists{/gist_id}","starred_url":"https://api.github.com/users/fbelzunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbelzunc/subscriptions","organizations_url":"https://api.github.com/users/fbelzunc/orgs","repos_url":"https://api.github.com/users/fbelzunc/repos","events_url":"https://api.github.com/users/fbelzunc/events{/privacy}","received_events_url":"https://api.github.com/users/fbelzunc/received_events","type":"User","site_admin":false},"body":"This is just a work in progress...\r\n\r\nFor diagnosis purposes could be nice to record what is happening on the slave side once the pingThread has failed.\r\n\r\n@andresrc @oleg-nenashev @jtnord WDYT about this? Might be useful?\r\n","created_at":"2016-02-22T13:50:08Z","updated_at":"2016-02-22T14:25:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3eca295a441a5135fcfbf49a5f4cb80b8007509b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/remoting/pulls/74/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/remoting/pulls/74/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/remoting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/remoting/issues/74/comments","statuses_url":"https://api.github.com/repos/jenkinsci/remoting/statuses/f2ed6a55259423db289d7003dffc0daf50006d1d","head":{"label":"fbelzunc:pingthread","ref":"pingthread","sha":"f2ed6a55259423db289d7003dffc0daf50006d1d","user":{"login":"fbelzunc","id":3898648,"avatar_url":"https://avatars.githubusercontent.com/u/3898648?v=3","gravatar_id":"","url":"https://api.github.com/users/fbelzunc","html_url":"https://github.com/fbelzunc","followers_url":"https://api.github.com/users/fbelzunc/followers","following_url":"https://api.github.com/users/fbelzunc/following{/other_user}","gists_url":"https://api.github.com/users/fbelzunc/gists{/gist_id}","starred_url":"https://api.github.com/users/fbelzunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbelzunc/subscriptions","organizations_url":"https://api.github.com/users/fbelzunc/orgs","repos_url":"https://api.github.com/users/fbelzunc/repos","events_url":"https://api.github.com/users/fbelzunc/events{/privacy}","received_events_url":"https://api.github.com/users/fbelzunc/received_events","type":"User","site_admin":false},"repo":{"id":51997440,"name":"remoting","full_name":"fbelzunc/remoting","owner":{"login":"fbelzunc","id":3898648,"avatar_url":"https://avatars.githubusercontent.com/u/3898648?v=3","gravatar_id":"","url":"https://api.github.com/users/fbelzunc","html_url":"https://github.com/fbelzunc","followers_url":"https://api.github.com/users/fbelzunc/followers","following_url":"https://api.github.com/users/fbelzunc/following{/other_user}","gists_url":"https://api.github.com/users/fbelzunc/gists{/gist_id}","starred_url":"https://api.github.com/users/fbelzunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbelzunc/subscriptions","organizations_url":"https://api.github.com/users/fbelzunc/orgs","repos_url":"https://api.github.com/users/fbelzunc/repos","events_url":"https://api.github.com/users/fbelzunc/events{/privacy}","received_events_url":"https://api.github.com/users/fbelzunc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fbelzunc/remoting","description":"Jenkins remoting module","fork":true,"url":"https://api.github.com/repos/fbelzunc/remoting","forks_url":"https://api.github.com/repos/fbelzunc/remoting/forks","keys_url":"https://api.github.com/repos/fbelzunc/remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fbelzunc/remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fbelzunc/remoting/teams","hooks_url":"https://api.github.com/repos/fbelzunc/remoting/hooks","issue_events_url":"https://api.github.com/repos/fbelzunc/remoting/issues/events{/number}","events_url":"https://api.github.com/repos/fbelzunc/remoting/events","assignees_url":"https://api.github.com/repos/fbelzunc/remoting/assignees{/user}","branches_url":"https://api.github.com/repos/fbelzunc/remoting/branches{/branch}","tags_url":"https://api.github.com/repos/fbelzunc/remoting/tags","blobs_url":"https://api.github.com/repos/fbelzunc/remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fbelzunc/remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fbelzunc/remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/fbelzunc/remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fbelzunc/remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/fbelzunc/remoting/languages","stargazers_url":"https://api.github.com/repos/fbelzunc/remoting/stargazers","contributors_url":"https://api.github.com/repos/fbelzunc/remoting/contributors","subscribers_url":"https://api.github.com/repos/fbelzunc/remoting/subscribers","subscription_url":"https://api.github.com/repos/fbelzunc/remoting/subscription","commits_url":"https://api.github.com/repos/fbelzunc/remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/fbelzunc/remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/fbelzunc/remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/fbelzunc/remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/fbelzunc/remoting/contents/{+path}","compare_url":"https://api.github.com/repos/fbelzunc/remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fbelzunc/remoting/merges","archive_url":"https://api.github.com/repos/fbelzunc/remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fbelzunc/remoting/downloads","issues_url":"https://api.github.com/repos/fbelzunc/remoting/issues{/number}","pulls_url":"https://api.github.com/repos/fbelzunc/remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/fbelzunc/remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/fbelzunc/remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fbelzunc/remoting/labels{/name}","releases_url":"https://api.github.com/repos/fbelzunc/remoting/releases{/id}","deployments_url":"https://api.github.com/repos/fbelzunc/remoting/deployments","created_at":"2016-02-18T09:52:18Z","updated_at":"2016-02-18T09:52:21Z","pushed_at":"2016-02-22T13:42:08Z","git_url":"git://github.com/fbelzunc/remoting.git","ssh_url":"git@github.com:fbelzunc/remoting.git","clone_url":"https://github.com/fbelzunc/remoting.git","svn_url":"https://github.com/fbelzunc/remoting","homepage":"http://jenkins-ci.org/","size":2384,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"de883efad4c1be53a58f41641eadbb5628f9bac5","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":2040168,"name":"remoting","full_name":"jenkinsci/remoting","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/remoting","description":"Jenkins remoting module","fork":false,"url":"https://api.github.com/repos/jenkinsci/remoting","forks_url":"https://api.github.com/repos/jenkinsci/remoting/forks","keys_url":"https://api.github.com/repos/jenkinsci/remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/remoting/teams","hooks_url":"https://api.github.com/repos/jenkinsci/remoting/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/remoting/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/remoting/events","assignees_url":"https://api.github.com/repos/jenkinsci/remoting/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/remoting/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/remoting/tags","blobs_url":"https://api.github.com/repos/jenkinsci/remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/remoting/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/remoting/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/remoting/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/remoting/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/remoting/subscription","commits_url":"https://api.github.com/repos/jenkinsci/remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/remoting/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/remoting/merges","archive_url":"https://api.github.com/repos/jenkinsci/remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/remoting/downloads","issues_url":"https://api.github.com/repos/jenkinsci/remoting/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/remoting/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/remoting/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/remoting/deployments","created_at":"2011-07-13T05:06:16Z","updated_at":"2016-01-24T18:28:02Z","pushed_at":"2016-02-22T13:50:09Z","git_url":"git://github.com/jenkinsci/remoting.git","ssh_url":"git@github.com:jenkinsci/remoting.git","clone_url":"https://github.com/jenkinsci/remoting.git","svn_url":"https://github.com/jenkinsci/remoting","homepage":"http://jenkins-ci.org/","size":3037,"stargazers_count":35,"watchers_count":35,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":5,"forks":64,"open_issues":5,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/remoting/pulls/74"},"html":{"href":"https://github.com/jenkinsci/remoting/pull/74"},"issue":{"href":"https://api.github.com/repos/jenkinsci/remoting/issues/74"},"comments":{"href":"https://api.github.com/repos/jenkinsci/remoting/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/remoting/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/remoting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/remoting/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/remoting/statuses/f2ed6a55259423db289d7003dffc0daf50006d1d"}}}}