[ 
https://issues.apache.org/jira/browse/CXF-9271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18141501#comment-18141501
 ] 

Alexander Glazovskiy commented on CXF-9271:
-------------------------------------------

Thank you for quick response. I found that  validatePendingRequests() is 
missing on the hc5 path. HC4's CloseIdleConnectionThread calls 
connMgr.validatePendingRequests() to reclaim connections whose consumer died. 
PoolingAsyncClientConnectionManager does not expose it, so no equivalent safety 
net exists for hc5. Even with the two-line fix above, a 
RejectedExecutionException in HTTPConduit.handleResponseOnWorkqueue can leave a 
response unread and leak the lease. But perhaps this is a question for a 
separate task

> http-hc5: SharedInputBuffer.consumeContent() can park the I/O reactor thread 
> forever — close()/shutdown() never signal suspendInput
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-9271
>                 URL: https://issues.apache.org/jira/browse/CXF-9271
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 4.2.4
>         Environment: Apache CXF 4.2.4 (also reproduces on 4.2.x)
> Module: rt/transports/http-hc5
> httpclient5 / httpcore5 5.4.x
>            Reporter: Alexander Glazovskiy
>            Assignee: Andriy Redko
>            Priority: Critical
>             Fix For: 3.6.14, 4.2.5, 4.1.10
>
>
> SharedInputBuffer.consumeContent() waits on the suspendInput condition when 
> the internal buffer is full, but close() and shutdown() only signal the other 
> condition. If either method is called while a dispatch thread is parked in 
> consumeContent(), that thread is never woken up and the I/O reactor 
> permanently loses one of its threads.
> Under load this compounds into complete connection-pool starvation and 
> OutOfMemoryError.
> It can be reproduced with any SOAP call whose response body is larger than 
> chunkLength, where the subscription is cancelled while the body is still 
> being received.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to