On 05/07/2013 18:20, Brian Call wrote:
Hi Guys,

I'm seeing an ugly issue crop up on JDK7 for MacOS that I'm at a total loss to 
diagnose or even begin to fix. At random times (and sometimes every time) I'm 
seeing this exception:

Caused by: java.net.SocketException: Cannot allocate memory
        at sun.nio.ch.Net.joinOrDrop4(Native Method)
        at sun.nio.ch.Net.join4(Net.java:421)
        at 
sun.nio.ch.DatagramChannelImpl.innerJoin(DatagramChannelImpl.java:848)
        at sun.nio.ch.DatagramChannelImpl.join(DatagramChannelImpl.java:866)
        at 
org.jboss.netty.channel.socket.nio.NioDatagramChannel.joinGroup(NioDatagramChannel.java:158)
        at 
org.jboss.netty.channel.socket.nio.NioDatagramChannel.joinGroup(NioDatagramChannel.java:135)
        at 
com.soterawireless.h1s.groups.NioGroupSubscriber.joinGroup(NioGroupSubscriber.java:203)
        ... 5 more

This same codes works great on both Linux and Windows but fails intermittently 
on Mac OS 10.8.x. Google is letting me down and stackoverflow isn't being very 
helpful either...

Does anyone have any insight on what might be causing this join group call to 
fail in such a manner? I could very easily write a simple test driver to 
demonstrate the problem so please let me know if that would be helpful.

I haven't seen this but I'm curious as to how many multicast groups are involved and whether you are dropping membership when done (not leaking I mean). I ask because there is typically a limit to how much filtering can be done on the NIC and once it goes past that limit then it has to be switched to promiscuous mode. I don't know the Mach / OS X kernel to know what is actually going here but mentioning limits in case there is a resource issue.

-Alan

Reply via email to