From owner-freebsd-net@FreeBSD.ORG Tue May 6 06:11:30 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75C911065680 for ; Tue, 6 May 2008 06:11:30 +0000 (UTC) (envelope-from dengxf@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.229]) by mx1.freebsd.org (Postfix) with ESMTP id 4FCD88FC14 for ; Tue, 6 May 2008 06:11:30 +0000 (UTC) (envelope-from dengxf@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so378783rvf.43 for ; Mon, 05 May 2008 23:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:in-reply-to:references:message-id:mime-version:content-type:content-transfer-encoding:x-mailer; bh=VG5u+wmXhed8aeeKTuAOimS26D1EeJSiowIKY3PtgbA=; b=RSkf3q9GxZ9s3es3OG+Tnd6PGca6GYykI32Qf1D+6F28ZOYKTkjepLDUH3P82rFiGsvLcZVO0odPZYWShdjEXLP6G/UDNiFrx2c7mjfxOK/68DQfSDo3BSKj/YT+qfXvN4I89Ssai55jNovOHUby6zuTvuqPw4nMkf1XU4B9NY4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:in-reply-to:references:message-id:mime-version:content-type:content-transfer-encoding:x-mailer; b=YFnUaz3YWgwag1mI2jrWoZ/MhRTKNtXgU+QUcvgB89O579WNY5VASoOyT/FiUttZTqC4IXTIsrsVXmJ5YKnfJiQkSGfVAKCGEif8D5bTM5MV7X/T2W6sq6CqA8bHYlZMRTxbgLut3tGiI2FdUfKJaeX8jF7ReUqIeCHhWgtfQbE= Received: by 10.142.105.10 with SMTP id d10mr139766wfc.306.1210052704307; Mon, 05 May 2008 22:45:04 -0700 (PDT) Received: from ?192.168.0.160? ( [218.94.128.114]) by mx.google.com with ESMTPS id 24sm631533wfc.3.2008.05.05.22.44.59 (version=SSLv3 cipher=RC4-MD5); Mon, 05 May 2008 22:45:02 -0700 (PDT) Date: Tue, 06 May 2008 13:45:06 +0800 From: Deng XueFeng To: Mark Hills , freebsd-net@freebsd.org In-Reply-To: References: Message-Id: <20080506133208.C2EC.B627C632@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.45.02 [CN] Cc: Subject: Re: read() returns ETIMEDOUT on steady TCP connection X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 06:11:30 -0000 hi I'am also meet this problem in my mss server(missey streaming server). one encoder push stream to mss, then run 100 client player playing the sream, as the client number increase, mss will occur this error sooner or later like this: I'am using kqueue, and will got a event with EV_EOF and fflags = ETIMEDOUT, if i ignore EV_EOF flag, then ETIMEDOUT will be return by read(2), and the tcpdump also show that server will send RST packet to encoder. > Hello, > > I'm are having a trouble with TCP connections being dropped with "read: > Operation timed out". What is unusual is that this is happening right in > the middle of sending a steady stream of data with no network congestion. > > The system is FreeBSD 7 and a bespoke streaming server with 1Gbit > connection. The server receives a 192kbps inbound stream over TCP, and > broadcasts it over a large number of TCP streams. > > With no visible or obvious pattern, the inbound read() fails with > ETIMEDOUT. The likelihood of this happening seems to increase as the > number of audience connections increases. It's happens every few minutes > even with a small audience (eg. 300 outbound connections and about > 60mbit). > > It doesn't cough and splutter -- steady data is coming in, then it just > drops the connection. > > systat doesn't show problems inbound; all packets received are delivered > to the upper layer. But on outbound, there is consistent 'output drops': > > IP Output > 7028 total packets sent > 7028 - generated locally > 314 - output drops > > As the number of outbound connections increases, the 'output drops' > increases to around 10% of the total packets sent and maintains that > ratio. There's no problems with network capacity. > > I've tried different servers, different network interfaces (bge, em), > different kernel (7-RELEASE, 7-STABLE). Have also checked dev.bge.0.stats > and dev.em.0.stats for CRC errors etc. which show no problems. 'netstat > -m' doesn't show any reaching of mbuf and sbuf limits. The problem is seen > in a dedicated, uncontended test environment. > > Can anyone explain why the packets are being dropped outbound, and how > this could affect inbound TCP data in such an abrupt way? What can I do to > solve this? > > Thanks, > > Mark > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- Deng XueFeng