[jboss-jira] [JBoss JIRA] Commented: (JGRP-1119) TCP can cause memory usage when connecting to a non-JGroups service

Bela Ban (JIRA) jira-events at lists.jboss.org
Wed Apr 28 09:01:13 EDT 2010


    [ https://jira.jboss.org/jira/browse/JGRP-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12527911#action_12527911 ] 

Bela Ban commented on JGRP-1119:
--------------------------------

One could argue that this is a configuration error: list only the instances which have JGroups running, e.g. TCPPING.initial_hosts="A[7800],B[7800],C[7800]", port_range="1"

If there aren't any JGroups instances running on port 7800 at A, B or C, then that's a setup error.

Not sure I want to fix this, possible fixes include:

#1:
- Make the socket use SO_TIMEOUT to read the length and version 
- If the length is > available memory: drop the message
- If the version != our version: drop the message
- Switch SO_TIMEOUT to 0 (block forever) and read the rest of the message


#2:
- Make the reading socket use SO_TIMEOUT in general, so the read doesn't hang, but returns after N seconds max


Hmm, I don't really like either solution, but what we *could* do is a quick&dirty sanity check on length

> TCP can cause memory usage when connecting to a non-JGroups service
> -------------------------------------------------------------------
>
>                 Key: JGRP-1119
>                 URL: https://jira.jboss.org/jira/browse/JGRP-1119
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 2.4.7
>            Reporter: Dennis Reed
>            Assignee: Bela Ban
>             Fix For: 2.10
>
>
> JGroups does not verify that it is connecting to a JGroups service before using the data returned.
> If it connects to another service (for example if another service is found in TCPPING's scan), it reads the first four bytes, uses it as the size of a buffer, and blocks until it fills the buffer with data (or the server kills the connection).
> The symptoms are the same as JGRP-1116.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list