{"action":"created","issue":{"url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1029","labels_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1029/labels{/name}","comments_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1029/comments","events_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1029/events","html_url":"https://github.com/AsyncHttpClient/async-http-client/issues/1029","id":115016394,"number":1029,"title":"FeedableBodyGenerator - LEAK: ByteBuf.release() was not called before it's garbage-collected.","user":{"login":"mielientiev","id":5612025,"avatar_url":"https://avatars.githubusercontent.com/u/5612025?v=3","gravatar_id":"","url":"https://api.github.com/users/mielientiev","html_url":"https://github.com/mielientiev","followers_url":"https://api.github.com/users/mielientiev/followers","following_url":"https://api.github.com/users/mielientiev/following{/other_user}","gists_url":"https://api.github.com/users/mielientiev/gists{/gist_id}","starred_url":"https://api.github.com/users/mielientiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mielientiev/subscriptions","organizations_url":"https://api.github.com/users/mielientiev/orgs","repos_url":"https://api.github.com/users/mielientiev/repos","events_url":"https://api.github.com/users/mielientiev/events{/privacy}","received_events_url":"https://api.github.com/users/mielientiev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-04T10:01:00Z","updated_at":"2015-11-10T23:03:05Z","closed_at":null,"body":"When I use custom FeedableBodyGenerator or SimpleFeedableBodyGenerator I see the next error message:\r\n\r\n[error] i.n.u.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak reporting to find out where the leak occurred. To enable advanced leak reporting, specify the JVM option '-Dio.netty.leakDetection.level=advanced' or call ResourceLeakDetector.setLevel() See http://netty.io/wiki/reference-counted-objects.html for more information.\r\n\r\nI guess the main problem is here:\r\nhttps://github.com/netty/netty/blob/4.0/transport/src/main/java/io/netty/channel/AbstractChannelHandlerContext.java#L990-L992\r\nthey just assign null to message, but should also call 'release' (ReferenceCountUtil.release(msg);)\r\nAm I right?"},"comment":{"url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/comments/155595734","html_url":"https://github.com/AsyncHttpClient/async-http-client/issues/1029#issuecomment-155595734","issue_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1029","id":155595734,"user":{"login":"mielientiev","id":5612025,"avatar_url":"https://avatars.githubusercontent.com/u/5612025?v=3","gravatar_id":"","url":"https://api.github.com/users/mielientiev","html_url":"https://github.com/mielientiev","followers_url":"https://api.github.com/users/mielientiev/followers","following_url":"https://api.github.com/users/mielientiev/following{/other_user}","gists_url":"https://api.github.com/users/mielientiev/gists{/gist_id}","starred_url":"https://api.github.com/users/mielientiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mielientiev/subscriptions","organizations_url":"https://api.github.com/users/mielientiev/orgs","repos_url":"https://api.github.com/users/mielientiev/repos","events_url":"https://api.github.com/users/mielientiev/events{/privacy}","received_events_url":"https://api.github.com/users/mielientiev/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T23:03:05Z","updated_at":"2015-11-10T23:03:05Z","body":"Here is a simple Play endpoint: https://gist.github.com/mielientiev/38fec15428e8cd0b6713\r\nI use blocking queue (BlockingSimpleFeedableBodyGenerator) to prevent fast upload"}}