Re: Possible ld-so bug.

Richard B. Johnson (root@chaos.analogic.com)
Tue, 16 Feb 1999 16:54:43 -0500 (EST)


On Tue, 16 Feb 1999, Vladimir Dergachev wrote:

>
>
> On Tue, 16 Feb 1999, Richard B. Johnson wrote:
>
> > On Tue, 16 Feb 1999, Philip Blundell wrote:
> >
> > > >Well you installed glibc-2.0.112 over glibc-2.0.111 That's okay! They
> > > >have different version numbers. I installed glibc-2.0.7 over glibc-2.0.7
> > > >The new one was compiled with a different C compiler. Same version number
> > > >different code.
> > >
> > > Then you will almost certainly come to grief. Modifying a shared library
> > > while it's in use is a sure way to disaster. This is one of the reasons it's
> > > not recommended for random users to upgrade their glibc.
> > >
> >
> > Well I've been called a lot of things, but not a "random user" before ;)
> > I don't think I should have to recompile all the tools to `static` if I
> > wish to rebuild glibc with the "latest-and-greatest" compiler. This
> > problem is certainly going to come up again. If the developers of ld.so
> > would respond, maybe its as simple as renaming ld.so.cache before
> > `make install`.
> >
>
> Ummm if I understand correctly when you install files you don't modify
> them. Instead you remove the originals and put the new copy in their
> place. So if the library was mmaped to anything the inode that has it
> should be retained until all the program using the library have quit.
>
> Right ?
>
> Vladimir Dergachev

Yes. The install does `mv library library.sav` ; `cp new_library library`.
So, In principle, this should work. However it doesn't, apparently
because one can only perform one operation at a time so at some instant,
there is a new ld-linux.so and an old libc.n.n.so. And `mv`, `install`,
'cp`, etc. all use these libraries. This would not happen if the library
version numbers were different because 'mv'. etc., would always use
the library.n.n.so it was linked against.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.1 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
Wisdom : It's not a Y2K problem. It's a Y2Day problem.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/