[jboss-jira] [JBoss JIRA] (JGRP-1530) TCPConnectionMap$TCPConnection$ConnectionPeerReceiver allocate and hold a 1.6G byte[]
Ken Chiu (JIRA)
jira-events at lists.jboss.org
Thu Oct 25 10:50:01 EDT 2012
[ https://issues.jboss.org/browse/JGRP-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ken Chiu updated JGRP-1530:
---------------------------
Description:
In our application, after running a few hours of load test we will encounter OutOfMemoryError.
It is caused by we use TCPPING with port_range and hit a JVM defect:
http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=a8f3e6a330c28712870de27a7236?bug_id=6474129
When we use TCPPING with port_range in some linux environments, the application can occasionally connect to a not listened local port.
This socket will have the same local/destination port.
If this connection is established, bytes written via this socket's OutputStream will be read from this socket's InputStream.
In JGroups, a client socket will send cookie({ 'b', 'e', 'l', 'a' }) as its first data and it will be read from the same socket's InputStream at TCPConnectionMap$TCPConnection$ConnectionPeerReceiver.
This will allocation a 1.6G byte[] and hold it forever because the client socket won't read enough data in its whole life.
I think a simple solution is to check the connected client socket is a self-connected(local/destination ip and port are the same) and retry next port when this happen.
was:
In our application, after running a few hours of load test we will encounter OutOfMemoryError.
It is caused by we use TCPPING with port_range and hit a JVM defect:
http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=a8f3e6a330c28712870de27a7236?bug_id=6474129
When we use TCPPING with port_range in some linux environments, the application can occasionally connect to a not listened local port.
This socket will have the same local/destination port.
If this connection is established, bytes written via this socket's OutputStream will be read from this socket's InputStream.
In jGroups, a client socket will send cookie({ 'b', 'e', 'l', 'a' }) as its first data and it will be read from the same socket's InputStream at TCPConnectionMap$TCPConnection$ConnectionPeerReceiver.
This will allocation a 1.6G byte[] and hold it forever because the client socket won't read enough data in its whole life.
I think a simple solution is to check the connected client socket is a self-connected(local/destination ip and port are the same) and retry next port when this happen.
> TCPConnectionMap$TCPConnection$ConnectionPeerReceiver allocate and hold a 1.6G byte[]
> -------------------------------------------------------------------------------------
>
> Key: JGRP-1530
> URL: https://issues.jboss.org/browse/JGRP-1530
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 2.10
> Environment: Linux (2.6.18-308.13.1.el5)
> Java HotSpot(TM) 64-Bit Server VM (20.10-b01, mixed mode)
> Reporter: Ken Chiu
> Assignee: Bela Ban
> Attachments: hold_by_jgroups.JPG, large_byte_array.JPG
>
>
> In our application, after running a few hours of load test we will encounter OutOfMemoryError.
> It is caused by we use TCPPING with port_range and hit a JVM defect:
> http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=a8f3e6a330c28712870de27a7236?bug_id=6474129
> When we use TCPPING with port_range in some linux environments, the application can occasionally connect to a not listened local port.
> This socket will have the same local/destination port.
> If this connection is established, bytes written via this socket's OutputStream will be read from this socket's InputStream.
> In JGroups, a client socket will send cookie({ 'b', 'e', 'l', 'a' }) as its first data and it will be read from the same socket's InputStream at TCPConnectionMap$TCPConnection$ConnectionPeerReceiver.
> This will allocation a 1.6G byte[] and hold it forever because the client socket won't read enough data in its whole life.
> I think a simple solution is to check the connected client socket is a self-connected(local/destination ip and port are the same) and retry next port when this happen.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list