{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/4467","labels_url":"https://api.github.com/repos/netty/netty/issues/4467/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/4467/comments","events_url":"https://api.github.com/repos/netty/netty/issues/4467/events","html_url":"https://github.com/netty/netty/issues/4467","id":116791352,"number":4467,"title":"NioClientSocketChannelFactory.releaseExternalResources() hangs","user":{"login":"pbostrom","id":1334481,"avatar_url":"https://avatars.githubusercontent.com/u/1334481?v=3","gravatar_id":"","url":"https://api.github.com/users/pbostrom","html_url":"https://github.com/pbostrom","followers_url":"https://api.github.com/users/pbostrom/followers","following_url":"https://api.github.com/users/pbostrom/following{/other_user}","gists_url":"https://api.github.com/users/pbostrom/gists{/gist_id}","starred_url":"https://api.github.com/users/pbostrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbostrom/subscriptions","organizations_url":"https://api.github.com/users/pbostrom/orgs","repos_url":"https://api.github.com/users/pbostrom/repos","events_url":"https://api.github.com/users/pbostrom/events{/privacy}","received_events_url":"https://api.github.com/users/pbostrom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-13T15:33:37Z","updated_at":"2015-11-14T01:55:29Z","closed_at":"2015-11-14T01:55:29Z","body":"I have a long running process that uses AsyncHttpClient with Netty 3.10.4.Final. I've noticed that after the process has been running for a few days I will see a call to NioClientSocketChannelFactory.releaseExternalResources() hang indefinitely. Unfortunately I don't have much more detail as it happens so rarely. Here is the stack trace and system info:\r\n```\r\nsun.misc.Unsafe.park(boolean, long)\r\njava.util.concurrent.locks.LockSupport.park(Object)\r\njava.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()\r\njava.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int)\r\njava.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int)\r\njava.util.concurrent.CountDownLatch.await()\r\norg.jboss.netty.channel.socket.nio.AbstractNioSelector.shutdown()\r\norg.jboss.netty.channel.socket.nio.NioWorker.shutdown()\r\norg.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.shutdown()\r\norg.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()\r\ncom.ning.http.client.providers.netty.channel.ChannelManager.close()\r\ncom.ning.http.client.providers.netty.NettyAsyncHttpProvider.close()\r\ncom.ning.http.client.AsyncHttpClient.close()\r\n\r\n$ java -version\r\njava version \"1.8.0_45\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_45-b14)\r\nJava HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)\r\n$ uname -a\r\nLinux ip-10-139-57-253 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/156607210","html_url":"https://github.com/netty/netty/issues/4467#issuecomment-156607210","issue_url":"https://api.github.com/repos/netty/netty/issues/4467","id":156607210,"user":{"login":"pbostrom","id":1334481,"avatar_url":"https://avatars.githubusercontent.com/u/1334481?v=3","gravatar_id":"","url":"https://api.github.com/users/pbostrom","html_url":"https://github.com/pbostrom","followers_url":"https://api.github.com/users/pbostrom/followers","following_url":"https://api.github.com/users/pbostrom/following{/other_user}","gists_url":"https://api.github.com/users/pbostrom/gists{/gist_id}","starred_url":"https://api.github.com/users/pbostrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbostrom/subscriptions","organizations_url":"https://api.github.com/users/pbostrom/orgs","repos_url":"https://api.github.com/users/pbostrom/repos","events_url":"https://api.github.com/users/pbostrom/events{/privacy}","received_events_url":"https://api.github.com/users/pbostrom/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T01:55:29Z","updated_at":"2015-11-14T01:55:29Z","body":"I found a bug in our response handling code for AsyncHttpClient that causes an onCompleted handler to hang. This prevents the CountDownLatch from ever being released, which then prevents the client from being closed."}}