You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Chris Dolan (JIRA)" <ji...@apache.org> on 2010/01/07 23:42:54 UTC

[jira] Created: (RIVER-327) Fast logging loop due to unexpected multicast socket close in LookupDiscovery$AnnouncementListener

Fast logging loop due to unexpected multicast socket close in LookupDiscovery$AnnouncementListener
--------------------------------------------------------------------------------------------------

                 Key: RIVER-327
                 URL: https://issues.apache.org/jira/browse/RIVER-327
             Project: River
          Issue Type: Bug
          Components: net_jini_discovery
    Affects Versions: jtsk_2.1
         Environment: Win Server 2003, Sun Java 1.5.0_12
            Reporter: Chris Dolan


In extremely rare circumstances (root cause still unknown) we see the following log message thousands of times per second:

INFO: exception while listening for multicast announcements
java.net.SocketException: socket closed
            at java.net.PlainDatagramSocketImpl.peekData(Unknown Source)
            at java.net.DatagramSocket.receive(662)
            at net.jini.discovery.LookupDiscovery$AnnouncementListener.run(1187)

I don't know how or why the multicast listener socket has been closed (perhaps an OS network stack glitch and not Jini's fault) but the consequence is that the system gets an OutOfMemory error trying to process the vast number of log messages.

Proposed solutions (not mutually exclusive):
 * catch SocketException and if socket.isClosed() then rebuild the socket
 * put a Thread.sleep(...) in the catch

Note: this is a slightly modified version of Jini 2.1.  I've compared the code we're running to the River trunk and confirmed that there's no differences in this section of the code.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.