Select/non blocking read problems in 2.1

Andi Kleen (ak@muc.de)
Fri, 31 Jul 1998 19:15:25 +0200


Hi,

It seems there is some strange change in non-blocking read/select()
behaviour in 2.1 (seen it since early 2.1.7x I think)

First it causes a bug in netscape: when not using a proxy netscape often
goes into a CPU eating read(socket, ..) = -EAGAIN loop when a server does
not answer and the socket is hanging in SYN_RECV and netscape is trying to
get the "GET /..." out.

One does not see this
when netscape is using a proxy, because the proxy is usually answering
quickly. Unfortunately I was never able to catch the commands before
the loop with strace, but my guess is that select() returns a socket
writeable, when it really not ready yet. I've verified that the tcp_poll()
code does exactly the same thing as tcp_select() in 2.0, so it points to
a bug in the generic poll() or FIONREAD framework.

I see another problem on 2.1 too that is probably related: when xv is
displaying a dialog box it often ends up with a black dialog window that
never goes away, and sometimes with a CPU eating read() loop of:
read(X11socket, .. ) = 32; ioctl( FIONREAD ) = 0; read( ... ) = -EAGAIN.

This never occured with 2.0, so I guess it must be related to some 2.1
change.

Anyone else seen similar things on 2.1 - programs going into endless loops
that were working fine on 2.0 ?

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html