NetBSD Problem Report #57147

From gson@gson.org  Thu Dec 29 16:26:14 2022
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A41F91A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 29 Dec 2022 16:26:14 +0000 (UTC)
Message-Id: <20221229162604.D3182254819@guava.gson.org>
Date: Thu, 29 Dec 2022 18:26:04 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: NetBSD-current/amd64 disk use quadrupled
X-Send-Pr-Version: 3.95

>Number:         57147
>Category:       toolchain
>Synopsis:       NetBSD-current/amd64 disk use quadrupled
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 29 16:30:00 +0000 2022
>Closed-Date:    Fri Dec 30 15:09:59 +0000 2022
>Last-Modified:  Fri Dec 30 15:09:59 +0000 2022
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, source date >= 2022.12.28.22.04.46
>Organization:

>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:

With the commit that switched x86 to binutils 2.39,

  2022.12.28.22.04.46 christos src/share/mk/bsd.own.mk 1.1291

the amount of disk space used by a NetBSD-current/amd64 installation
has increased from about one gigabyte to more than four gigabytes.
Binaries appear to have grown across the board; for example, /bin/sh
went from 222K to 2.0M.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Christos Zoulas <christos@zoulas.com>
To: gnats-bugs@netbsd.org
Cc: toolchain-manager@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: toolchain/57147: NetBSD-current/amd64 disk use quadrupled
Date: Thu, 29 Dec 2022 14:01:40 -0500

 --Apple-Mail=_BFFF14B5-6A25-42BA-8155-B4DE69F83E01
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii

 I don't see that:

 [1:55pm] 198>size /bin/sh
    text    data     bss     dec     hex filename
  179979    6311    9896  196186   2fe5a /bin/sh
 [1:55pm] 199>ls -l /bin/sh
 -r-xr-xr-x  1 root  wheel  227808 Feb  2  2021 /bin/sh*

 [DING!] 900>size /bin/sh
    text    data     bss     dec     hex filename
  186393    6239    9928  202560   31740 /bin/sh
 [2:00pm] 901>ls -l /bin/sh
 -r-xr-xr-x  1 root  wheel  2136048 Dec 26 12:46 /bin/sh*

 christos

 --Apple-Mail=_BFFF14B5-6A25-42BA-8155-B4DE69F83E01
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename=signature.asc
 Content-Type: application/pgp-signature;
 	name=signature.asc
 Content-Description: Message signed with OpenPGP

 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - http://gpgtools.org

 iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCY63kFAAKCRBxESqxbLM7
 Oh8/AKCIbGf6zmxx0rk7Lv+ZwUcqPgbZIgCfaGnMy/RhdVSwNw0Ixz8pOF7Ulcg=
 =4bHW
 -----END PGP SIGNATURE-----

 --Apple-Mail=_BFFF14B5-6A25-42BA-8155-B4DE69F83E01--

From: Andreas Gustafsson <gson@gson.org>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: toolchain/57147: NetBSD-current/amd64 disk use quadrupled
Date: Thu, 29 Dec 2022 21:22:44 +0200

 Christos Zoulas wrote:
 > I don't see that:
 [...]
 > -r-xr-xr-x  1 root  wheel  227808 Feb  2  2021 /bin/sh*
 [...]
 > -r-xr-xr-x  1 root  wheel  2136048 Dec 26 12:46 /bin/sh*

 There's no significant difference in the size(1) output, but count the
 digits in the output from ls...
 -- 
 Andreas Gustafsson, gson@gson.org

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57147 CVS commit: src/share/mk
Date: Thu, 29 Dec 2022 21:01:42 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Fri Dec 30 02:01:42 UTC 2022

 Modified Files:
 	src/share/mk: bsd.sys.mk

 Log Message:
 PR/57147: Andreas Gustafsson: Work around binutils 2.38+ relro
 issue with +2M size in every binary by setting max-page-size. This
 is the simplest fix; fixing this properly requires a lot more
 surgery, and upstream seems uncertain how to fix it properly.


 To generate a diff of this commit:
 cvs rdiff -u -r1.309 -r1.310 src/share/mk/bsd.sys.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Fri, 30 Dec 2022 15:09:59 +0000
State-Changed-Why:
Confirmed fixed (or at least worked around).


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2022 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.