Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1469210

Re: [REGRESSION] Select hang with zero sized UDP packets

From "Dan Akunis" <dan.akunis@gmail.com>
Newsgroups linux.kernel
Subject Re: [REGRESSION] Select hang with zero sized UDP packets
Date 2016-08-24 10:40 +0200
Message-ID <s9BT4-89D-35@gated-at.bofh.it> (permalink)
References <s9o9r-7dn-5@gated-at.bofh.it> <s9oCt-7Dc-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


When select wakes up on a UDP socket, user is expecting to get data. Getting 
0 from recvfrom() or whatever read function she uses, is a wrong attitude.
I agree with David.

The unit test that expects select to wake up is wrong and should be changed.

-----Original Message----- 
From: David Miller
Sent: Tuesday, August 23, 2016 9:25 PM
To: labbott@redhat.com
Cc: kuznet@ms2.inr.ac.ru ; jmorris@namei.org ; yoshfuji@linux-ipv6.org ; 
kaber@trash.net ; samanthakumar@google.com ; willemb@google.com ; 
netdev@vger.kernel.org ; linux-kernel@vger.kernel.org
Subject: Re: [REGRESSION] Select hang with zero sized UDP packets

From: Laura Abbott <labbott@redhat.com>
Date: Tue, 23 Aug 2016 10:53:26 -0700

> Fedora received a report[1] of a unit test failing on Ruby when using
> the
> 4.7 kernel. This was a test to send a zero sized UDP packet. With the
> 4.7 kernel, the test now timing out on a select instead of completing.
> The reduced ruby test is
>
>   def test_udp_recvfrom_nonblock
>     u1 = UDPSocket.new
>     u2 = UDPSocket.new
>     u1.bind("127.0.0.1", 0)
>     u2.send("", 0, u1.getsockname)
>     IO.select [u1]  # test gets stuck here
>   ensure
>     u1.close if u1
>     u2.close if u2
>   end

Well, if there is no data, should select really wake up?

I think it's valid not to. 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[REGRESSION] Select hang with zero sized UDP packets Laura Abbott <labbott@redhat.com> - 2016-08-23 20:00 +0200
  Re: [REGRESSION] Select hang with zero sized UDP packets David Miller <davem@davemloft.net> - 2016-08-23 20:30 +0200
    Re: [REGRESSION] Select hang with zero sized UDP packets Eric Dumazet <eric.dumazet@gmail.com> - 2016-08-23 21:10 +0200
      Re: [REGRESSION] Select hang with zero sized UDP packets Laura Abbott <labbott@redhat.com> - 2016-08-23 22:10 +0200
        Re: [REGRESSION] Select hang with zero sized UDP packets Eric Dumazet <eric.dumazet@gmail.com> - 2016-08-23 22:50 +0200
    Re: [REGRESSION] Select hang with zero sized UDP packets "Dan Akunis" <dan.akunis@gmail.com> - 2016-08-24 10:40 +0200
      Re: [REGRESSION] Select hang with zero sized UDP packets Eric Dumazet <eric.dumazet@gmail.com> - 2016-08-24 15:10 +0200
      Re: [REGRESSION] Select hang with zero sized UDP packets One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-08-24 15:50 +0200

csiph-web