[
https://issues.apache.org/jira/browse/DIRMINA-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715419#action_12715419
]
Emmanuel Lecharny commented on DIRMINA-716:
-------------------------------------------
The key is that this finalizer is used to remove the chain's element from the
chain, when the session is closed. However, the session closure generates an
event which is propagated though the chain.
We have to clear the chain when the sessionClosed event has been processed, and
not in the finlize() method.
Alos this is something I question : why should we copy the chain for every new
session, as if the chain could change ? I mean, if we can change the chain
dynamically (which is good) for a specific session, I guess that the best would
be to copy the chain when this modification occurs, not when the session is
created, no ?
> Get rid of "finalize" method in AbstractIoFilterChain.java
> ----------------------------------------------------------
>
> Key: DIRMINA-716
> URL: https://issues.apache.org/jira/browse/DIRMINA-716
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0-M5
> Reporter: Yongxing Wang
> Assignee: Emmanuel Lecharny
>
> The finalize method in AbstractIoFilterChain.java can possibly cause OOM
> error when the system is under very heavy load. The negative impact of
> "finalize" method can be found at:
> http://www.fasterj.com/articles/finalizer1.shtml
> AbstractIoFilterChain holds a reference to Session object which can hold a
> list of unwritten data. The deterministic run of Finalizer can very well
> cause memory not fred up on time under heavy load. And it can certainly cause
> very bad memory usage pattern and contribute to the overall heavy system load.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.