Description of problem: After updating from Rawhide's glibc-2.3.1-38 to 2.3.1-51, one important program always segfaults: the program rpm. Segfaults occur only on using rpm for installation (-U), not any other tasks. rpm --rebuilddb did not help. Version-Release number of selected component (if applicable): glibc-2.3.1-51 How reproducible: always Steps to Reproduce: 1. rpm -Uvh glibc*2.3.1-51.i386.rpm 2. rpm -Uvh mc-4.6.0-3.i386.rpm (any package, FWIW) 3. Actual results: Preparing... ########################################### [100%] Segmentation fault Expected results: Preparing... ########################################### [100%] 1:mc ########################################### [100%] Additional info: I'm running a 7.x RedHat system, with very many, but not all, updates from RawHide. I'm still using rpm-4.0.4-7x.18 (critical component, you see ;->), but have updated recently to glibc >= 2.3.1-38, because some Rawhide programs are requiring glibc-2.3.2 symbols, which these versions provide. Most recently, I updated to -51, because I had some problems along the lines of Bug #82505 and Bug #83325. Especially the latter, because my netscape-navigator says "Incorrectly built binary which accesses errno, h_errno or _res directly". (LD_ASSUME_KERNEL doesn't help, the upgrade to -51 didn't help, so I suppose we're stuck with this incompatibility, lacking source code.) So now, glibc-*2.3.1-51 are the latest packages I've installed with rpm. I am now seeing this one, pretty critical issue: rpm segfaults before installing a package. "rpm --rebuilddb" did not help. root@sunshine:/usr/new/RedHat/8.x/new # rpm -q rpm rpm-4.0.4-7x.18 root@sunshine:/usr/new/RedHat/8.x/new # rpm -q --requires rpm | fgrep \( rpmlib(CompressedFileNames) <= 3.0.4-1 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.2.3) libpthread.so.0(GLIBC_2.0) librt.so.1(GLIBC_2.1) root@sunshine:/usr/new/RedHat/8.x/new # rpm -q glibc glibc-2.3.1-51 root@sunshine:/usr/new/RedHat/8.x/new # rpm -Uvh mc-4.6.0-3.i386.rpm Preparing... ########################################### [100%] Segmentation fault root@sunshine:/usr/new/RedHat/8.x/new # rpm -Uvvvh mc-4.6.0-3.i386.rpm D: ============== mc-4.6.0-3.i386.rpm D: Expected size: 1585337 = lead(96)+sigs(344)+pad(0)+data(1584897) D: Actual size: 1585337 D: opening db environment /var/lib/rpm/Packages create:mpool D: opening db index /var/lib/rpm/Packages create mode=0x42 D: locked db index /var/lib/rpm/Packages D: opening db index /var/lib/rpm/Name create mode=0x42 D: added binary package [0] D: found 0 source and 1 binary packages D: ========== +++ mc-4.6.0-3 D: opening db index /var/lib/rpm/Depends create mode=0x42 D: opening db index /var/lib/rpm/Basenames create mode=0x42 D: Requires: /bin/sh YES (db files) D: Requires: /usr/bin/perl YES (db files) D: YES A config(mc) = 1:4.6.0-3 B config(mc) = 1:4.6.0-3 D: opening db index /var/lib/rpm/Providename create mode=0x42 D: YES A dev = 3.3.2-4 B dev >= 3.3-3 D: Requires: dev >= 3.3-3 YES (db provides) D: Requires: libICE.so.6 YES (db provides) D: Requires: libSM.so.6 YES (db provides) D: Requires: libX11.so.6 YES (db provides) D: Requires: libc.so.6 YES (db provides) D: Requires: libc.so.6(GLIBC_2.0) YES (db provides) D: Requires: libc.so.6(GLIBC_2.1) YES (db provides) D: Requires: libc.so.6(GLIBC_2.2) YES (db provides) D: Requires: libc.so.6(GLIBC_2.3) YES (db provides) D: Requires: libcom_err.so.2 YES (db provides) D: Requires: libext2fs.so.2 YES (db provides) D: Requires: libglib-2.0.so.0 YES (db provides) D: Requires: libgpm.so.1 YES (db provides) D: Requires: libslang-utf8.so.1 YES (db provides) D: Requires: perl(File::Basename) YES (db provides) D: Requires: perl(POSIX) YES (db provides) D: Requires: perl(bytes) YES (db provides) D: Requires: perl(strict) YES (db provides) D: NO A rpmlib(CompressedFileNames) <= 3.0.4-1 B rpmlib(VersionedDependencies) = 3.0.3-1 D: YES A rpmlib(CompressedFileNames) <= 3.0.4-1 B rpmlib(CompressedFileNames) = 3.0.4-1 D: Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 YES (rpmlib provides) D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(VersionedDependencies) = 3.0.3-1 D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(CompressedFileNames) = 3.0.4-1 D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(PayloadIsBzip2) = 3.0.5-1 D: YES A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(PayloadFilesHavePrefix) = 4.0-1 D: Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 YES (rpmlib provides) D: YES A rpmlib(VersionedDependencies) <= 3.0.3-1 B rpmlib(VersionedDependencies) = 3.0.3-1 D: Requires: rpmlib(VersionedDependencies) <= 3.0.3-1 YES (rpmlib provides) D: opening db index /var/lib/rpm/Conflictname create mode=0x42 D: ========== --- mc-4.6.0-1 D: opening db index /var/lib/rpm/Requirename create mode=0x42 D: closed db index /var/lib/rpm/Depends D: ========== recording tsort relations D: YES A config(mc) = 1:4.6.0-3 B config(mc) = 1:4.6.0-3 D: ignore package name relation(s) [0] libtermcap -> bash D: ignore package name relation(s) [1] modutils -> vixie-cron D: ignore package name relation(s) [2] ypbind -> yp-tools D: ignore package name relation(s) [3] ghostscript-fonts -> ghostscript D: ignore package name relation(s) [4] libgnomeprint15 -> gnome-print D: ignore package name relation(s) [5] nautilus -> nautilus-mozilla D: ignore package name relation(s) [6] tcl -> postgresql-tcl D: ignore package name relation(s) [7] arts -> kdelibs-sound D: ignore package name relation(s) [8] pango-gtkbeta-devel -> pango-gtkbeta D: ignore package name relation(s) [9] XFree86 -> Mesa D: ignore package name relation(s) [10] compat-glibc -> db2 D: ignore package name relation(s) [11] compat-glibc -> db1 D: ignore package name relation(s) [12] pam -> initscripts D: ignore package name relation(s) [13] initscripts -> sysklogd D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth) D: 0 0 1 0 0 mc-4.6.0-3 D: installing binary packages Preparing... ########################################### [100%] D: Expected size: 1585337 = lead(96)+sigs(344)+pad(0)+data(1584897) D: Actual size: 1585337 D: install: mc-4.6.0-3 has 145 files, test = 0 Segmentation fault Now, if I extract the contents of the old glibc package (-38) and copy ./lib/* /tmp/libc, and set that as the LD_LIBRARY_PATH: root@sunshine:/usr/new/RedHat/8.x/new # (export LD_LIBRARY_PATH=/tmp/libc; rpm -Uvh mc-4.6.0-3.i386.rpm) Preparing... ########################################### [100%] 1:mc ########################################### [100%] Please observe that the program "rpm" itself is statically linked, so shouldn't be influenced by libc or any LD_LIBRARY_PATH. But it's probably calling some other program - which I couldn't recognize in the strace. FWIW, there must be some kind of breakage in the backwards compatibility ABI of glibc. I'm aware of the above mentioned "extern errno" breakage, but assume that is willingly and won't be fixed, as I understand. This here though seems to be something different. Thanks for listening, Moritz P.S.: I will not swear about bugzilla. This is now my 4th attempt at entering. No. 1: Opera7/Linux crashed on "Commit". No. 2: Oper7/Win/JavaScript form returns: "The requested URL's length exceeds the capacity limit for this server." No. 3: Opera7/Win/Non-Javascript form: skipped it, Opera (or BugZilla?) inserts too many line breaks -> ugly. No. 4: w3m-0.4 under Linux. Fingers crossed.
Have you really installed just .i386.rpm glibc rpms or .i686.rpm ones where applicable? What kernel are you running? /bin/rpm used to be statically linked, yes, but it uses NSS plugins, ie. dlopens shared libraries and if you don't upgrade it, it gets confused by TLS stuff in NPTL libc.so etc. Alternatively, you could try ftp://people.redhat.com/jakub/glibc/errata/8.0/ which is the same glibc built without NPTL and a couple of other things.
I have installed just glibc{,-common,-devel}-2.3.1-51.i386.rpm. Definitely no i686 (I doublechecked), my arch is i586 (Pentium "1"). I'm running kernel 2.4.21-pre3-ac3 (or -ac2). Okay, so rpm dlopens (or used to dlopen) critical stuff, so this is a) a quite special case, general backwards compatibility not endangered b) a bit misleading because dlopened stuff isn't caught in the old (rpm's package) dependences. I have no idea what "TLS stuff in NPTL" means, I'll have to read up on it. I saw that remark in Bug #82505 (report). Will this be critical for many more old apps? Or only (but especially) the ones dlopening libc related stuff? Thanks, I'll check out your RPMs, Moritz
I did the same thing, as reported in Bug #86197. The fix was to manually install enough of rpm-4.2 (and libpopt from popt > 1.7 and libelf from elfutils-libelf-0.76) to get rpm working. Rpm-4.1 wasn't good enough. Once rpm works, install those packages for real, including rpm-{build,devel,python}. I also had to upgrade to nscd-2.3.2-11.9, as that was broken, too.
This is pretty old now. The resolution must be using LD_ASSUME_KERNEL=x.y.z, and then updating to NPTL conforming rpm (and other apps). I'm closing this, as this has been "solved" or explained in the same way in all related glibc/NPTL bug reports.