Bug 52942 - rpm crash with --force
Summary: rpm crash with --force
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-08-31 05:05 UTC by Dmitry Melekhov
Modified: 2007-04-18 16:36 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-31 14:59:59 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Dmitry Melekhov 2001-08-31 05:05:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010808

Description of problem:
rpm produce coredump when using -i with --force.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
rpm -i --force *.rpm

Actual Results:  core

Expected Results:  install package

Additional info:

Comment 1 Jeff Johnson 2001-08-31 12:18:38 UTC
First you probably want to be using -U rather than -i, which will lead
to multiple copies of packages installed.

Second, --force should not be routinely used.

Finally, the problem is probably with one of the *.rpm packages.
	for pkg in *.rpm
	    echo $pkg
	    rpm -K $pkg
looking for a damaged package.

Comment 2 Dmitry Melekhov 2001-08-31 12:24:09 UTC
* doesn't mean all files in dir, I did mistake.
I mean that rpm -i --force some_package.rpm or rpm -U --force some_package.rpm
produce core dump.

Comment 3 Jeff Johnson 2001-08-31 12:29:41 UTC
This works for me (rpm-4.0.3-1.01)
	bash$ sudo rpm -U --force uucp-1.06.1-30.i386.rpm --nodeps

What rpm package do you have installed?

Have you tried doing a rpm --rebuilddb? Many segfaults
in rpm are caused by bad records retrieved from the database.

What package are you installing? Have you run
	rpm -K somepackage*.rpm

Comment 4 Dmitry Melekhov 2001-08-31 12:49:32 UTC
Yes. I tried rebuilddb.
This problem occured when I tried to reinstall openldap-2.0.11 packadge.
I use rpm 4.0.2 (shipped with RH 7.1). 
btw, the same story with any packadge.

[root@dm i386]# rpm -i acl-1.1.2-0.i386.rpm
package acl-1.1.2-0 is already installed
[root@dm i386]# rpm -i --force acl-1.1.2-0.i386.rpm
Segmentation fault (core dumped)

I tried to upgrade to 4.0.3, but with no success- rpm produced
coredumps too.
I removed 4.0.2, copied rpm 4.0.3 from cpio, but I can't install it
by using rpm -i rpm-4.0.3.... , becuase it produce coredump.
Now I returned to 4.0.2 from cpio and again can't install it correctly from

Comment 5 Jeff Johnson 2001-08-31 12:54:48 UTC
OK, please attach a pointer (i.e. URL, bugzilla attachments won't work)
to a copy (the original if available) of your database
	cd /var/lib
	tar czf /tmp/rpmdb3-52942.tar.gz rpm
and I'll try to reproduce your problem.

Comment 6 Dmitry Melekhov 2001-08-31 14:13:09 UTC
OK. Thank you!

This is database, which I have now

Comment 7 Jeff Johnson 2001-08-31 14:59:54 UTC
Hmmmm, your database looks OK, at least at first blush.

You wouldn't be using LDAP for passwords, would you? If so, you
need to run nscd because of a obscure 2nd order library loading
issue with the PAM LDAP module. You might try using strace
	strace -o /tmp/xxx rpm -ivv --force openldap-2.0.11*.rpm
and attaching the output here.

Comment 8 Dmitry Melekhov 2001-08-31 15:19:50 UTC
Oops! Sorry! Now I know what caused rpm segfault.
I forget to remove ldap form passwd and group in /etc/nsswitch .
I added this after openldap installation for nss_ldap tecting with
openldap 2.0.
But after rebuilding openldap with another parameters and unuccessfull 
instalation I forget to remove this.
Thank you!
btw, I had the same misconfigurations with rpm 3.x and never see such

Note You need to log in before you can comment on or make changes to this bug.