From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id MFstFV1sQGZUaAAAqHPOHw:P1 (envelope-from ) for ; Sun, 12 May 2024 09:14:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MFstFV1sQGZUaAAAqHPOHw (envelope-from ) for ; Sun, 12 May 2024 09:14:37 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JjCPMZNw; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715498077; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=sy+4crbrCA7izAVrXQkoruxwqyozKistZX5a2QCRSxI=; b=IgU4dauZwtiFBAOBsla4tEvKzxFw2yWyAhU5/qBQRql4Ks5xVVmsmMm6qQSiWNsqLwlkoe VN6PRSCW+LU8iZVboF13hwefCvgFSkYzjwt2bJg0NNfZvbLfsnVt48RR6hHZnjLhQIVD/O x/ptWtmH00gAkHSCJnpfTqeeZpe0a2xgXOD6FbsfE4kROhDY6l9Aiz481dt4cJc1kxv/y7 undjBx9pExDDTyl+vEm1y0SGbmS3o4AlY40+Sxc/MVZH21UqD7U5Vh861LR9kEVWeftrn2 dgqiSFPp3F5UL7EYnanEJvBs+IAuIYH+rKIlkMGP72qTKQnYKBdoHmg07Ja0Rg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715498077; a=rsa-sha256; cv=none; b=BZLSibLF7Q/dLZj5jnVVADdJ4uU6mVlAnD4F+A34ZwGyNH6M6/f9HiOQziL9lmf6gfrxjI 1j8+YqJp0Hp+E/dZ3XliVQC1ov6J9hEEdCTbG34CFx9ykPIL372BdU7+NUjXo5Q1zvbC6k oXu0x5u9YucC8yukpTIedQGSX2BtvXoKrfgAl+hKRIimciGih2G+kxrqtYzNF5hM2d7RJ5 0oArbH+8c/3bWcd70ASA6eFIQSuH6Fpflb5ikP2d4LdBWMxOMpwNdtyxECpUCP2xmW2sAc IGKT0Fln3sKGK+bR4SSVmDQ0qr1eERPIlCElQHNX9wNadc0eka8bnX3BimZ6Nw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JjCPMZNw; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6DFAD7256F for ; Sun, 12 May 2024 09:14:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s63PI-00036C-4p; Sun, 12 May 2024 03:14:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s63PG-00035z-BA for bug-guix@gnu.org; Sun, 12 May 2024 03:14:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s63PG-0005OK-2a for bug-guix@gnu.org; Sun, 12 May 2024 03:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s63PF-0004FU-Pe for bug-guix@gnu.org; Sun, 12 May 2024 03:14:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#70877: guix-daemon fails to copy 4+GB file to store Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 12 May 2024 07:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70877 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ricardo Wurmus Cc: ludo@gnu.org, 70877@debbugs.gnu.org Received: via spool by 70877-submit@debbugs.gnu.org id=B70877.171549800416319 (code B ref 70877); Sun, 12 May 2024 07:14:01 +0000 Received: (at 70877) by debbugs.gnu.org; 12 May 2024 07:13:24 +0000 Received: from localhost ([127.0.0.1]:52880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s63Oe-0004F9-5G for submit@debbugs.gnu.org; Sun, 12 May 2024 03:13:24 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:45438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s63Oa-0004F3-Gj for 70877@debbugs.gnu.org; Sun, 12 May 2024 03:13:21 -0400 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-41b79451145so24214585e9.3 for <70877@debbugs.gnu.org>; Sun, 12 May 2024 00:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715497934; x=1716102734; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=sy+4crbrCA7izAVrXQkoruxwqyozKistZX5a2QCRSxI=; b=JjCPMZNwjJqS3Afze1zTHtSWATAKLS367VwXLK3my6LgVdxFPIv/1TbO13E247J9hH P7qpPDzGvhLdDsgPq1h82Q6TeWaTIPvKOHAd18kUozpRZixnRaP5OxB4rRPPMgaDAh3p vF6ptC0DenEDsv6YJ+jdidrprkz/ipBoxxPU5ocbdGHmKpJMJ0E5R94/UZvocznjo8Pm 90YDVQCt5PDp3EyhpNYTN9ypyhtaxCRoqvem/EBKOF1Cksyz4yFjfZ98Vv9Nz0vLoj9V WyGKs74O96Y4NQVOnjWQ6kIIqtry1Y8kuIDjfY1TfTIXMRAFb/4zf/uxBhkdqywSU/NB K/+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715497934; x=1716102734; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sy+4crbrCA7izAVrXQkoruxwqyozKistZX5a2QCRSxI=; b=b+dXRY6rc8o7F696HGKpvzcjlwk1bG1+Y6B/2FyUzBAEENRL8nhhfgBhe5p0buxmo7 akRizSiD2P/FCSHhoLtb8v41y3g7nUMQLGiWp8NQdgoUD2xxxwqqYM9QJY3vTPfU58D/ zvW9vIwt0sos5hoBFWXirst6iAz2CwJBRz6OODjgGwjWhIA2HF87iYuugpbTD7JdR3jf noelf52kkr0ntVMBVpaNnFcCO5CE6xLwqsNvgOPvuZ0KtuXhxdDCfWDvyPvef/p6njpN O3mhPLevMaov9TjvPD6z34vRcd7wr1mwD/MNI7tT1YtjFVNa63CEFs6fyXt0ab0+WdUt kJNQ== X-Gm-Message-State: AOJu0YzVOl+jGcbL8APoh4vlZ3bTU3JEAWjB0gOffhH5ISJcP80r9x4C kbnPKIMrjNPsS8uNlajG/8/kLHzRswjOMeDB+UjFBnsi1dogljB4 X-Google-Smtp-Source: AGHT+IHj5W6k25aNWZ9kgnBKAISiAY9lCVmxoVhzrr13l/QqGmcQspmGoW20dUyBSMn0HCOA1I3BKQ== X-Received: by 2002:a05:600c:4fcd:b0:41c:2931:e670 with SMTP id 5b1f17b1804b1-41fea9320acmr47614675e9.2.1715497933376; Sun, 12 May 2024 00:12:13 -0700 (PDT) Received: from localhost ([37.46.46.122]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccbe8f9bsm119694925e9.6.2024.05.12.00.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 00:12:12 -0700 (PDT) Date: Sun, 12 May 2024 10:12:11 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Ricardo Wurmus , 70877@debbugs.gnu.org, ludo@gnu.org References: <87msowpqm2.fsf@elephly.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WY049zgeJ+b4bTKr" Content-Disposition: inline In-Reply-To: <87msowpqm2.fsf@elephly.net> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.98 X-Spam-Score: -3.98 X-Migadu-Queue-Id: 6DFAD7256F X-Migadu-Scanner: mx11.migadu.com X-TUID: BOSgz2R+nu2V --WY049zgeJ+b4bTKr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 11, 2024 at 12:52:53PM +0200, Ricardo Wurmus wrote: > The guix-daemon's libutil/util.cc uses copy_file_range to copy a > downloaded file into the store. copy_file_range fails on files larger > than 4GB with an error like this: >=20 > guix build: error: short write in copy_file_range `15' to `16': No su= ch file or directory >=20 > The man page for copy_file_range says that it could return EFBIG when > the range exceeds the maximum range. The daemon code does not check any > limits and will attempt to copy the whole file. >=20 > I believe our code ought to check the value of st.size and fall back to > a boring copy if it exceeds some "reasonable" value. >=20 > This is where copy_file_range is used: > https://git.savannah.gnu.org/cgit/guix.git/tree/nix/libutil/util.cc#n382 >=20 > Here is a little reproducer: >=20 > (use-modules (guix download) > (guix packages) > (guix build-system trivial)) >=20 > (package > (name "chungus") > (version "1") > (source > (origin > (method url-fetch) > (uri "http://localhost:1111/chungus") > (sha256 > (base32 "0nx67d4ls2nfwcfdmg81vf240z6lpwpdqypssr1wzn3hyz4szci4")))) > (build-system trivial-build-system) > (home-page "") > (synopsis "") > (description "") > (license #f)) >=20 > --8<---------------cut here---------------start------------->8--- > # generate a big file > dd bs=3D1M count=3D4096 if=3D/dev/zero of=3D/tmp/chungus > # serve it > guix shell woof -- woof -i 127.0.0.1 -p 1111 -c 1 /tmp/chungus > # build the source derivation > guix build --no-grafts -Sf bug.scm > # observe the error > # guix build: error: short write in copy_file_range `15' to `16': No such= file or directory > --8<---------------cut here---------------end--------------->8--- >=20 This sounds like a similar failure to bug 65714 that I ran into with guix copy, but I wasn't able to diagnose it. https://issues.guix.gnu.org/65714 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --WY049zgeJ+b4bTKr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmZAa8gACgkQQarn3Mo9 g1GBJw//VqKkLgiTUONuYFYrM7TiCSmxrt3wLT3GkxxF+EDEyaf6Lye9W3uSFYek Moy/5kWSSvjfyiJA6UCAGelcao90ogylfH88oHYt6zqa4h5ArwimAmYTSmrRr3b6 Pvr6QypDT1tflwe5x2R+YbigFswCgXYPXtM85IDwQzOcwffl5rePz3HB9YKCJCVx +54xhbY8LL7aBmG68jyXS4G1XsIGWnzBVret7hLZ++i/HTwC9lX2Kn9lSXUSfPev hiS8290J3Vz7pES5jp2/VsTZpw2zBnhNOwK+rbEpQMcOYHycfTjDTlZ4x2POPXSg HpcMIsyo34nOWsVtYYbMl3wYSukF3mIkZx2lpb7ZNNsOTvGqX3IIgADslqoiaCtB ENaXGLO3BLJc3AXUEwrOe6a5b0APdDy4RDNqZXZYP0RMDR5M13YREepazHcb0If7 IExQp3S9Eo9DA6Jnbb5wcNAVHta4ytvE3qYrYMp4+J0aYFETlLyyFQqbTpPiqHxN Gp/NLT8VravsGf9r/UJYZHEz12wC4XrSHR1tvw/yyj0T4cARgv27kU/8myGPXWtC ys90UhU2hs2MoCcgtW5cML2epH/+5ycgXmPgWM9pS5ukMDKktcPnJCwMUO/2DawC UocY2aWvPStnddMkCfdT+QqaKXukWYENo+QAk1fEBNvplJMDAX8= =ZUuL -----END PGP SIGNATURE----- --WY049zgeJ+b4bTKr--