From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#23666: guix download fails for large files Date: Wed, 01 Jun 2016 14:39:54 +0200 Message-ID: <878typkrqd.fsf@gnu.org> References: <20160531195631.GA22897@solar> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b85SN-0002so-Q8 for bug-guix@gnu.org; Wed, 01 Jun 2016 08:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b85SH-0003ar-S3 for bug-guix@gnu.org; Wed, 01 Jun 2016 08:41:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b85SH-0003am-P5 for bug-guix@gnu.org; Wed, 01 Jun 2016 08:41:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b85SH-00016y-LH for bug-guix@gnu.org; Wed, 01 Jun 2016 08:41:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20160531195631.GA22897@solar> (Andreas Enge's message of "Tue, 31 May 2016 21:56:31 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Andreas Enge Cc: 23666@debbugs.gnu.org Andreas Enge skribis: > On my Novena with a 32 bit processor and 4 GB of main memory, this fails = with > guix download: error: sendfile: Broken pipe > > The file itself has 1,8 GB. This is implemented using the =E2=80=98add-to-store=E2=80=99 RPC, which, af= ter all these years, is still implemented like this (nix/libstore/local-store.cc): --8<---------------cut here---------------start------------->8--- Path LocalStore::addToStore(const string & name, const Path & _srcPath, bool recursive, HashType hashAlgo, PathFilter & filter, bool repair) { Path srcPath(absPath(_srcPath)); debug(format("adding `%1%' to the store") % srcPath); /* Read the whole path into memory. This is not a very scalable method for very large paths, but `copyPath' is mainly used for small files. */ --8<---------------cut here---------------end--------------->8--- This is undoubtedly what=E2=80=99s causing the failure. Until this is fixed, you could wrap the file in a nar and import the nar (nar import does not have this limitation, see =E2=80=99LocalStore::importP= ath=E2=80=99 and co.). To do that, you could do: guix archive --export $(guix build -S texlive-texmf-whatever) > t.nar and later: guix archive --import < t.nar HTH, Ludo=E2=80=99.