From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aMAkNQAK+2HsQQAAgWs5BA (envelope-from ) for ; Wed, 02 Feb 2022 23:47:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yPDwLQAK+2GUDwEAG6o9tA (envelope-from ) for ; Wed, 02 Feb 2022 23:47:28 +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 35C701A017 for ; Wed, 2 Feb 2022 23:47:28 +0100 (CET) Received: from localhost ([::1]:33720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFOPP-0008J6-FZ for larch@yhetil.org; Wed, 02 Feb 2022 17:47:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFOP1-0008Iy-0e for bug-guix@gnu.org; Wed, 02 Feb 2022 17:47:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFOP0-0002rv-NS for bug-guix@gnu.org; Wed, 02 Feb 2022 17:47:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nFOP0-0004gd-Aj for bug-guix@gnu.org; Wed, 02 Feb 2022 17:47: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 22:47: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.164384200617991 (code B ref 53696); Wed, 02 Feb 2022 22:47:02 +0000 Received: (at 53696) by debbugs.gnu.org; 2 Feb 2022 22:46:46 +0000 Received: from localhost ([127.0.0.1]:53893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFOOi-0004g5-I1 for submit@debbugs.gnu.org; Wed, 02 Feb 2022 17:46:46 -0500 Received: from imta-37.everyone.net ([216.200.145.37]:49136 helo=imta-38.everyone.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFOOS-0004fd-UG for 53696@debbugs.gnu.org; Wed, 02 Feb 2022 17:46:44 -0500 Received: from pps.filterd (localhost.localdomain [127.0.0.1]) by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 212McR6E018479; Wed, 2 Feb 2022 14:46:27 -0800 X-Eon-Originating-Account: ZiBi_JVRj3MfYzPgylK-dMVx97ixqwmt9mIPgfcjuhU X-Eon-Dm: m0116953.ppops.net Received: by m0116953.mta.everyone.net (EON-AUTHRELAY2 - 5a81cb04) id m0116953.61e9ed53.13696c; Wed, 2 Feb 2022 14:46:26 -0800 X-Eon-Sig: AQMHrIJh+wnCFosIrAIAAAAE,546fbf9cf11062a336701fd908f7b108 X-Eip: vVJGB0q7BMrKv877n8eP1eO_Ru2KDpJiGdwkrWsVp7E Date: Wed, 2 Feb 2022 23:46:17 +0100 From: Bengt Richter Message-ID: <20220202224617.GA18103@LionPure> References: <20220202120441.GA2665@LionPure> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220202120441.GA2665@LionPure> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-ORIG-GUID: 3clbZZMxg-T0gjgyAGGyQWjBq7SX-AGL X-Proofpoint-GUID: 3clbZZMxg-T0gjgyAGGyQWjBq7SX-AGL X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425, 18.0.816 definitions=2022-02-02_11:2022-02-01, 2022-02-02 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 clxscore=1034 malwarescore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202020122 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=1643842048; 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=giCa0xkJfZXHK1eDE54rvyvmU6SKG08B+id0t5kvLtw=; b=kxTLSroCax5AfjiEyT6bXIg7OL+71o+jtg5x5bB3SxZvzfoHC8YhaSmsHoYSwQjC1mI0+k MO3NYAQFOTkL+KoF7NOubijASzY/yV92IC+mBOTTpKvGOHxRAb/zD2BagLIUGeowtk0VIf nn7O7sTzPCF+MPMaGyC6uISfXdFXP4Xu16cq8ALxwHq/ALR8+VSaZNczwnHvz4fg/XmkvE wq/ZKm91QfcPLUxWd73aHLDRyuzbF1jHH1NrNT/qAj1B1Cx/N/uDt/HWFa3rsg8HJWwxK+ ptirUR2mSEEMngIbmJW+r6nbUwBGajH3QqOOBhjLoxpM2Md7QdgU77j1fAVGdg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643842048; a=rsa-sha256; cv=none; b=uLyFXn9zLeek1Co6MPIl9CzSEVKheAkimboZVYv0QjhQBd21t4oLrwyeDzGAzzilweo95a A+cNeW6M6g0+3lTfnZ7F3nfb+NfC3xl3JibAXfo1FiDKRtWYJQR00yi7U/tX+g8RaglKlO okPUXrpJ+iNI4CMe52zlOYElcPLDoZe4/oaupLMJJXj407QGMqmNW2uHDfuhjQdw5VsKCO PpAxntBrlEkmkb8pIcFRsStBBCjdR3EYdjPPA/7PwBzCgxsB6EGlOra9xEgudL+UVTS0eS U2/jqQZgv+8GdWbQCN/47JUM6bfNaQRmECX0V+vnIVSdRh81lbr8JYoVJAplTw== 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: 35C701A017 X-Spam-Score: -2.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: ybAywPpVkmgc Sorry for following up my own post, but maybe it wasn't clear why I printed (* 17592186042897 (expt 2 20)) in hex ? That is the value of [17592186042897 MiB] that you've been discussing. (expt 2 20) is one MiB Does that make > --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--- a little clearer? The discussion seems to be continuing, but no mention of the above. How come? Feeling ignored, and top-posting in desperation ;/ CC-ing ludo, who will instantly know where to fix it, if he hasn't already. On +2022-02-02 13:04:41 +0100, Bengt Richter wrote: > 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 > > >