kern/77119: Dynamically linked root 5.3 system does not update /libexec/ld-elf.so.1

John Engelhart johne at zang.com
Fri Feb 4 21:10:09 PST 2005


>Number:         77119
>Category:       kern
>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 05 05:10:08 GMT 2005
>Closed-Date:
>Last-Modified:
>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 at 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 at 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 at 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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list