Re: UDP recvmsg blocks after select(), 2.6 bug?

Andries Brouwer
2004-10-06T22:17:04Z

On Wed, Oct 06, 2004 at 09:25:28PM +0100, Alan Cox wrote:

> The current setup has so far been found to break one app, after what
> three years. It can almost double performance. In this case it is very
> much POSIX_ME_HARDER, and perhaps longer term suggests the posix/sus
> people should revisit their API design.

Maybe. Have we really investigated and concluded that there is no
reasonable way to follow POSIX and not harm performance?

I would hope that checksum failure is not the fast path,
so at zeroth sight, not having looked at the code, it seems
that we could do rather elaborate things on checksum failure
if we wanted to.

One such thing might be to raise a flag "I/O error seen since last read"
where the flag is cleared by read and causes an EIO when there is no
other input.

(There may be many objections - maybe such a setup would break
more user space programs. Or maybe there are more ways select
is broken than just the "discarded because of bad checksum" way.
But it seems too early to just say "too bad, our select is not
the POSIX one".)

Andries