X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <48165B28.4030804@cwilson.fastmail.fm>
Date: Mon, 28 Apr 2008 19:18:00 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: inetutils 1.5 / ftpd problem: 426 Data connection: No buffer   space available.
References: <3ee066b40804272035p45746b2bwc5bebd0252d92426@mail.gmail.com> <4815777F.3060005@cwilson.fastmail.fm> <20080428084603.GX23852@calimero.vinschen.de>
In-Reply-To: <20080428084603.GX23852@calimero.vinschen.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Corinna Vinschen wrote:
> 
> This code only exists in 1.7.  The only way to get ENOBUFS in 1.5.x is
> when Winsock emits it.  I see two possible reasons.  One is a
> third-party firewall software which interacts badly with ftpd on the
> machine with the ENOBUFS problem, the other is ftpd itself.  Does ftpd
> from 1.5 try to write the 215 Megs in one single write call, by any
> chance?

Why, yes, yes it does. But only if #HAVE_MMAP; otherwise it's a little 
more sane and uses BUFSIZ from stdio.h; 1024.

>  We had this discussion lately and I added a stop-gap measure
> into 1.7 so that no write to the net writes more than 64K in one go.
> The problem is that Winsock unintelligibly tries to create a temporary
> internal buffer the size of the write buffer, regardless of its size.
> Naturally that can fail, and if it does, you get the error code
> WSAENOBUFS.  The only way around that for 1.5 is to split network writes
> to smaller chunks.  Doing that is much faster on Windows, too, btw.

Yeah, I'll code that up for 1.5-4.  Should I stick with BUFSIZ == 1024, 
or when MMAP use something a little bigger, say 32k?

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

