{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/hollow/issues/288","repository_url":"https://api.github.com/repos/Netflix/hollow","labels_url":"https://api.github.com/repos/Netflix/hollow/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/hollow/issues/288/comments","events_url":"https://api.github.com/repos/Netflix/hollow/issues/288/events","html_url":"https://github.com/Netflix/hollow/issues/288","id":367362374,"node_id":"MDU6SXNzdWUzNjczNjIzNzQ=","number":288,"title":"Thread leak from StaleHollowReferenceDetector in tests","user":{"login":"johnrengelman","id":1012772,"node_id":"MDQ6VXNlcjEwMTI3NzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1012772?v=4","gravatar_id":"","url":"https://api.github.com/users/johnrengelman","html_url":"https://github.com/johnrengelman","followers_url":"https://api.github.com/users/johnrengelman/followers","following_url":"https://api.github.com/users/johnrengelman/following{/other_user}","gists_url":"https://api.github.com/users/johnrengelman/gists{/gist_id}","starred_url":"https://api.github.com/users/johnrengelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnrengelman/subscriptions","organizations_url":"https://api.github.com/users/johnrengelman/orgs","repos_url":"https://api.github.com/users/johnrengelman/repos","events_url":"https://api.github.com/users/johnrengelman/events{/privacy}","received_events_url":"https://api.github.com/users/johnrengelman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-05T20:44:15Z","updated_at":"2018-10-06T23:00:36Z","closed_at":null,"author_association":"NONE","body":"The StaleHollowReferenceDetector creates a daemon thread internal that can never be terminated (https://github.com/Netflix/hollow/blob/master/hollow/src/main/java/com/netflix/hollow/api/client/StaleHollowReferenceDetector.java#L128). This causes a thread leak during tests and in a big enough project, you can easily cause thread exhaustion.\r\n\r\nThe method reference to the Thread should be moved to be an instance variable and a the `finalize()` method on `StaleHollowReferenceDetector` should stop the thread."},"comment":{"url":"https://api.github.com/repos/Netflix/hollow/issues/comments/427612241","html_url":"https://github.com/Netflix/hollow/issues/288#issuecomment-427612241","issue_url":"https://api.github.com/repos/Netflix/hollow/issues/288","id":427612241,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzYxMjI0MQ==","user":{"login":"johnrengelman","id":1012772,"node_id":"MDQ6VXNlcjEwMTI3NzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1012772?v=4","gravatar_id":"","url":"https://api.github.com/users/johnrengelman","html_url":"https://github.com/johnrengelman","followers_url":"https://api.github.com/users/johnrengelman/followers","following_url":"https://api.github.com/users/johnrengelman/following{/other_user}","gists_url":"https://api.github.com/users/johnrengelman/gists{/gist_id}","starred_url":"https://api.github.com/users/johnrengelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnrengelman/subscriptions","organizations_url":"https://api.github.com/users/johnrengelman/orgs","repos_url":"https://api.github.com/users/johnrengelman/repos","events_url":"https://api.github.com/users/johnrengelman/events{/privacy}","received_events_url":"https://api.github.com/users/johnrengelman/received_events","type":"User","site_admin":false},"created_at":"2018-10-06T23:00:36Z","updated_at":"2018-10-06T23:00:36Z","author_association":"NONE","body":"There's also a leak from `HollowFilesystemAnnouncementWatcher` since the thread it spins up (https://github.com/Netflix/hollow/blob/master/hollow/src/main/java/com/netflix/hollow/api/consumer/fs/HollowFilesystemAnnouncementWatcher.java#L120) contains an implicit reference back to the parent class (https://github.com/Netflix/hollow/blob/master/hollow/src/main/java/com/netflix/hollow/api/consumer/fs/HollowFilesystemAnnouncementWatcher.java#L128). This prevents the `finalize()` method from every being invoked to shut down the Future or the executor."}}
{"actor":{"display_login":"johnrengelman"}}