From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199801122356.BAA26052@kaarne.cs.tut.fi> Date: Mon, 12 Jan 1998 19:04:07 -0500 From: Uncle George Subject: Re: accept()/TCP bug 1) ur analysis is good. what started me going was that a fprintf(stderr,... in the signal routine actually caused the thread with the accept/select wait to wake up. Take the fprintf away, and ur back to square one. 2) I get a sigio. i dont know hows thats triggered, but somehow the fd at the service call level is not yet updated - but it should be. The sigio should sugg the the I/O is complete. all that i do after ths sigio interrupt is do a select() to see which fd's did that. An accept wount be done until select says that that channel has info! SIGIO -> interrupt -> select() -> ( FD for the accept(fd,...) isn't ready -> return from service routine. 3) bug is consistent/persistent. happens always to the first browser. should be easy to trace into the kern > If you insert a pause of about 200 ms where I have the /* note */ the > select returns successfully, or at least that's what Randy has said in the > past. Unfortunately, this waiting is a realy performance hit and isn't a > fix as far as I am concerned. > > Linux does do one thing a bit different with regards to accept() and TCP > connections. It will return from an accept() before the three way > handshake is complete. This could be what's causing the problem. ( I > offhandedly asked Alan about it but never got a response about it. ) > Here's what it looks like: > > Program Kernel Outside world > accept() > <--- TCP SYN > return from accept() ----> TCP ACK > select() (fails) > > Is this the desired behavior? Anyone? :) > -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com