Re: write() returning EAGAIN

Cameron Simpson (cs@zip.com.au)
20 Nov 1998 00:04:56 -0000


On 19 Nov 1998, in message <13907.47974.162375.492776@localhost.efn.org>
Steve VanDevender <stevev@efn.org> wrote:
| I'm seeing a behavior in netscape I've never seen before now that
| I'm running 2.1.129pre6. Interestingly enough trying to read
| slashdot.org tends to get netscape stuck in a loop where it does:
| write(17, "GET /images/topics/topicslashdot"..., 346) = -1 EAGAIN (Try again)
| over and over again.
|
| I see that write() is documented to return EAGAIN under some
| circumstances, but I've never seen an application get stuck like
| this. Could something in 2.1.129pre6 be responsible?

Maybe, but it happens on Solaris, too.
My feeling it that Netscape's event loop is crocked.
Every so often (especially if I tell it "open 40 pages right now" :-) it
spins out much as you describe, with the writes interspersed with SIGALRMs.
I think it's a symptom of a write to an O_NDELAY or O_NONBLOCK file
descriptor when it gets interrupted. In short, Netscape's unix event loop is
SIGALRM driven (ugh!) and it goes pathological fairly readily.

--
Cameron Simpson, DoD#743        cs@zip.com.au        http://www.zip.com.au/~cs/

If you put three drops of poison into a 100 percent pure Java, you get ... Windows. If you put a few drops of Java into Windows, you still have Windows. - Sun Microsystems CEO, Scott McNealy

- 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.tux.org/lkml/