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

From: Eric Dumazet
Date: Wed Aug 24 2016 - 09:02:24 EST


On Wed, 2016-08-24 at 11:22 +0300, Dan Akunis wrote:
> 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.
>

Please do not top post on netdev mailing list.

Program is fine and wont be changed to work around a kernel bug.

We definitely can send and receive UDP messages with 0 payload.

So select() should unblock when one such frame is received, otherwise
you could fill up the receive queue with a lot of frames like that and
when SO_RCVBUF limit is reached, block future messages.

UDP is a datagram protocol.

Bug fix is merged :
https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=e83c6744e81abc93a20d0eb3b7f504a176a6126a