{"action":"created","issue":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/issues/99","labels_url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/issues/99/comments","events_url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/issues/99/events","html_url":"https://github.com/elasticsearch/elasticsearch-river-twitter/issues/99","id":57197508,"number":99,"title":"[Test] ThreadLeak detection while running tests","user":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/labels/2.4.2","name":"2.4.2","color":"0052cc"},{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/labels/test","name":"test","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/milestones/13","labels_url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/milestones/13/labels","id":951289,"number":13,"title":"2.4.2","description":"Maintenance release","creator":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":10,"state":"closed","created_at":"2015-01-26T13:08:06Z","updated_at":"2015-02-19T11:29:06Z","due_on":null,"closed_at":"2015-02-11T22:19:06Z"},"comments":1,"created_at":"2015-02-10T16:23:32Z","updated_at":"2015-02-19T11:29:05Z","closed_at":null,"body":"When we run tests, the test framework detects Thread leaks:\r\n\r\n```\r\nThrowable #2: com.carrotsearch.randomizedtesting.ThreadLeakError: There are still zombie threads that couldn't be terminated:\r\n   >    1) Thread[id=317, name=Twitter4J Async Dispatcher[0], state=WAITING, group=TGRP-TwitterIntegrationTest]\r\n   >         at sun.misc.Unsafe.park(Native Method)\r\n   >         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)\r\n   >         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)\r\n   >         at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)\r\n   >         at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)\r\n   >         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\r\n   >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n   >         at java.lang.Thread.run(Thread.java:745)\r\n   >    at __randomizedtesting.SeedInfo.seed([7EBEF43EC89FBD41]:0)\r\n```\r\n\r\nIt sounds like it's caused by Twitter4J which run one Thread `Twitter4J Async Dispatcher` and can not stop it quickly enough.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/issues/comments/75037170","html_url":"https://github.com/elasticsearch/elasticsearch-river-twitter/issues/99#issuecomment-75037170","issue_url":"https://api.github.com/repos/elasticsearch/elasticsearch-river-twitter/issues/99","id":75037170,"user":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T11:29:05Z","updated_at":"2015-02-19T11:29:05Z","body":"It sounds like we still have thread leaks:\r\n\r\n```\r\n2> Feb 19, 2015 11:26:33 AM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks\r\n  2> WARNING: Will linger awaiting termination of 1 leaked thread(s).\r\n  2> Feb 19, 2015 11:26:38 AM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks\r\n  2> SEVERE: 1 thread leaked from SUITE scope at org.elasticsearch.river.twitter.test.TwitterIntegrationTest: \r\n  2>    1) Thread[id=206, name=Twitter4J Async Dispatcher[0], state=WAITING, group=TGRP-TwitterIntegrationTest]\r\n  2>         at sun.misc.Unsafe.park(Native Method)\r\n  2>         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)\r\n  2>         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)\r\n  2>         at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)\r\n  2>         at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)\r\n  2>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\r\n  2>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n  2>         at java.lang.Thread.run(Thread.java:745)\r\n  2> Feb 19, 2015 11:26:38 AM com.carrotsearch.randomizedtesting.ThreadLeakControl tryToInterruptAll\r\n  2> INFO: Starting to interrupt leaked threads:\r\n  2>    1) Thread[id=206, name=Twitter4J Async Dispatcher[0], state=WAITING, group=TGRP-TwitterIntegrationTest]\r\n  2> Feb 19, 2015 11:26:41 AM com.carrotsearch.randomizedtesting.ThreadLeakControl tryToInterruptAll\r\n  2> SEVERE: There are still zombie threads that couldn't be terminated:\r\n  2>    1) Thread[id=206, name=Twitter4J Async Dispatcher[0], state=WAITING, group=TGRP-TwitterIntegrationTest]\r\n  2>         at sun.misc.Unsafe.park(Native Method)\r\n  2>         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)\r\n  2>         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)\r\n  2>         at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)\r\n  2>         at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)\r\n  2>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\r\n  2>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n  2>         at java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\nIt might requires more time for Twitter4J to close?"}}