-
Bug
-
Resolution: Done
-
Major
-
2.10
-
None
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.
- relates to
-
JGRP-1116 TCPPING used with port_range can cause random OutOfMemoryError
- Resolved