]
Bela Ban updated JGRP-1530:
---------------------------
Fix Version/s: 3.3
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
Fix For: 3.3
Attachments: hold_by_jgroups.JPG, hold_by_jgroups.JPG, large_byte_array.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=a8f3e6a330c2871287...
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: