mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-854) Massive object graph in NioSocketSession
Date Tue, 30 Oct 2018 05:05:00 GMT

    [ https://issues.apache.org/jira/browse/SSHD-854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16668136#comment-16668136

Goldstein Lyor commented on SSHD-854:

Hi Juan,
I don't really have a theory as to how this can happen in version 1.7.0. Perhaps there is
some code flow that causes one (or more) of the session listener methods not to be called,
thus causing the huge buildup. As far as 2.x changes that specifically resolve it, again,
I apologize but I cannot recall anything specific to this issue off-hand. I do know there
have been several changes in the way we handle connection closing - the code plugged some
"gaps" that were found. These gaps were not directly related to the issue at hand, but they
may have indirectly also solved this issue. In any case, even if you don't want or cannot
upgrade to 2.x (and there are no guarantees that it would fix this issue), the fix I introduced
in the ongoing code as a result for this issue can easily be duplicated and used in 1.7.0
(though we cannot release such a patch, it should be relatively easy to introduce it as a
local workaround by you).

> Massive object graph in NioSocketSession
> ----------------------------------------
>                 Key: SSHD-854
>                 URL: https://issues.apache.org/jira/browse/SSHD-854
>             Project: MINA SSHD
>          Issue Type: Bug
>            Reporter: jpalacios
>            Priority: Major
> I'm looking at a heap dump from one of our customers where the retained heap size for
some {{NioSocketSession}} instances is almost 1GB.
> From the looks of the dump MINA has created a massive object graph where:
> {code}
> NioSocketSession -> SelectionKeyImpl -> EpollSelectorImpl -> HashMap -> SelectionKeyImpl
-> NioSocketSession -> ...
> {code}
> From the looks of the obeject IDs these are not loops
> Each individual object is not large by itself but at the top of the graph the accumulated
retained size is enough to produce an OOME
> Could you help me understand how MINA can produce such a massive object graph? Should
MINA apply any defense mechanism to prevent this??

This message was sent by Atlassian JIRA

View raw message