You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/05/26 13:47:17 UTC

DO NOT REPLY [Bug 49343] New: AbstractReplicatedMap is not removed from channel.

https://issues.apache.org/bugzilla/show_bug.cgi?id=49343

           Summary: AbstractReplicatedMap is not removed from channel.
           Product: Tomcat 7
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Cluster
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kfujino@apache.org


AbstractReplicatedMap#init() is as follows.
=====
protected void init(....) {

    ...skip...
    this.rpcChannel = new RpcChannel(this.mapContextName, channel, this);
    //add this map as a message listener
    this.channel.addChannelListener(this);
    //listen for membership notifications
    this.channel.addMembershipListener(this);

    try {
        //broadcast our map, this just notifies other members of our existence
        broadcast(MapMessage.MSG_INIT, true);
        //transfer state from another map
        transferState();
        //state is transferred, we are ready for messaging
        broadcast(MapMessage.MSG_START, true);
    } catch (ChannelException x) {
        log.warn("Unable to send map start message.");
        throw new RuntimeException("Unable to start replicated map.",x);
    }
}
=====

When ChannelException is thrown after this(AbstractReplicatedMap) is added to
channel, 
RuntimeException is thrown.
And AbstractReplicatedMap#init() is called from the constructor of 
AbstractReplicatedMap(LazyReplicatedMap or ReplicatedMap). 

In a word, no one can remove this(AbstractReplicatedMap) added to channel.

As a result, trivial memory leak and IllegalArgumentException("Listener already
exists:...) are caused. 


Best regards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49343] AbstractReplicatedMap is not removed from channel.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49343

Keiichi Fujino <kf...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Keiichi Fujino <kf...@apache.org> 2010-07-22 22:36:18 EDT ---
This fix applied to 6.0, will be in 6.0.30 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49343] AbstractReplicatedMap is not removed from channel.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49343

Keiichi Fujino <kf...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Cluster                     |Cluster
            Version|trunk                       |6.0.26
            Product|Tomcat 7                    |Tomcat 6
   Target Milestone|---                         |default

--- Comment #2 from Keiichi Fujino <kf...@apache.org> 2010-05-26 08:08:53 EDT ---
Fixed in trunk and proposed for 6.0.x.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49343] AbstractReplicatedMap is not removed from channel.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49343

--- Comment #1 from Keiichi Fujino <kf...@apache.org> 2010-05-26 07:50:26 EDT ---
Created an attachment (id=25485)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25485)
AbstractReplicatedMap's patch

I made a patch.
This patch contains the same fix about RpcChannel.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org