From owner-freebsd-stable@FreeBSD.ORG Sat Jul 2 04:54:43 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 0802D1065672 for ; Sat, 2 Jul 2011 04:54:43 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id BB50A8FC0A for ; Sat, 2 Jul 2011 04:54:42 +0000 (UTC) Received: by iyb11 with SMTP id 11so4476721iyb.13 for ; Fri, 01 Jul 2011 21:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=+G6jG4Ec2kXK+PJRkTxxoffF7f2pTuB+GllvZY3aPIs=; b=F5YPN0vTTJebl6IJxZyS5uWKlOJuJ6AGQypfFYpYWSIVbZp6BL7Xk/OrREANQHCtfV Tm9Q6PglcQeNEz5d65NL+G68GGWoEoHmkh1ejFHOAzqko2ypZojd/k8NcxTuNa053awc afKwtaLXnECbS8j0i66VsbTheWnFKeNEkCIe8= Received: by 10.42.177.138 with SMTP id bi10mr3659269icb.212.1309582481296; Fri, 01 Jul 2011 21:54:41 -0700 (PDT) Received: from DataIX.net ([99.190.86.179]) by mx.google.com with ESMTPS id hw7sm4090741icc.3.2011.07.01.21.54.38 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Jul 2011 21:54:39 -0700 (PDT) Sender: "J. Hellenthal" Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id p624sab2082274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jul 2011 00:54:36 -0400 (EDT) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id p624sZ48082273; Sat, 2 Jul 2011 00:54:35 -0400 (EDT) (envelope-from jhell@DataIX.net) Date: Sat, 2 Jul 2011 00:54:35 -0400 From: jhell To: Jeremy Chadwick Message-ID: <20110702045435.GA81502@DataIX.net> References: <20110701222232.GA33935@icarus.home.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20110701222232.GA33935@icarus.home.lan> Cc: freebsd-stable@freebsd.org, Scott Sipe 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: Sat, 02 Jul 2011 04:54:43 -0000 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 01, 2011 at 03:22:32PM -0700, Jeremy Chadwick wrote: > 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 fi= les > > -- the transfer frequently dies after just a few seconds. In my last te= st, 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 aga= in on > > the next attempt. > >=20 > > On the client side: > >=20 > > "Connection to home closed by remote host. > > lost connection" > >=20 > > In /var/log/auth.log: > >=20 > > Jul 1 14:54:42 freebsd sshd[18955]: fatal: Write failed: Cannot alloca= te > > memory > >=20 > > 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 pro= blems > > copying files to the server via samba or netatalk, or any problems in > > apache. > >=20 > > Uname: > >=20 > > 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 > >=20 > > I've attached my dmesg and output of vmstat -z. > >=20 > > I have not restarted the sshd daemon or rebooted the computer. > >=20 > > Am glad to provide any other information or test anything else. > > > > {snip vmstat -z and dmesg} >=20 > You didn't provide details about your networking setup (rc.conf, > ifconfig -a, etc.). netstat -m would be useful too. >=20 > Next, please see this thread circa September 2010, titled "Network > memory allocation failures": >=20 > http://lists.freebsd.org/pipermail/freebsd-stable/2010-September/thread.h= tml#58708 >=20 > 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. >=20 Please also provide your output of ( /usr/bin/limits -a ) for the server end and the client. I am not quite sure I agree with the need for ifconfig -a but some information about the networking driver your using for the interface would be helpful, uptime of the boxes. And configuration of the pool. e.g. ( zpool status -a ;zfs get all ) You should probably prop this information up somewhere so you can reference by URL whenever needed. rsync(1) does not rely on scp(1) whatsoever but rsync(1) can be made to use ssh(1) instead of rsh(1) and I believe that is what Jeremy is stating here but correct me if I am wrong. It does use ssh(1) by default. Its a possiblity as well that if using tmpfs(5) or mdmfs(8) for /tmp type filesystems that rsync(1) may be just filling up your temp ram area and causing the connection abort which would be expected. ( df -h ) would help here. --opJtzjQTFsWo+cga Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) Comment: http://bit.ly/0x89D8547E iQEcBAEBAgAGBQJODqSKAAoJEJBXh4mJ2FR+nkAH/0WzDyYUIuxJrKQI0j7IWrnY QFfPH2pHns+ppADGDrqn1nCcDz7kVVVNajCHgWBdRwheCGaeXTArUKJ0jYcSZPsv tHsfjs5pYT9G0wbh3mpoqniEvE70m+UHOY0jRRQLHevwsOKbc5Z97hGIy/9d4ljJ id4762JFS1tpwivwzHrmkMyLdnAX1szvcSNGhWpHe4oyYx+WLg8gQrEBnZqe1EdC qkglrNshkS1MamiSn6BwdapibBSH+hzQ0bwMvF9hmn6fSAPeWuLN6sRCrqiUSjWU +mbBmmwQUtCpWmUA3aGhZWukv9wKDXZ4UPKnprFduto/OIXcz8k10/ir2V4tb9E= =3rQd -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga--