Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Uncle George <gatgul@voicenet.com>
Subject: Re: accept()/TCP bug
Date: Mon, 12 Jan 1998 19:04:07 -0500	[thread overview]
Message-ID: <a9ff0a0b486d04fffb439dd7d93a898b.axp-list@archive.invalid> (raw)

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

             reply	other threads:[~1998-01-13  0:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-13  0:04 Uncle George [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-01-14 16:00 accept()/TCP bug Uncle George
1998-01-14 11:58 Uncle George
1998-01-13 13:20 Uncle George
1998-01-12 18:09 Uncle George
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox