Intra-host socket write fails after 1024s if write size <= 970 (in 2.2, not 2.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Maybe this is a more appropriate list - I tried linux-kernel first]

A simple server [ignore SIGPIPE,socket(PF_INET,SOCK_STREAM,0),
setsockopt/REUSEADDR,bind,listen,accept] ignores connecting clients
after accepting them. It just loops over accept.

A simple client [ignore SIGPIPE,socket,connect,write] connects to the
simple server and tries to write blocks of size x forever. A write
call blocks eventually.

In 2.4, the write remains blocking, but in 2.2 (2.2.19, 2.2.20pre11)
the outcome depends on the size x and whether a network is involved.

If (x <= 970 && within a host && using 2.2), the final blocking
write returns after exactly 1024 seconds with errno set to EPIPE
(or sometimes ETIMEDOUT). After this, netstat says that the client
is in 'CLOSE' and that the server is in 'ESTABLISHED'.
Using 2.4, larger block sizes or over a network, the client as we
expect blocks until we get tired of waiting and stop the test (~1h)

The test hosts are RH7.1 or 7.2-based and use the standard
2.2.19-7.0.8 from RH7.0. We have also tried with a basic 2.2.20pre11.
We don't believe that we have modified any tcp parameters etc.

Is there a reason that the write call returns?
The code is available on request (188 lines).

Cheers,
Anders Furuhed, Pantor Engineering

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux