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

ASF subversion and git services commented on AMQ-8183:
------------------------------------------------------

Commit 2712464b78f76affd34cc0b097a2248f211ea0c7 in activemq's branch 
refs/heads/master from Christopher L. Shannon (cshannon)
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=2712464 ]

AMQ-8183 - apply maxFrameSize high cpu usage fix to Auto nio transport
also


> Setting a maxFrameSize can lead to infinite loop and high cpu usage
> -------------------------------------------------------------------
>
>                 Key: AMQ-8183
>                 URL: https://issues.apache.org/jira/browse/AMQ-8183
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.16.1
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Major
>             Fix For: 5.17.0, 5.16.2
>
>
> There is a regression caused by AMQ-7106 that can lead to an infinite loop 
> and high cpu usage when using the nio+ssl transport if maxFrameSize is 
> configured. The issue shows up when several messages come into the broker 
> that exceed the max frame size. The broker properly detects the error and 
> kills the connection in another thread but the transport thread can get stuck 
> in an infinite loop inside serviceRead() method of NIOSSLTransport.
> It's a bit hard to tell what is going on but the issue appears to be due to 
> the fact that the transport has already been stopped but there's no condition 
> being hit to break the loop. The transport logic appears to get into a weird 
> state trying to process a partial frame in a local buffer in the 
> serviceRead() method but the logic just keeps spinning and never tries to 
> re-read from the socket because the currentBuffer in the transport is wasn't 
> allocated due to the async shutdown.
> The fix here is pretty simple and that is to check if the transport has been 
> stopped and exit the loop. I have only seen this with OpenWire and nio+ssl 
> but the fix I'm adding will work for all nio+ssl and nio transports.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to