From nobody@FreeBSD.org  Sat Feb  5 05:04:37 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 99FC616A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  5 Feb 2005 05:04:37 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 69BC243D2F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  5 Feb 2005 05:04:37 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j1554ZLR072743
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 5 Feb 2005 05:04:35 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j1554Zre072742;
	Sat, 5 Feb 2005 05:04:35 GMT
	(envelope-from nobody)
Message-Id: <200502050504.j1554Zre072742@www.freebsd.org>
Date: Sat, 5 Feb 2005 05:04:35 GMT
From: John Engelhart <johne@zang.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Dynamically linked root 5.3 system does not update /libexec/ld-elf.so.1
X-Send-Pr-Version: www-2.3

>Number:         77119
>Category:       bin
>Synopsis:       Dynamically linked root 5.3 system does not update /libexec/ld-elf.so.1
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 05 05:10:08 GMT 2005
>Closed-Date:    Sat Feb 05 11:39:57 GMT 2005
>Last-Modified:  Sat Feb 05 11:40:07 GMT 2005
>Originator:     John Engelhart
>Release:        5.3p1
>Organization:
n/a
>Environment:
FreeBSD new.zang.com 5.3-RELEASE-p1 FreeBSD 5.3-RELEASE-p1 #0: Wed Nov 24 15:02:13 EST 2004     johne@new.zang.com:/usr/src/sys/i386/compile/new  i386
>Description:
At least on my system, it would appear that /libexec/ld-elf.so.1 does not update during a "make installworld" any more.  The timestamps of the files would seem to place it right around the time I started to move to 5.3.

While working on a different problem, I stumbled across the fact that my /libexec/ld-elf.so.1 was out of date compared to the rest of the libs (~1.5 weeks).  Digging in to it a bit, I tried to replace it from /usr/obj/.../rtld-elf/ld-elf.so.1 by hand.

[root@new] rtld-elf# make install
chflags noschg /usr/libexec/ld-elf.so.1
install -s -o root -g wheel -m 555  -fschg -C -b ld-elf.so.1 /libexec
install -o root -g wheel -m 444 rtld.1.gz  /usr/share/man/man1
/usr/share/man/man1/ld-elf.so.1.1.gz -> /usr/share/man/man1/rtld.1.gz
/usr/share/man/man1/ld.so.1.gz -> /usr/share/man/man1/rtld.1.gz
/usr/libexec/ld-elf.so.1 -> /libexec/ld-elf.so.1

[root@new] rtld-elf# ls -l /libexec/
total 292
-r-xr-xr-x  1 root  wheel  147704 Oct 21 21:17 ld-elf.so.1
-r-xr-xr-x  1 root  wheel  148312 Oct  5 19:21 ld-elf.so.1.old

Brought the machien down to single user mode, and tried it again.  Same results, no update.  Tried to copy the file with cp (after chflags noschg), and got:

[root@new] /libexec# cp /usr/obj/usr/src/libexec/rtld-elf/ld-elf.so.1 ./
cp: ./ld-elf.so.1: Text file busy

And a quick lsof shows the problem:

[root@] /etc# lsof
lsof: WARNING: access /root/.lsof_: No such file or directory
lsof: WARNING: created device cache file: /root/.lsof_
COMMAND PID USER   FD   TYPE DEVICE   SIZE/OFF     NODE NAME
init      1 root  cwd   VDIR   4,13       1024        2 /
init      1 root  rtd   VDIR   4,13       1024        2 /
init      1 root  txt   VREG   4,13     514328  7373393 /sbin/init
tcsh     61 root  cwd   VDIR   4,13       3072 10057600 /etc
tcsh     61 root  rtd   VDIR   4,13       1024        2 /
tcsh     61 root  txt   VREG   4,13     316028  6832046 /bin/tcsh
tcsh     61 root  txt   VREG   4,13     147704  5353604 /libexec/ld-elf.so.1
tcsh     61 root  txt   VREG   4,13     268108  5376055 /lib/libncurses.so.5
tcsh     61 root  txt   VREG   4,13      32804  5376052 /lib/libcrypt.so.2
tcsh     61 root  txt   VREG   4,13     936092  5376009 /lib/libc.so.5
tcsh     61 root   15u  VCHR    0,0    0t28537       10 /dev/console
tcsh     61 root   16u  VCHR    0,0    0t28537       10 /dev/console
tcsh     61 root   17u  VCHR    0,0    0t28537       10 /dev/console
tcsh     61 root   18u  VCHR    0,0    0t28537       10 /dev/console
tcsh     61 root   19u  VCHR    0,0    0t28537       10 /dev/console
lsof     96 root  cwd   VDIR   4,13       3072 10057600 /etc
lsof     96 root  rtd   VDIR   4,13       1024        2 /
lsof     96 root  txt   VREG   4,13     117028  6631100 /usr/local/sbin/lsof
lsof     96 root  txt   VREG   4,13     147704  5353604 /libexec/ld-elf.so.1
lsof     96 root  txt   VREG   4,13      21704  5376054 /lib/libkvm.so.2
lsof     96 root  txt   VREG   4,13     936092  5376009 /lib/libc.so.5
lsof     96 root    0u  VCHR    0,0    0t28537       10 /dev/console
lsof     96 root    1u  VCHR    0,0    0t28537       10 /dev/console
lsof     96 root    2u  VCHR    0,0    0t28537       10 /dev/console
lsof     96 root    3r  VCHR  245,0        0t0       14 /dev/mem
lsof     96 root    4r  VCHR  245,1 0xc2686d04       15 /dev/kmem

I had to exec /rescue/tcsh and then /rescue/cp the file before it would take.

I hope I'm not wasting someones time because of some oddity I have with my system, but I suspect this is 5.3 related with the move to a dynamic root.
>How-To-Repeat:
      See problem description, trivial to repeate
>Fix:
      Lots of solutions, someone will have to pick one.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Sat Feb 5 11:37:04 GMT 2005 
State-Changed-Why:  
There's no problem here.  ld-elf.so.1 is installed with the 
-C option of install(1) (compare and copy only if different). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77119 
>Unformatted:
