Recent 5.4-p1 upgrade issue (lib/libc.so.5)

Craig Boston craig at feniz.gank.org
Thu Jun 2 00:22:59 GMT 2005


Sorry for coming late to the thread -- catching up on mailing list
traffic :)

On Mon, May 23, 2005 at 10:24:15AM -0700, Jon Passki wrote:
> I `chflags noschg /lib/libc.so.5` and then used tar to extract the
> exact file.  tar was able to unlink the file, and then choked. 
> After some unrelated errors, I was in single user mode using
> /rescue to save my rear end, which worked well enough.  Doing `ldd
> /sbin/tar` hinted why it probably choked, since tar is dynamically
> linked to /lib/libc.so.5.

You didn't mention it so I'll ask, did you give the -U flag to tar?  If
not, it didn't actually unlink libc.so.5, but instead started
overwriting it.  This likely caused tar to bomb (probably with a SIGSEGV
or other bad condition), as the shared library in memory is backed by
the pages on disk.

Executables are locked to prevent this from happening (ETXTBSY), however
shared libraries are not.  Overwriting one will almost certainly cause
running processes to die and other Bad Things to happen.

tar -U unlinks the file first and creates a new one, which seems to be
what you want.  Of course if you did specify that and just didn't
mention it, then the problem is something else entirely -- and shouldn't
have happened AFAIK :)

Craig


More information about the freebsd-stable mailing list