From owner-freebsd-stable@FreeBSD.ORG Fri Jul 1 22:22:39 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7BF3106566C for ; Fri, 1 Jul 2011 22:22:39 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by mx1.freebsd.org (Postfix) with ESMTP id 846A58FC1C for ; Fri, 1 Jul 2011 22:22:39 +0000 (UTC) Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by qmta13.westchester.pa.mail.comcast.net with comcast id 2mLg1h0011c6gX85DmNfF2; Fri, 01 Jul 2011 22:22:39 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta23.westchester.pa.mail.comcast.net with comcast id 2mNa1h0121t3BNj3jmNbpo; Fri, 01 Jul 2011 22:22:37 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id C8352102C19; Fri, 1 Jul 2011 15:22:32 -0700 (PDT) Date: Fri, 1 Jul 2011 15:22:32 -0700 From: Jeremy Chadwick To: Scott Sipe Message-ID: <20110701222232.GA33935@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: scp: Write Failed: Cannot allocate memory X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2011 22:22:39 -0000 On Fri, Jul 01, 2011 at 03:13:17PM -0400, Scott Sipe wrote: > I'm running 8.2-RELEASE and am having new problems with scp. When scping > files to a ZFS directory on the FreeBSD server -- most notably large files > -- the transfer frequently dies after just a few seconds. In my last test, I > tried to scp an 800mb file to the FreeBSD system and the transfer died after > 200mb. It completely copied the next 4 times I tried, and then died again on > the next attempt. > > On the client side: > > "Connection to home closed by remote host. > lost connection" > > In /var/log/auth.log: > > Jul 1 14:54:42 freebsd sshd[18955]: fatal: Write failed: Cannot allocate > memory > > I've never seen this before and have used scp before to transfer large files > without problems. This computer has been used in production for months and > has a current uptime of 36 days. I have not been able to notice any problems > copying files to the server via samba or netatalk, or any problems in > apache. > > Uname: > > FreeBSD xeon 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Sat Feb 19 01:02:54 EST > 2011 root@xeon:/usr/obj/usr/src/sys/GENERIC amd64 > > I've attached my dmesg and output of vmstat -z. > > I have not restarted the sshd daemon or rebooted the computer. > > Am glad to provide any other information or test anything else. > > {snip vmstat -z and dmesg} You didn't provide details about your networking setup (rc.conf, ifconfig -a, etc.). netstat -m would be useful too. Next, please see this thread circa September 2010, titled "Network memory allocation failures": http://lists.freebsd.org/pipermail/freebsd-stable/2010-September/thread.html#58708 The user in that thread is using rsync, which relies on scp by default. I believe this problem is similar, if not identical, to yours. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |