NetBSD Problem Report #52054

From www@NetBSD.org  Thu Mar  9 17:14:56 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id BF9E27A1BE
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  9 Mar 2017 17:14:55 +0000 (UTC)
Message-Id: <20170309171454.9C9337A2A6@mollari.NetBSD.org>
Date: Thu,  9 Mar 2017 17:14:54 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: src/libexec/ld.elf_so update breaks everything
X-Send-Pr-Version: www-1.0

>Number:         52054
>Category:       toolchain
>Synopsis:       src/libexec/ld.elf_so update breaks everything
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 09 17:15:00 +0000 2017
>Closed-Date:    Tue Jun 06 08:33:25 +0000 2017
>Last-Modified:  Tue Jun 06 08:33:25 +0000 2017
>Originator:     David Shao
>Release:        NetBSD 7.99.65
>Organization:
>Environment:
>Description:
The update

Module Name:    src
Date:           Thu Mar  9 00:43:50 UTC 2017

Modified Files:
        src/libexec/ld.elf_so: map_object.c

Log Message:
really unmap the gap between the text and data rather than just removing
all access with mprotect().

possibly breaks everything including trying to rebuild a system with
./build.sh -O ../obj -T ../tools -U -u build or whatever.

Can someone give me straightforward instructions for how to rebuild AND INSTALL only ld having done a previous
./build.sh -O ../obj -T ../tools -U -u release
and then reverting the problematic changes by
cvs -q update -D "March 8, 2017 23:30 UTC" -Pd

Or is the only recourse to obtain a reverted installation set from elsewhere and just reinstall it over one's system from /
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Chuck Silvers <chuq@chuq.com>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: toolchain/52054: src/libexec/ld.elf_so update breaks everything
Date: Thu, 9 Mar 2017 09:39:43 -0800

 > possibly breaks everything including trying to rebuild a system with
 > ./build.sh -O ../obj -T ../tools -U -u build or whatever.

 could you clarify what you mean by "breaks everything"?
 it works fine for me on amd64.

 what platform are you running on?


 > Can someone give me straightforward instructions for how to rebuild AND INSTALL only ld having done a previous
 > ./build.sh -O ../obj -T ../tools -U -u release
 > and then reverting the problematic changes by
 > cvs -q update -D "March 8, 2017 23:30 UTC" -Pd
 > 
 > Or is the only recourse to obtain a reverted installation set from elsewhere and just reinstall it over one's system from /

 I don't know what to tell you about how to recover since
 it's not clear yet exactly what's going wrong for you.

 -Chuck

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/52054: src/libexec/ld.elf_so update breaks everything
Date: Thu, 9 Mar 2017 19:56:37 +0100

 On Thu, Mar 09, 2017 at 05:15:00PM +0000, davshao@gmail.com wrote:
 > Can someone give me straightforward instructions for how to rebuild AND INSTALL only ld having done a previous
 > ./build.sh -O ../obj -T ../tools -U -u release
 > and then reverting the problematic changes by
 > cvs -q update -D "March 8, 2017 23:30 UTC" -Pd

 The basic receipe is:

 cd /usr/src/libexec/ld.elf_so # adapt to your source dir location
 ../../../tools/bin/nbmake-amd64
 ../../../tools/bin/nbmake-amd64 install

 FWIW: I have installed the new ld.elf_so (so far) on amd64,
 evbearmv7hfeb and sparc64, all work fine.

 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/52054: src/libexec/ld.elf_so update breaks everything
Date: Thu, 9 Mar 2017 20:03:03 +0100

 On Thu, Mar 09, 2017 at 07:00:01PM +0000, Martin Husemann wrote:
 >  cd /usr/src/libexec/ld.elf_so # adapt to your source dir location
 >  ../../../tools/bin/nbmake-amd64
 >  ../../../tools/bin/nbmake-amd64 install

 Ooops, of course that only installs it to $DESTDIR.
 You then need to do something like:

 cd /libexec
 /rescue/rm ld.elf_so
 /rescue/cp $DESTDIR/libexec/ld.elf_so .

 Martin

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 06 Jun 2017 08:33:25 +0000
State-Changed-Why:
I reverted the change at the time, and it was not re-committed. sorry about the trouble in recovery.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.