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

Bug#206242: libc6 installation segfaults and leaves mixed libs in /lib



Package: libc6
Version: 2.3.2-2
Severity: critical
Justification: Breaks whole system

Running Linux kernel 2.5.68:
Installing libc6-2.3.2-2 produces the following output:
Suu:~# dpkg -i -D3 /var/cache/apt/archives/libc6* /var/cache/apt/archives/locales_2.3.2-2_all.deb
(Reading database ... 63496 files and directories currently installed.)
Preparing to replace libc6 2.3.1-16 (using .../libc6_2.3.2-2_i386.deb) ...
D000001: process_archive oldverionstatus=installed
D000002: maintainer_script_alternative nonexistent prerm '/var/lib/dpkg/info/libc6.prerm'
D000002: fork/exec /var/lib/dpkg/tmp.ci/preinst ( )
Unpacking replacment libc6 ...
D000002: fork/exec /var/lib/dpkg/info/libc6.postrm ( )
dpkg: error processing /var/cache/apt/archives/libc6_2.3.2-2_i386.deb (--install)
 dpkg: warning - old post-removal script killed by signal (Segmentation fault)

D000002: fork/exec /var/lib/dpkg/info/libc6.preinst ( )
dpkg: error while cleaning up:
 subprocess pre-installation script killed by signal (Segmentation fault)
Preparing to replace libc6-dev 2.3.1-16 (using .../libc6_2.3.2-2_i386.deb) ...
D000001: process_archive oldverionstatus=installed
D000002: maintainer_script_alternative nonexistent prerm '/var/lib/dpkg/info/libc6-dev.prerm'
D000002: fork/exec /var/lib/dpkg/tmp.ci/preinst ( )
Unpacking replacment libc6-dev ...
D000002: maintainer_script_alternative nonexistent postrm '/var/lib/dpkg/info/libc6-dev.postrm'
D000001: process_archive updating info directory
D000001: process_archive info installed /var/lib/dpkg/tmp.ci/preinst as /var/lib/dpkg/info//libc6-dev.preinst
D000002: process_archive tmp.ci script/file '.' contains dot
D000002: process_archive tmp.ci script/file '..' contains dot
D000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/control' is control
Preparing to replace locales 2.3.1-16 (using .../locales_2.3.2-2_all.deb)
D000001: process_archive oldverionstatus=installed
D000002: maintainer_script_alternative nonexistent prerm '/var/lib/dpkg/info/locales.prerm'
D000002: maintainer_script_new nonexistent preinst '/var/lib/dpkg/tmp.ci/preinst'
Unpacking replacement locales ...
D000002: fork/exec /var/lib/dpkg/info/locales.postrm ( )
D000001: process_archive updating info directory
D000001: process_archive info installed /var/lib/dpkg/tmp.ci/postinst as /var/lib/dpkg/info//locales.postinst
D000001: process_archive info installed /var/lib/dpkg/tmp.ci/conffiles as /var/lib/dpkg/info//locales.conffiles
D000001: process_archive info installed /var/lib/dpkg/tmp.ci/postrm as /var/lib/dpkg/info//locales.postrm
D000001: process_archive info installed /var/lib/dpkg/tmp.ci/templates as /var/lib/dpkg/info//locales.templates
D000001: process_archive info installed /var/lib/dpkg/tmp.ci/config as /var/lib/dpkg/info//locales.config
D000002: process_archive tmp.ci script/file '.' contains dot
D000002: process_archive tmp.ci script/file '..' contains dot
D000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/control' is control
dpkg: dependency problems prevent configuration of libc6-dev:
 libc6-dev depends on libc6 (=2.3.2-2); however:
  Package libc6 is not installed.
dpkg: error processing libc6-dev (--install)
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of locales:
 locales depends on glibc-2.3.2-2; however:
  Package glibc6-2.3.2-2 is not installed.
dpkg: error processing locales (--install)
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.3.2-2_i386.deb
 libc6-dev
 locales
-- End of horrendous transcribing...

An ls -l /lib/*-2.3* shows the libc6 2.3.1 and 2.3.2 files happily
sitting next to each other, the 2.3.1 dated March 22nd, the 2.3.2
files dated August 6th. The other libraries inclued in the libc6
package:
ls -l /lib/lib*thread* /lib/libSegFault.so
show that libpthread-0.10.so, libSegFault.so and libthread_db-1.0.so
are all the March 22nd version. The 2.3.2 versions of these files,
and any other files from the libc6-2.3.2-2 apart from /lib/*-2.3.2
aren't unpackged anywhere I can see. Or have been unpacked, and
cleaned up, maybe.

The symlinks for the so-versioned files in the libc6 package are all
pointing to the 2.3.1 versions.

At this point (in previous experimentation) ldconfig will produce
a system that segfaults on anything, apparently due to the mismatch
of libpthread and libc.

The other solution I have attempted was to get the new libpthread,
libthread_db and libSegFault and put them in place (booting from
the woody installation CD). If the old libpthread et al. are left
in place (as *.so.org for example) ldconfig will choose them in
preference to the 2.3.2 versions, and every command (even ldd and ln,
which don't link to libpthread, just libc) segfault. ldconfig is OK.
This includes the ldd from the 2.3.2 libc6 package.

Leaving just the 2.3.2 versions and deleting the 2.3.1 versions of
the un-so-versioned files also produces a system which is unbootable.

Both cases of unbootability appear to be init segfaulting, but no
error appears on screen. The last line of booting is:
Frreing unused kernel memory: 164k freed

I hope there's enough here to help with whatever is causing this,
and/or gain some advice as to what I can try next. It would be nice
if dpkg in debugging mode told me what parameters it was passing to
the maintainer scripts so I could see what's segfaulting during the
install.

Aaargh. I just realised on this test run that I backed up the 2.3.1
un-so-versioned /lib stuff to the ramdisk, not the target. So I may
not be able to try any solutions that require a working system for a
little while. :-( Not until after I find a working floppy disk...

Hmm, that's interesting. If I use the old 2.3.1 so-named libraries,
but the new un-so-named libraries, I can boot, but get that relocation
error from 204930 from various processes during boot. (Those that link
to libpthread, such as ls, but ldd and mv and ln work OK.)

So I can successfully restore by running
dpkg -i ~tbble/libc6* ~tbble/locales_2.3.1-16_all.deb.

Oh, no I can't. dpkg-deb needs tar to extract, and tar uses libpthread.
Blah. :-(
dpkg-deb -x ~tbble/libc6_2.3.1-16_i386.deb .
Failed.
dpkg-deb --fsys-tarfile ~tbble/libc6_2.3.1-16_i386.deb |cpio -i 
Worked! (For anyone else needed to recover easily from that level of
stupidity)
cp lib/libthread*-*.so lib/libSegFault.so /lib
And now I can ls again! :-)
I hope _that_ little sojourn helps people too.

After all that I guess the problem appears to be that the libc-2.3.2.so
in libc6-2.3.2-2 segfaults. I dunno how to debug it further than that.
Suggestions welcome, but time is scarce before the weekend. :-(

--
Paul "TBBle" Hampson.



Reply to: