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 2005/07/28 18:47:24 UTC

DO NOT REPLY [Bug 35920] New: - AOBE when IPAddress of nodes differ in length

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35920>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35920

           Summary: AOBE when IPAddress of nodes differ in length
           Product: Tomcat 5
           Version: 5.5.10
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Catalina:Cluster
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: devel@muhlesteins.com


McastServiceImpl.java re-uses the same DatagramPacket.  The byte buffer for this
packet gets set to the size of the first packet received and then not reset.

I have two machines in a cluster.  One with IP Address 192.168.1.5, the other
with 192.168.1.27.  The DatagramPacket for one machine is size 49, the other 50
because of the one character difference in the name length in the packet.

The problem is that when the 2nd packet is received, the DatagramPacket still
has size 49.  The following exception gets thrown each time a packet from that
machine is received:

java.lang.ArrayIndexOutOfBoundsException
        at
java.lang.System.arraycopy(Ljava.lang.Object;ILjava.lang.Object;II)V(Unknown Source)
        at
org.apache.catalina.cluster.mcast.McastMember.getMember(McastMember.java:180)
        at
org.apache.catalina.cluster.mcast.McastServiceImpl.receive(McastServiceImpl.java:209)
        at
org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:253)

The byte buffer for the DatagramPacket needs to check the length and possibly
resize if needed.

This probably doesn't affect many people.

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

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