Reputation: 1712
I have two server process, they communicate with two socket connections. Both connections are sending message oneway only.(one for c->s, one for s->c).
The server and the client bootstrap initialized with OioServerSocketChannelFactory / OioClientSocketChannelFactory respectively.
After some profiling, found object of these three classes never release(on both side). I don't use these classes directly and I only keep reference to two Channel object.
java.util.concurrent.LinkedTransferQueue$Node 1005351 32171232
org.jboss.netty.channel.Channels$2 1005351 24128424
org.jboss.netty.channel.socket.ChannelRunnableWrapper 1005351 48256848
What kind of object leaked in my code might cause these objects not release?
UPDATE: the environment, jdk7u7, centos6 64bit, netty 3.5.3
Upvotes: 0
Views: 1898
Reputation: 23567
This was because of a bug in Netty Oio impl. The bug was fixed as part of 3.5.4.Final. So please upgrade to 3.5.4.Final or 3.5.5.Final.
See [1].
[1] https://github.com/netty/netty/issues/520
Upvotes: 3
Reputation: 1712
It's a good chance this is a bug of netty. After I change OioServerSocketChannelFactory / OioClientSocketChannelFactory to NioServerSocketChannelFactory / NioClientSocketChannelFactory the problem is gone.
Upvotes: 0