lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 21 Aug 2008 16:31:14 -0400
From:	Chris Snook <csnook@...hat.com>
To:	Hua Zhong <hzhong@...il.com>
CC:	netdev@...r.kernel.org
Subject: Re: tcp write returns 0?

Hua Zhong wrote:
> Under what condition would tcp write return 0?
> 
> Especially since a previous poll() indicates the socket is writable. Could
> this only happen for socket in NONBLOCK mode?

The socket could become unwritable for various reasons between poll() 
returning and the send() call.  This shouldn't happen very often, but if 
the system is under memory pressure and needs to page in data between 
those two calls, that race window can get rather large.  You might want 
to increase your TCP buffer sizes, either per-socket with setsockopt, or 
system-wide with sysctl.

-- Chris
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists