lkml.org 
[lkml]   [2001]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PROBLEM] socket buffering problem in 2.2.19

Hi,

There seems to be some kind of a buffering problem in the 2.2.19
kernel. The following sequence of system calls on a nonblocking TCP
socket (on the client side) generates a broken pipe:

write(2) HTTP REQUEST read(2)
2. HTTP client --------------------> HTTP Server

HTTP RESPONSE write(2)
3. HTTP client <--------------------- HTTP Server

shutdown(2), close(2)
4. HTTP client <--------------------- HTTP Server

select(2) returns,
read(2) => broken pipe, HTTP response is lost
5. HTTP client <----X

The client in this situation is a bit sluggish and sometimes does not have
time to read the data before the server has called shutdown and close
(and the client receives a TCP FIN).

The Linux 2.4.3 kernel and Solaris 7 & 8 seem to perform the buffering of
data ok on the client side.

Any ideas or suggestions ( other than upgrade to 2.4 :-) ) ?

Regards, Tomi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.061 / U:2.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site