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

Otavio Rodolfo Piske commented on CAMEL-19759:
----------------------------------------------

Hi, just sharing some updates from my initial investigation (this is a WIP, so 
read the comments with a grain of salt). 

??With this, my understanding is that if the pool has at least one instance of 
SinglePool, then the singlePoolEvicted will be cleared twice.??

Yes, it is being called twice. Though, in this case, once it hits the stop, it 
is NO-OP because the service should have been stopped already (nonetheless, 
that's still wrong in my book). 

 !called-twice-2.png!  !called-twice-1.png! 


??I said "It looks like lines 192 and 193 are not needed" and I'm not correct, 
however, looks like to me it has some cases that the singlePoolEvicted can be 
cleaned many times. ??

It could be the case, actually. 


??Is there a possibility of the cleanUp being called concurrently???

There is! this problem, actually, happens under high load / high concurrency. 
So, it could be the case. 


??Im not saying it is the problem, but if it is calling 
singlePoolEvicted.remove() concurrently, it has a chance of impacting the 
singlePoolEvicted.clear(). Make sense???

Yeah, indeed, it makes sense and I think it's worth investigating. 

> performance: Camel is hanging up during shutdown
> ------------------------------------------------
>
>                 Key: CAMEL-19759
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19759
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 3.20.6
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>         Attachments: called-twice-1.png, called-twice-2.png, dump3.hprof, 
> jstack-3.20.4.txt, jstack.txt
>
>
> Under high load, Camel is taking a very long time to shutdown. The 
> investigation points to something happening while the ServicePool is stopping.
> Note: this problem is still under investigation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to