[
https://issues.apache.org/jira/browse/SSHD-854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16664660#comment-16664660
]
jpalacios commented on SSHD-854:
--------------------------------
[~johnnyv]
{quote}When you said that all but a few of the IoSession were closed, how did
you make that determination?
{quote}
As I said, when I look at {{NioSocketSession.channel.open}} it's {{false}}.
Plus, in the graph, if I walk back there's a {{MinaSession}} directly
referencing the {{NioSocketSession}} and {{MinaSession.state == Closed}}. That
{{MinaSession}} is in turn directly referenced by a {{ServerSessionImpl}} which
has a {{state == Closed}}.
{quote}One of the things I would look for in the heap dump is the Set/Maps
belonging to the Selector and see how many items are in there. That will tell
us if the SocketChannelImpl objects were actually closed because their
SelectionKeyImpl objects should no longer be in the Set/Maps.
{quote}
Do you mean the {{EpollSelectorImpl }}instances? There's 42840 instances. I
picked up a few at random and I can see a similar state:
* {{cancelledKeys}}: empty
* {{fdToKey}}: a few {{SelectorKeyImpl}} objects indexed by an {{Integer}} (55
entries in the selector with the largest retained size)
* {{keys}}: empty
* {{publicKeys}}: empty
* {{publicSelectedKeys}}: empty
> 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
(v7.6.3#76005)