[Serdev] TCP problems

Katty Xiong cyyxiong at yahoo.com
Fri Jan 12 18:04:43 UTC 2007


> 
> The problem is that when an applications blocks
> because it waits till 
> the sending socket accepts new data often the
> application also stops 
> reading from the input sockets (as the sending part
> waits).
> 
> I think the problem is following (please correct if
> I'm wrong)
> example: sipp sends INVITE to ser with TCP. ser
> replies 404.
> 
> under heavy load ser can't read fast enoght from the
> socket and the 
> ser's OS sets the windows size to 0. Thus, sipp's OS
> does not send 
> anymore. sipp still writes into the socket until the
> buffer is full and 
> sipp blocks - thus, sipp does not read anymore from
> the TCP socket.

This is exactly what I observed. But not sure why SIPp
blocks. SIPp uses non-blocking send, as my
understanding, even if the buffer is full,
non-blocking send() should not block and returns with
EWOULDBLOCK error.

> 
> As sipp does not read anymore, sipp's OS sets the
> windows size to 0 as 
> the input buffer is full. ser still tries to send
> the 404 responses, 
> which gives an error after some timeout. Then ser
> thinks the TCP 
> connection is broken and establishes new TCP
> connection.
> 
> Then somethings inside ser starts to block (not sure
> - either the new 
> TCP connection setup or the sending on the new TCP
> stream - I do not 
> know). Then ser blocks. As ser blocks, it does not
> read anymore from the 
> input buffer, the windows is still 0 and sipp can't
> send. Thus sipp does 

SER does not block, as my understanding (based on
Ottendorf). The new connection initeated by SER sends
response to SIPp. However, SIPp is not inteliggent
enough to use the new connection to send packets.

Thanks,
Joy

> not read, thus ser can't send and is still blocking.
> 
> If you stop sipp, it takes some time until ser
> starts working again.
> I'm not sure if this problem is still in ottendorf,
> at least I have seen 
> this problem in ser stable and openser and it is
> easy to reproduce. 
> (INVITE-404 over TCP).
> 
> regards
> klaus
> 
> > 
> > Maybe I'm overlooking here something
> >   Nils
> 
> 
> -- 
> Klaus Darilion
> nic.at
> 
> 



 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/


More information about the Serdev mailing list