[jboss-jira] [JBoss JIRA] (JGRP-2257) UDP#PacketReceiver stuck in busy loop when socket throws closed exception but socket is not closed
Paul Illingworth (JIRA)
issues at jboss.org
Mon May 14 04:07:01 EDT 2018
[ https://issues.jboss.org/browse/JGRP-2257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Illingworth closed JGRP-2257.
----------------------------------
Resolution: Cannot Reproduce
Unable to reproduce and as far as I am aware has not been seen before or since.
> UDP#PacketReceiver stuck in busy loop when socket throws closed exception but socket is not closed
> --------------------------------------------------------------------------------------------------
>
> Key: JGRP-2257
> URL: https://issues.jboss.org/browse/JGRP-2257
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.6.12
> Environment: Windows Server 2016, 32GBytes memory running as a Hyper-V guest
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> It was reported with just a single node running.
> Reporter: Paul Illingworth
> Assignee: Bela Ban
> Fix For: 4.0.12
>
>
> I have a had a report of a scenario where it looks like the UDP#PacketReceiver is stuck spinning in a busy loop. The following is a snippet of the log file from the system in question.
> {noformat}
> 2018-03-16 14:05:43,273 SEVERE [] (214,unicast receiver,shared=udp) JGRP000190: failed receiving packet
> java.net.SocketException: socket closed
> at java.net.TwoStacksPlainDatagramSocketImpl.peekData(Native Method)
> at java.net.DatagramSocket.receive(DatagramSocket.java:743)
> at org.jgroups.protocols.UDP$PacketReceiver.run(UDP.java:694)
> at java.lang.Thread.run(Thread.java:748)
>
> 2018-03-16 14:05:43,273 SEVERE [] (214,unicast receiver,shared=udp) JGRP000190: failed receiving packet
> java.net.SocketException: socket closed
> at java.net.TwoStacksPlainDatagramSocketImpl.peekData(Native Method)
> at java.net.DatagramSocket.receive(DatagramSocket.java:743)
> at org.jgroups.protocols.UDP$PacketReceiver.run(UDP.java:694)
> at java.lang.Thread.run(Thread.java:748)
>
> 2018-03-16 14:05:43,273 SEVERE [] (214,unicast receiver,shared=udp) JGRP000190: failed receiving packet
> java.net.SocketException: socket closed
> at java.net.TwoStacksPlainDatagramSocketImpl.peekData(Native Method)
> at java.net.DatagramSocket.receive(DatagramSocket.java:743)
> at org.jgroups.protocols.UDP$PacketReceiver.run(UDP.java:694)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}
> Looking at the code it looks like the call to receive a packet
> {code:java}
> receiver_socket.receive(packet);
> {code}
> results in an exception being thrown because the socket is closed but then when the exception is caught
> {code:java}
> if(receiver_socket.isClosed()) {
> {code}
> method is queried which says the socket has not been closed and the loop then continues for ever.
> I guess this is related to JGRP-1669. To quote
> _I hope there is no condition which causes the socket receive() to spit out endless exceptions while not being closed..._
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list