[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#270745: libc6-i686: does not re-exec init



On Sat, Sep 25, 2004 at 07:06:14PM +0900, GOTO Masanori wrote:
> At Wed, 08 Sep 2004 22:14:00 -0300,
> Cesar Eduardo Barros wrote:
> > However, libc6-i686 did not re-exec init, which is using libc6-i686:
> > $ memstat -w | fgrep libc-
> > [...]
> >    1244k: /lib/tls/i686/cmov/libc-2.3.2.so 1 [...]
> > [...]
> > 
> 
> init executes with the newer /lib/libc-2.3.2.so after running
> libc6.postinst.  Could you tell me why we need to reexec init?  IIRC,
> init does not get any bonus using /lib/tls/i686/cmov/libc-2.3.2.so.
> If you don't provide us any valid evidences, I'll close it.

$ ldd /sbin/init
                libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x40034000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
$ cat /proc/1/maps
08048000-0804f000 r-xp 00000000 03:01 2423768    /sbin/init
0804f000-08050000 rw-p 00007000 03:01 2423768    /sbin/init
08050000-08071000 rw-p 08050000 00:00 0
40000000-40016000 r-xp 00000000 03:01 163657     /lib/ld-2.3.2.so
40016000-40017000 rw-p 00015000 03:01 163657     /lib/ld-2.3.2.so
40017000-40018000 rw-p 40017000 00:00 0
40034000-40163000 r-xp 00000000 03:01 784941     /lib/tls/i686/cmov/libc-2.3.2.so
40163000-4016b000 rw-p 0012f000 03:01 784941     /lib/tls/i686/cmov/libc-2.3.2.so
4016b000-4016f000 rw-p 4016b000 00:00 0
bffff000-c0000000 rw-p bffff000 00:00 0
ffffe000-fffff000 ---p 00000000 00:00 0

It might not get any benefit from using
/lib/tls/i686/cmov/libc-2.3.2.so, but as you can see it's being used.

When running libc6.postinst, the new libc6-i686 wasn't yet unpacked, and
so when libc6.postist restarted init, it used the new ld-2.3.2.so but
the old /lib/tls/i686/cmov/libc-2.3.2.so (since nothing on init
prevented it from using the i686 libc). After that, libc6-i686 was
unpacked and configured, but did not restart init; the end result was
init still running with the new ld-2.3.2.so and the old
/lib/tls/i686/cmov/libc-2.3.2.so.

After that, I restarted init by hand, and it picked the new i686 libc.

If I didn't restart it by hand, the file descriptor for the old copy of
the i686 libc would still be open, causing problems later when umounting
the root filesystem.

-- 
Cesar Eduardo Barros
cesarb@cesarb.net
cesar.barros@gmail.com



Reply to: