[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 10:26:57PM +0900, GOTO Masanori wrote:
> At Sat, 25 Sep 2004 09:05:00 -0300,
> Cesar Eduardo Barros wrote:
> > $ 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).
> 
> No.  During configuration, /etc/ld.so.nohwcap is created; libc6-i686
> libraries should not be used.  Check reinstall libc6 and libc6-i686
> with lsof.

Yes, it is created. However, it is removed *before* init (and the rest
of the daemons) is restarted, and so init gets the i686 libraries.

ld.so.nohwcap is emptied at line 178, just before the daemons are
restarted. init is restarted near the end of the script.

A fix for this bug might be to move the emptying of ld.so.nohwcap to the
end of the postinst (after init and the daemons were restarted), or even
to the postinst of libc6-i686 (so while there is a version skew between
libc6 and libc6-i686, libc6-i686 would not be used; ld.so.nohwcap could
be emptied by both postinsts only if both versions are the same).

> > 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.
> 
> No.  Close-pending files is the exact file, but it has just no name
> space accessible.  So it's no relation with this report.

The relationship with this report is that init is not killed on
shutdown, and since it's keeping a deleted file "alive", it causes
errors on umount.

> If no more problems are existed, I close it.
> 
> Regards,
> -- gotom
> 

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



Reply to: