Bug 52942 - rpm crash with --force
rpm crash with --force
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-31 01:05 EDT by Need Real Name
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-31 10:59:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-08-31 01:05:43 EDT
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:
Always

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

Actual Results:  core

Expected Results:  install package

Additional info:
Comment 1 Jeff Johnson 2001-08-31 08:18:38 EDT
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.
Try
	for pkg in *.rpm
	do
	    echo $pkg
	    rpm -K $pkg
	done
looking for a damaged package.
Comment 2 Need Real Name 2001-08-31 08:24:09 EDT
* 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 08:29:41 EDT
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 Need Real Name 2001-08-31 08:49:32 EDT
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
rpm.
Comment 5 Jeff Johnson 2001-08-31 08:54:48 EDT
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 Need Real Name 2001-08-31 10:13:09 EDT
OK. Thank you!

This is database, which I have now
ftp://ftp2.aspec.ru/incoming/rpm/rpmdb3-52942.tar.gz
Comment 7 Jeff Johnson 2001-08-31 10:59:54 EDT
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 Need Real Name 2001-08-31 11:19:50 EDT
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
behavior.

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