mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhinakaran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRMINA-1084) 100% CPU when using IoBuffer.shrink() method in some cases
Date Thu, 05 Apr 2018 09:08:00 GMT

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

Dhinakaran commented on DIRMINA-1084:
-------------------------------------

Agreed, we are using openfire 4.0.3, even latest openfire 4.1.3 is using this Mina 2.0.7
version only.

> 100% CPU when using IoBuffer.shrink() method in some cases
> ----------------------------------------------------------
>
>                 Key: DIRMINA-1084
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1084
>             Project: MINA
>          Issue Type: Bug
>          Components: SSL
>    Affects Versions: 2.0.7
>         Environment: Any
>            Reporter: Dhinakaran
>            Priority: Major
>
> {code:java}
> "socket_c2s_ssl-thread-6" daemon prio=10 tid=0x82f5a000 nid=0x1355 runnable [0x7d618000]
>    java.lang.Thread.State: RUNNABLE
>     at org.apache.mina.core.buffer.AbstractIoBuffer.shrink(AbstractIoBuffer.java:317)
>     at org.apache.mina.filter.ssl.SslHandler.fetchOutNetBuffer(SslHandler.java:406)
>     at org.apache.mina.filter.ssl.SslHandler.writeNetBuffer(SslHandler.java:642)
>     at org.apache.mina.filter.ssl.SslFilter.initiateClosure(SslFilter.java:665)
>     at org.apache.mina.filter.ssl.SslFilter.filterClose(SslFilter.java:627)
>     - locked <0x9f31fb80> (a org.apache.mina.filter.ssl.SslHandler)
> {code}
> When one tries to shrink a buffer which minimal capacity is set to 0, and set the size
to 0, it enter into an infinite loop.
> Bug https://issues.apache.org/jira/browse/DIRMINA-988 has created in 2.0.8 it was a
similar bug, but the code is slightly different in 2.0.7. But the problem is same. We should
acknowledge this issue is present in 2.0.7.
> This is due to this loop :
> {code:java}
> while (newCapacity >>> 1 >= minCapacity) {
>   newCapacity >>>= 1;
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message