delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/28/19:18:34

X-Recipient: archive-cygwin AT delorie DOT 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 AT cwilson DOT fastmail DOT 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 AT cygwin DOT com
Subject: Re: inetutils 1.5 / ftpd problem: 426 Data connection: No buffer space available.
References: <3ee066b40804272035p45746b2bwc5bebd0252d92426 AT mail DOT gmail DOT com> <4815777F DOT 3060005 AT cwilson DOT fastmail DOT fm> <20080428084603 DOT GX23852 AT calimero DOT vinschen DOT de>
In-Reply-To: <20080428084603.GX23852@calimero.vinschen.de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019