From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wN4+O69z+mGoEQEAgWs5BA (envelope-from ) for ; Wed, 02 Feb 2022 13:06:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wFGmOK9z+mGz7gAA9RJhRA (envelope-from ) for ; Wed, 02 Feb 2022 13:06:07 +0100 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 B90D438A85 for ; Wed, 2 Feb 2022 13:06:07 +0100 (CET) Received: from localhost ([::1]:59352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFEOk-0004I0-Sp for larch@yhetil.org; Wed, 02 Feb 2022 07:06:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFENx-0004AE-6x for bug-guix@gnu.org; Wed, 02 Feb 2022 07:05:19 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFENi-0003te-Ui for bug-guix@gnu.org; Wed, 02 Feb 2022 07:05:15 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nFENi-0003Xf-L5 for bug-guix@gnu.org; Wed, 02 Feb 2022 07:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53696: Integer overflow on Guix GC size calculation Resent-From: Bengt Richter Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 02 Feb 2022 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53696 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Received: via spool by 53696-submit@debbugs.gnu.org id=B53696.164380349713600 (code B ref 53696); Wed, 02 Feb 2022 12:05:02 +0000 Received: (at 53696) by debbugs.gnu.org; 2 Feb 2022 12:04:57 +0000 Received: from localhost ([127.0.0.1]:51702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFENd-0003XG-48 for submit@debbugs.gnu.org; Wed, 02 Feb 2022 07:04:57 -0500 Received: from imta-35.everyone.net ([216.200.145.35]:38002 helo=imta-38.everyone.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFENY-0003X1-Do for 53696@debbugs.gnu.org; Wed, 02 Feb 2022 07:04:56 -0500 Received: from pps.filterd (omta001.sj2.proofpoint.com [127.0.0.1]) by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 212BvWns006370; Wed, 2 Feb 2022 04:04:50 -0800 X-Eon-Originating-Account: o8PYCYF8oyTsFdg93OEFly8PgxQp5b0bZ9YDfpU2yMM X-Eon-Dm: m0116953.ppops.net Received: by m0116953.mta.everyone.net (EON-AUTHRELAY2 - 5a81cb04) id m0116953.61e9ed53.126c41; Wed, 2 Feb 2022 04:04:49 -0800 X-Eon-Sig: AQMHrIJh+nNhN5BlgAIAAAAD,46dd8168b0dfb265f1383749d8ac3b43 X-Eip: aAK9KT4oVTLunP9H87kQlArojTzMdH5VmC5ziFDk-CA Date: Wed, 2 Feb 2022 13:04:41 +0100 From: Bengt Richter Message-ID: <20220202120441.GA2665@LionPure> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-GUID: HwVHo79dYznq-16gaGB2S-3I7ZeZNhwd X-Proofpoint-ORIG-GUID: HwVHo79dYznq-16gaGB2S-3I7ZeZNhwd X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425, 18.0.816 definitions=2022-02-02_06:2022-02-01, 2022-02-02 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 malwarescore=0 adultscore=0 clxscore=1034 impostorscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202020065 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: , Reply-To: Bengt Richter Cc: 53696@debbugs.gnu.org, Ekaitz Zarraga Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643803567; h=from:from:sender:sender:reply-to: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; bh=gxV4ZiC5csxZ+aVbUNjxRof0haOU54HlCfZsAgbTI1A=; b=jGD7QFTx0mN+c/ko14iQ2IcrPTSK3Mhyd8RoQVhsLXFbROkZLqXYQSqhsH8L4/kJfY+kg8 Sqhl3FB/kK9rLSrUde9fQbg8mLRoavpujEjwjOpPLZaleabTVLqYA6dhXQjfGZqUovqmnj h9ieovCec7reOjyP0pSauivHUFqHl+l56BdsIiXzoF8EeRYZhbSHdKutrpDp7eK0HfnD5j mNOaFd5Pfh77DxS4Qc4w6f59GJSQINt0bC2mQRm1eiaQPhMpbGmqWSbmeDt0D1vuxGVYwq YXnmZ697lFzpzmgAgkkmkc5sAGxTS5maNVbGMKnzY/RKyZZENRIVE/oFbECaAQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643803567; a=rsa-sha256; cv=none; b=OMGwizWX383giIlEbD2VXPR7k6jgier7iLbBNcCI34HmTyP8AycSNfnj1RmzkdEm/h4yXV Wcxy0wpf3by/327aWGh/xdPR51ObWv9wNmuSr6dbh13qQw9KTHjV78UDcmUI/nLk1LbNSc PuGxBFfOinvBtlQnks6nk2Ni8kqh+lhs/fjAPG+YSAbSKoCtxnLheP8jddgzGuA1k8/DH+ ERrLL3qlceRsCJc1bX8U1t2DZBBebvkS5W8bZhdGMrbND3TJ+/03MhIIVUtpNJdwzAjC4q slK9ADFcJbuNuytPtKHfa6aDhXgchRgiUmJRNn0gYXf1fVl3QVtLAd7I8cim4g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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" X-Migadu-Spam-Score: -2.63 Authentication-Results: aspmx1.migadu.com; dkim=none; 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" X-Migadu-Queue-Id: B90D438A85 X-Spam-Score: -2.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: +RvC6zsUAFe4 Hi Maxime, Ekaitz, et al, On +2022-02-02 11:05:31 +0100, Maxime Devos wrote: > Ekaitz Zarraga schreef op di 01-02-2022 om 14:06 [+0000]: > > [17592186042897 MiB] deleting '/gnu/store/wbz6vkiz7cq8c531xvb31lxm28nz332i-ghc-8.10.7' > > For comparison, this is about 16 exbibyte. > According to , > that's more than the global monthly Internet traffic in 2004. > > According to , 16 exbibyte would be about > 17 million solid-state disks. Even though this ignores deduplication, > this seems rather expensive. > > My guess is that the size of a store item was misrecorded somewhere. > > Greetings, > Maxime. s/misrecorded/mis-defined-in-record/ ? Wild guessing follows: --8<---------------cut here---------------start------------->8--- $ guile --no-auto-compile -c '(use-modules (ice-9 format))(format #t "~20x\n~20x\n~20d\n" (* 17592186042897 (expt 2 20)) #xa1100000 #xa1100000)'; ffffffffa1100000 a1100000 2702180352 --8<---------------cut here---------------end--------------->8--- It looks to me like a 32-bit unsigned int should have been turned to 64-bit unsigned long or bigint but somehow got cast/interpreted as signed, becoming signed 64-bit long, which then in turn was seen by the print as 64-bit unsigned long. I don't know, but if records are being used, perhaps some slot integer-widening logic might be involved? Or a mis-defined int slot that should have been long to accomodate big > 31-bit positive integers? Just guessing wildly -- I think I saw something about records and defining their fields as fixed C ints or longs. -- Regards, Bengt Richter