Bug 85504
Summary: | rpm produces segmentation fault when installing or removing some packages | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Keith Lea <keith> | ||||
Component: | rpm | Assignee: | Jeff Johnson <jbj> | ||||
Status: | CLOSED WORKSFORME | QA Contact: | Mike McLean <mikem> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.0 | CC: | pekkas | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-03-22 20:18:47 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Keith Lea
2003-03-03 20:30:30 UTC
Hmmm, are you using LDAP passwords? If so, you need to run nscd to avoid a segfault that affects statically linked binaries like /bin/rpm. I don't know what LDAP is, so no, I'm not using LDAP passwords. (And there's no administrator who would've installed such a thing for me - this is my own machine.) Are you running nscd? If not, can you start "/sbin/service nscd restart" and repeat? no, it was not running. after starting it I still get the same segfault with the same backtrace running rpm -e freetype-utils. OK. What's in /etc/nssswitch.conf? Try files first, make sure that all the users in the freetype package are known. What glibc? passwd: files nisplus shadow: files nisplus group: files nisplus hosts: files nisplus dns bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files nisplus rpc: files services: files nisplus netgroup: files nisplus publickey: nisplus automount: files nisplus aliases: files nisplus -- [root@localhost root]# rpm -q glibc glibc-2.3.1-51 -- I think you're assuming I know more about rpm and ns* than I do. What does "Try files first, make sure that all the users in the freetype package are known" mean? Ah, sorry. The backtrace from getpwnam on is trying to look up a user name for a file through glibc (see man 3 getpwnam). The dl_* routines are an indication that something (like LDAP, one means to look up users, NIS is another, /etc/passwd aka files is a 3rd way) is fubar. A segfault often happens with /bin/rpm, a statically linked binary, which is more sensitive to structure changes (there are a few) and linkage through helper libraries. So, you have files first, which should use /etc/passwd, but there appears to be a further lookup through nisplus. What happens if you edit /etc/nssswitch.conf and delete "nisplus" on the passwd/shadow/group lines? Save a copy, duh ... same problem. do I need to restart anything after editing it? OK. No nothing needs restarting. An strace should give a hint as to what file is being loaded, and from that I might be able to guess what is happening. Can you try strace -f -o /tmp/xxx the_command_here and attach /tmp/xxx? Thanks. Created attachment 90469 [details]
strace output for rpm -e freetype-utils
here you go.
please help me Jeff, I still can't install or remove packages at all :( OK. The strace indicates nscd running with successful root lookup. Can you try attaching the output of strace -o /tmp/xxx rpm -evv freetype-utils The -vv will help me figger where the program is segfaulting. if you want the /tmp/xxx too, I can attach that, but i assume it's the same as last time... D: opening db environment /var/lib/rpm/Packages joinenv D: opening db index /var/lib/rpm/Packages rdonly mode=0x0 D: locked db index /var/lib/rpm/Packages D: opening db index /var/lib/rpm/Name rdonly mode=0x0 D: opening db index /var/lib/rpm/Pubkeys rdonly mode=0x0 D: read h# 663 Header sanity check: OK D: ========== DSA pubkey id 219180cddb42a60e D: read h# 819 Header V3 DSA signature: OK, key ID db42a60e D: ========== --- freetype-utils-2.1.2-7 D: opening db index /var/lib/rpm/Requirename rdonly mode=0x0 D: closed db index /var/lib/rpm/Pubkeys D: closed db index /var/lib/rpm/Requirename D: closed db index /var/lib/rpm/Name D: closed db index /var/lib/rpm/Packages D: closed db environment /var/lib/rpm/Packages D: opening db environment /var/lib/rpm/Packages joinenv D: opening db index /var/lib/rpm/Packages create mode=0x42 D: getting list of mounted filesystems D: sanity checking 1 elments D: computing 4 file fingerprints D: computing file dispositions D: opening db index /var/lib/rpm/Basenames create mode=0x42 D: ========== --- freetype-utils-2.1.2-7 D: erase: freetype-utils-2.1.2-7 has 4 files, test = 0 D: opening db index /var/lib/rpm/Name create mode=0x42 D: read h# 819 Header V3 DSA signature: OK, key ID db42a60e If that's all the output, then instance #819 is probably damaged. Can you give me a pointer (i.e. URL, attachments won't work) to a tarball of you database cd /var/lib tar czvf /tmp/rpmdb-85504.tar.gz rpm and I'll zap record #819 note that freetype-utils isn't the only package that crashes on erase. http://www.kano.net/in/rpmdb.tar.gz Hmmm, you database looks fine, signatures/digests are being verified, so it's impossible that the data is corrupt or modified. Here's what I see for, say, freetype-utils: ... D: read h# 819 Header V3 DSA signature: OK, key ID db42a60e D: +++ h# 484 Header V3 DSA signature: OK, key ID db42a60e D: adding "freetype-utils" to Name index. D: adding 4 entries to Basenames index. D: adding "System Environment/Libraries" to Group index. D: adding 9 entries to Requirename index. D: adding "freetype-utils" to Providename index. D: adding "/usr/bin/" to Dirnames index. D: adding 9 entries to Requireversion index. D: adding "2.1.2-7" to Provideversion index. D: adding 1 entries to Installtid index. D: adding 1 entries to Sigmd5 index. D: adding "dd89f5af8c5406f45bfcb2a0360a1fdedc008c01" to Sha1header index. D: adding 4 entries to Filemd5s index. So there's something else local to your machine that's causing the problem Let's see if this problem can't be bracketed. You're currently running rpm-4.1-1.06. Can you try rpm-4.1-9 packages from ftp://people.redhat.com/jbj/test-4.1 You'll have to install manually, so do the following: cd /var/tmp <download all the packages, don't forget popt> mkdir xxx cd xxx for i in ../{rpm,popt}-*.rpm do echo $i --- rpm2cpio $i | cpio -dim done find . -type d -exec chmod 755 {} \; tar cf - . | (cd /; tar xvf -) and see if same segfault? If segfault then there's something wrong with your pam modules is my guess. everything works now :) thanks a ton. is there anything else I should do? If you added "private" to /etc/rpm/macros, then you might want to remove. Otherwise, maybe a --rebuilddb. You ought to figger what happened, however. If a manual rpm2cpio "fix"ed, then your files were damaged somehow. We noticed the same problems with RHL8 rpm. The same procedure for replacing RPM worked fine for us. |