Description of problem: If relative path to /etc/skel/.bash_profile is given to rpm -qf a segfault happens (but only if executed by root). Version-Release number of selected component (if applicable): 4.2.1-0.30 How reproducible: Happens always Steps to Reproduce: 1. su - 2. cd /etc/skel 3. rpm -qf .bash_profile Actual results: Segmentation fault (core dumped) Expected results: bash-2.05b-31
Works fine here with rpm-4.2.2. Please attach rpm -qf -vv output. You might also try rpm -qf --nosignature .bash_profile
Output from "-qf -vv .bash_profile": D: unshared posix mutexes found(38), adding DB_PRIVATE, using fcntl lock D: opening db environment /var/lib/rpm/Packages create:cdb:mpool:private 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/Basenames rdonly mode=0x0 D: opening db index /var/lib/rpm/Pubkeys rdonly mode=0x0 D: read h# 1459 Header sanity check: OK D: ========== DSA pubkey id b44269d04f2a6fd2 D: read h# 33 Header V3 DSA signature: OK, key ID 4f2a6fd2 bash-2.05b-31 D: closed db index /var/lib/rpm/Pubkeys D: closed db index /var/lib/rpm/Basenames D: closed db index /var/lib/rpm/Packages D: closed db environment /var/lib/rpm/Packages output from "rpm -qf --nosignature .bash_profile": bash-2.05b-31 I found this a litle strange, so I tried with Electric Fence. Now it generates a segfault even with "-vv", and that happens no matter who runs the command, so it seems Electric Fence does make it easier to reproduce the problem. Output from "ef rpm -qf -vv .bash_profile": Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce> Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce> D: unshared posix mutexes found(38), adding DB_PRIVATE, using fcntl lock D: opening db environment /var/lib/rpm/Packages create:cdb:mpool:private 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/Basenames rdonly mode=0x0 D: opening db index /var/lib/rpm/Pubkeys rdonly mode=0x0 D: read h# 1459 Header sanity check: OK D: ========== DSA pubkey id b44269d04f2a6fd2 D: read h# 33 Header V3 DSA signature: OK, key ID 4f2a6fd2 /usr/bin/ef: line 20: 4408 Segmentation fault ( export LD_PRELOAD=libefence.so.0.0; exec $* )
Try rm -f /var/lib/rpm/Pubkeys rpm --rebuilddb -vv If that fixes the problem, then this is probably a duplicate of #107835, fixed in rpm-4.2.2-0.6. Does that "fix"? BTW, you should upgrade to a NPTL aware kernel and glibc (from RHL 9.0 at least) if you want to use rpm-4.2 or later.
The suggested rebuild of the database made the symptoms go away. But running under Electric Fence it still segfaults. I tried the patch for bug #107835. The last of the three hunks in the patch were already applied to the rpm version on my system. Applying the first two hunks from that patch seems to have solved the problem. I mark this bug a duplicate. BTW Fedora Core already uses an nptl aware kernel-2.4.22-1.2129.nptl and a more recent glibc than RHL 9.0. *** This bug has been marked as a duplicate of 107835 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.