[ 
https://issues.apache.org/jira/browse/HTTPCORE-409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hiranya Jayathilaka updated HTTPCORE-409:
-----------------------------------------
    Attachment: HTTPCORE-409.patch

Patch for the issue.

Mailing list discussion: http://marc.info/?t=144313137000001&r=1&w=2

> NIO HttpServer Does Not Shutdown Listener ExecutorService
> ---------------------------------------------------------
>
>                 Key: HTTPCORE-409
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-409
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.4.3
>            Reporter: Hiranya Jayathilaka
>         Attachments: HTTPCORE-409.patch
>
>
> org.apache.http.impl.nio.bootstrap.HttpServer does not shutdown its 
> listenerExecutorService. This causes the following thread to stay alive even 
> after calling shutdown on HttpServer:
> "HTTP-listener-8080-1" #11 prio=5 os_prio=31 tid=0x00007fc934887000 
> nid=0x6c03 waiting on condition [0x0000000120c8d000]
>    java.lang.Thread.State: WAITING (parking)
>       at sun.misc.Unsafe.park(Native Method)
>       - parking to wait for  <0x000000076c0697e0> (a 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>       at 
> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>       at 
> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> As a result the applications that use this HttpServer do not exit gracefully.
> Note: The blocking HttpServer does shutdown this ExecutorService, and hence 
> the problem only occurs in the NIO HttpServer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to