{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/83840872","pull_request_review_id":4656743,"id":83840872,"diff_hunk":"@@ -565,6 +568,128 @@ public void testOnPartitionStateUpdate() throws Exception {\n \t\tverify(inputGate, times(1)).retriggerPartitionRequest(eq(partitionId.getPartitionId()));\n \t}\n \n+\t/**\n+\t * Tests that interrupt happens via watch dog if canceller is stuck in cancel.\n+\t * Task cancellation blocks the task canceller. Interrupt after cancel via\n+\t * cancellation watch dog.\n+\t */\n+\t@Test\n+\tpublic void testWatchDogInterruptsTask() throws Exception {\n+\t\tConfiguration config = new Configuration();\n+\t\tconfig.setLong(TaskOptions.CANCELLATION_INTERVAL.key(), 5);\n+\t\tconfig.setLong(TaskOptions.CANCELLATION_TIMEOUT.key(), 50);\n+\n+\t\tTask task = createTask(InvokableBlockingInCancel.class, config);\n+\t\ttask.startTaskThread();\n+\n+\t\tawaitLatch.await();\n+\n+\t\ttask.cancelExecution();\n+\n+\t\ttriggerLatch.await();\n+\n+\t\t// No fatal error\n+\t\tfor (Object msg : taskManagerMessages) {\n+\t\t\tassertEquals(false, msg instanceof TaskManagerMessages.FatalError);\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * The invoke() method holds a lock (trigger awaitLatch after acquisition)\n+\t * and cancel cannot complete because it also tries to acquire the same lock.\n+\t * This is resolved by the watch dog, no fatal error.\n+\t */\n+\t@Test\n+\tpublic void testInterruptableSharedLockInInvokeAndCancel() throws Exception {\n+\t\tConfiguration config = new Configuration();\n+\t\tconfig.setLong(TaskOptions.CANCELLATION_INTERVAL.key(), 5);\n+\t\tconfig.setLong(TaskOptions.CANCELLATION_TIMEOUT.key(), 50);\n+\n+\t\tTask task = createTask(InvokableInterruptableSharedLockInInvokeAndCancel.class, config);\n+\t\ttask.startTaskThread();\n+\n+\t\tawaitLatch.await();\n+\n+\t\ttask.cancelExecution();\n+\n+\t\ttriggerLatch.await();\n+\n+\t\t// No fatal error\n+\t\tfor (Object msg : taskManagerMessages) {\n+\t\t\tassertEquals(false, msg instanceof TaskManagerMessages.FatalError);","path":"flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java","position":50,"original_position":76,"commit_id":"bed640cbb48dfef64562e8da4f7889f3e99a28a2","original_commit_id":"bed640cbb48dfef64562e8da4f7889f3e99a28a2","user":{"login":"uce","id":1756620,"avatar_url":"https://avatars.githubusercontent.com/u/1756620?v=3","gravatar_id":"","url":"https://api.github.com/users/uce","html_url":"https://github.com/uce","followers_url":"https://api.github.com/users/uce/followers","following_url":"https://api.github.com/users/uce/following{/other_user}","gists_url":"https://api.github.com/users/uce/gists{/gist_id}","starred_url":"https://api.github.com/users/uce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uce/subscriptions","organizations_url":"https://api.github.com/users/uce/orgs","repos_url":"https://api.github.com/users/uce/repos","events_url":"https://api.github.com/users/uce/events{/privacy}","received_events_url":"https://api.github.com/users/uce/received_events","type":"User","site_admin":false},"body":"`assertFalse` only fails with printing `AssertionError` and you have to check the stack trace whereas `assertEquals` has a message printing expected and actual inputs.","created_at":"2016-10-18T12:21:44Z","updated_at":"2016-10-18T12:21:44Z","html_url":"https://github.com/apache/flink/pull/2652#discussion_r83840872","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/2652","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/83840872"},"html":{"href":"https://github.com/apache/flink/pull/2652#discussion_r83840872"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/2652"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/2652","id":89661657,"html_url":"https://github.com/apache/flink/pull/2652","diff_url":"https://github.com/apache/flink/pull/2652.diff","patch_url":"https://github.com/apache/flink/pull/2652.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/2652","number":2652,"state":"open","locked":false,"title":"[FLINK-4715] Fail TaskManager with fatal error if task cancellation is stuck","user":{"login":"uce","id":1756620,"avatar_url":"https://avatars.githubusercontent.com/u/1756620?v=3","gravatar_id":"","url":"https://api.github.com/users/uce","html_url":"https://github.com/uce","followers_url":"https://api.github.com/users/uce/followers","following_url":"https://api.github.com/users/uce/following{/other_user}","gists_url":"https://api.github.com/users/uce/gists{/gist_id}","starred_url":"https://api.github.com/users/uce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uce/subscriptions","organizations_url":"https://api.github.com/users/uce/orgs","repos_url":"https://api.github.com/users/uce/repos","events_url":"https://api.github.com/users/uce/events{/privacy}","received_events_url":"https://api.github.com/users/uce/received_events","type":"User","site_admin":false},"body":"- Splits the cancellation up into two threads:\r\n    * The `TaskCanceler` calls `cancel` on the invokable and `interrupt` on the executing Thread. It then exists.\r\n   * The `TaskCancellationWatchDog` kicks in after the task cancellation timeout (current default: 30 secs) and periodically calls `interrupt` on the executing Thread. If the Thread does not terminate within the task cancellation timeout (new config value, default 3 mins), the task manager is notified about a fatal error, leading to termination of the JVM.\r\n- The new configuration is exposed via `ConfigConstants.TASK_CANCELLATION_TIMEOUT_MILLIS`\r\n  (default: 3 mins) and the `ExecutionConfig` (similar to the cancellation interval).","created_at":"2016-10-17T16:53:00Z","updated_at":"2016-10-18T12:21:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f61bacb72d53448be356dd12b68fd5f3a7063d5f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/2652/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/2652/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/2652/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/bed640cbb48dfef64562e8da4f7889f3e99a28a2","head":{"label":"uce:4715-suicide","ref":"4715-suicide","sha":"bed640cbb48dfef64562e8da4f7889f3e99a28a2","user":{"login":"uce","id":1756620,"avatar_url":"https://avatars.githubusercontent.com/u/1756620?v=3","gravatar_id":"","url":"https://api.github.com/users/uce","html_url":"https://github.com/uce","followers_url":"https://api.github.com/users/uce/followers","following_url":"https://api.github.com/users/uce/following{/other_user}","gists_url":"https://api.github.com/users/uce/gists{/gist_id}","starred_url":"https://api.github.com/users/uce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uce/subscriptions","organizations_url":"https://api.github.com/users/uce/orgs","repos_url":"https://api.github.com/users/uce/repos","events_url":"https://api.github.com/users/uce/events{/privacy}","received_events_url":"https://api.github.com/users/uce/received_events","type":"User","site_admin":false},"repo":{"id":20699435,"name":"flink","full_name":"uce/flink","owner":{"login":"uce","id":1756620,"avatar_url":"https://avatars.githubusercontent.com/u/1756620?v=3","gravatar_id":"","url":"https://api.github.com/users/uce","html_url":"https://github.com/uce","followers_url":"https://api.github.com/users/uce/followers","following_url":"https://api.github.com/users/uce/following{/other_user}","gists_url":"https://api.github.com/users/uce/gists{/gist_id}","starred_url":"https://api.github.com/users/uce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uce/subscriptions","organizations_url":"https://api.github.com/users/uce/orgs","repos_url":"https://api.github.com/users/uce/repos","events_url":"https://api.github.com/users/uce/events{/privacy}","received_events_url":"https://api.github.com/users/uce/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uce/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/uce/flink","forks_url":"https://api.github.com/repos/uce/flink/forks","keys_url":"https://api.github.com/repos/uce/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uce/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uce/flink/teams","hooks_url":"https://api.github.com/repos/uce/flink/hooks","issue_events_url":"https://api.github.com/repos/uce/flink/issues/events{/number}","events_url":"https://api.github.com/repos/uce/flink/events","assignees_url":"https://api.github.com/repos/uce/flink/assignees{/user}","branches_url":"https://api.github.com/repos/uce/flink/branches{/branch}","tags_url":"https://api.github.com/repos/uce/flink/tags","blobs_url":"https://api.github.com/repos/uce/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uce/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uce/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/uce/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uce/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/uce/flink/languages","stargazers_url":"https://api.github.com/repos/uce/flink/stargazers","contributors_url":"https://api.github.com/repos/uce/flink/contributors","subscribers_url":"https://api.github.com/repos/uce/flink/subscribers","subscription_url":"https://api.github.com/repos/uce/flink/subscription","commits_url":"https://api.github.com/repos/uce/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/uce/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/uce/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/uce/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/uce/flink/contents/{+path}","compare_url":"https://api.github.com/repos/uce/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uce/flink/merges","archive_url":"https://api.github.com/repos/uce/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uce/flink/downloads","issues_url":"https://api.github.com/repos/uce/flink/issues{/number}","pulls_url":"https://api.github.com/repos/uce/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/uce/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/uce/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uce/flink/labels{/name}","releases_url":"https://api.github.com/repos/uce/flink/releases{/id}","deployments_url":"https://api.github.com/repos/uce/flink/deployments","created_at":"2014-06-10T19:56:02Z","updated_at":"2016-05-31T08:52:12Z","pushed_at":"2016-10-18T11:57:42Z","git_url":"git://github.com/uce/flink.git","ssh_url":"git@github.com:uce/flink.git","clone_url":"https://github.com/uce/flink.git","svn_url":"https://github.com/uce/flink","homepage":null,"size":96457,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"f46ca39188dce1764ee6615eb6697588fdc04a2a","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20587599,"name":"flink","full_name":"apache/flink","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2016-10-18T09:30:45Z","pushed_at":"2016-10-18T11:57:44Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":133748,"stargazers_count":1655,"watchers_count":1655,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1132,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":149,"forks":1132,"open_issues":149,"watchers":1655,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/2652"},"html":{"href":"https://github.com/apache/flink/pull/2652"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/2652"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/2652/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/2652/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/2652/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/bed640cbb48dfef64562e8da4f7889f3e99a28a2"}}}}
{"actor":{"display_login":"uce"}}