{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/comments/186592880","pull_request_review_id":118200684,"id":186592880,"diff_hunk":"@@ -353,6 +353,11 @@ private boolean run() {\n                     threads.remove(t.id);\n                     if (threads.isEmpty()) {\n                         execution.onProgramEnd(o);\n+                        try {\n+                            this.execution.saveOwner();\n+                        } catch (Exception ex) {\n+                            LOGGER.log(Level.WARNING, \"Error saving execution for \"+this, ex);","path":"src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java","position":7,"original_position":7,"commit_id":"6095ac8751cb2ef7edc96650e296ca5bbe838c0a","original_commit_id":"6095ac8751cb2ef7edc96650e296ca5bbe838c0a","user":{"login":"jglick","id":154109,"avatar_url":"https://avatars1.githubusercontent.com/u/154109?v=4","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"body":"Useless `toString()`. Try\r\n\r\n```java\r\nLOGGER.log(Level.WARNING, \"Error saving execution for \" + execution, ex);\r\n```","created_at":"2018-05-08T01:02:29Z","updated_at":"2018-05-08T01:04:03Z","html_url":"https://github.com/jenkinsci/workflow-cps-plugin/pull/226#discussion_r186592880","pull_request_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/comments/186592880"},"html":{"href":"https://github.com/jenkinsci/workflow-cps-plugin/pull/226#discussion_r186592880"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226","id":186479936,"html_url":"https://github.com/jenkinsci/workflow-cps-plugin/pull/226","diff_url":"https://github.com/jenkinsci/workflow-cps-plugin/pull/226.diff","patch_url":"https://github.com/jenkinsci/workflow-cps-plugin/pull/226.patch","issue_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/issues/226","number":226,"state":"open","locked":false,"title":"Fix more deadlocks","user":{"login":"svanoort","id":5400948,"avatar_url":"https://avatars3.githubusercontent.com/u/5400948?v=4","gravatar_id":"","url":"https://api.github.com/users/svanoort","html_url":"https://github.com/svanoort","followers_url":"https://api.github.com/users/svanoort/followers","following_url":"https://api.github.com/users/svanoort/following{/other_user}","gists_url":"https://api.github.com/users/svanoort/gists{/gist_id}","starred_url":"https://api.github.com/users/svanoort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanoort/subscriptions","organizations_url":"https://api.github.com/users/svanoort/orgs","repos_url":"https://api.github.com/users/svanoort/repos","events_url":"https://api.github.com/users/svanoort/events{/privacy}","received_events_url":"https://api.github.com/users/svanoort/received_events","type":"User","site_admin":false},"body":"See [deadlock file](https://issues.jenkins-ci.org/secure/attachment/42497/deadlock.txt) from [JENKINS-51132 comment](https://issues.jenkins-ci.org/browse/JENKINS-51132?focusedCommentId=337105&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-337105). \r\n\r\nThis prevents deadlocks by ensuring we do not lock Execution before Run (usually by separating the synchronization scopes). \r\n\r\nLock order should always be Run -> Execution when locks are nested, or locks should be separated (the approach generally used here).\r\n\r\nWhy aren't there testcases?   I have low confidence in our ability produce a testcase that replicates all these deadlocks.","created_at":"2018-05-07T22:17:59Z","updated_at":"2018-05-08T01:04:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8b1d02b4d35d880762db4856471867e41ec0683","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/issues/226/comments","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/statuses/6095ac8751cb2ef7edc96650e296ca5bbe838c0a","head":{"label":"svanoort:fix-more-deadlocks","ref":"fix-more-deadlocks","sha":"6095ac8751cb2ef7edc96650e296ca5bbe838c0a","user":{"login":"svanoort","id":5400948,"avatar_url":"https://avatars3.githubusercontent.com/u/5400948?v=4","gravatar_id":"","url":"https://api.github.com/users/svanoort","html_url":"https://github.com/svanoort","followers_url":"https://api.github.com/users/svanoort/followers","following_url":"https://api.github.com/users/svanoort/following{/other_user}","gists_url":"https://api.github.com/users/svanoort/gists{/gist_id}","starred_url":"https://api.github.com/users/svanoort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanoort/subscriptions","organizations_url":"https://api.github.com/users/svanoort/orgs","repos_url":"https://api.github.com/users/svanoort/repos","events_url":"https://api.github.com/users/svanoort/events{/privacy}","received_events_url":"https://api.github.com/users/svanoort/received_events","type":"User","site_admin":false},"repo":{"id":87087188,"name":"workflow-cps-plugin","full_name":"svanoort/workflow-cps-plugin","owner":{"login":"svanoort","id":5400948,"avatar_url":"https://avatars3.githubusercontent.com/u/5400948?v=4","gravatar_id":"","url":"https://api.github.com/users/svanoort","html_url":"https://github.com/svanoort","followers_url":"https://api.github.com/users/svanoort/followers","following_url":"https://api.github.com/users/svanoort/following{/other_user}","gists_url":"https://api.github.com/users/svanoort/gists{/gist_id}","starred_url":"https://api.github.com/users/svanoort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanoort/subscriptions","organizations_url":"https://api.github.com/users/svanoort/orgs","repos_url":"https://api.github.com/users/svanoort/repos","events_url":"https://api.github.com/users/svanoort/events{/privacy}","received_events_url":"https://api.github.com/users/svanoort/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/svanoort/workflow-cps-plugin","description":null,"fork":true,"url":"https://api.github.com/repos/svanoort/workflow-cps-plugin","forks_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/forks","keys_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/teams","hooks_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/hooks","issue_events_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/events","assignees_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/tags","blobs_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/languages","stargazers_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/stargazers","contributors_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/contributors","subscribers_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/subscribers","subscription_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/subscription","commits_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/merges","archive_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/downloads","issues_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/labels{/name}","releases_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/svanoort/workflow-cps-plugin/deployments","created_at":"2017-04-03T15:03:13Z","updated_at":"2017-04-03T15:03:15Z","pushed_at":"2018-05-07T22:26:54Z","git_url":"git://github.com/svanoort/workflow-cps-plugin.git","ssh_url":"git@github.com:svanoort/workflow-cps-plugin.git","clone_url":"https://github.com/svanoort/workflow-cps-plugin.git","svn_url":"https://github.com/svanoort/workflow-cps-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Groovy+Plugin","size":2505,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"326dcad9389e9643c1ec8e1499743e48dd167c54","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars0.githubusercontent.com/u/107424?v=4","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":55543225,"name":"workflow-cps-plugin","full_name":"jenkinsci/workflow-cps-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars0.githubusercontent.com/u/107424?v=4","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/workflow-cps-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin","forks_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/deployments","created_at":"2016-04-05T20:24:40Z","updated_at":"2018-05-04T21:51:42Z","pushed_at":"2018-05-07T22:26:55Z","git_url":"git://github.com/jenkinsci/workflow-cps-plugin.git","ssh_url":"git@github.com:jenkinsci/workflow-cps-plugin.git","clone_url":"https://github.com/jenkinsci/workflow-cps-plugin.git","svn_url":"https://github.com/jenkinsci/workflow-cps-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Groovy+Plugin","size":2992,"stargazers_count":55,"watchers_count":55,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":78,"open_issues":11,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226"},"html":{"href":"https://github.com/jenkinsci/workflow-cps-plugin/pull/226"},"issue":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/issues/226"},"comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/issues/226/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/pulls/226/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/workflow-cps-plugin/statuses/6095ac8751cb2ef7edc96650e296ca5bbe838c0a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jglick"}}