Bug 62959 - Rpm segfaults installing freshly build package
Rpm segfaults installing freshly build package
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2002-04-08 09:29 EDT by Frank Sweetser
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-09 10:58:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Strace log of rpm segfaulting on package upgrade (27.18 KB, text/plain)
2002-04-08 09:31 EDT, Frank Sweetser
no flags Details
Output of rpm -Uvv on audofile rpms (1.91 KB, text/plain)
2002-04-08 20:49 EDT, Frank Sweetser
no flags Details

  None (edit)
Description Frank Sweetser 2002-04-08 09:29:51 EDT
RedHat 7.2 + errata, rpm-4.0.4-7x.  Downloaded and rpm --rebuild on
audiofile-0.2.3-1.src.rpm from rawhide, worked fine with no errors and produced
audiofile and audiofile-devel .i386.rpm packages.  However, installing them (via
-Fvh or -Uvh) produces a segfault.

More information, including the relevant binary rpm files, availible on request.
 Output of strace -f attached.
Comment 1 Frank Sweetser 2002-04-08 09:31:50 EDT
Created attachment 52644 [details]
Strace log of rpm segfaulting on package upgrade
Comment 2 Frank Sweetser 2002-04-08 09:50:04 EDT
Did a bit more testing.

 - rpm -e --nodeps audofile-devel, and just rpm -Uvh audiofile, which then works

 - rpm -Uvh audiofile-devel, and it errors out with requires pkgconfig >= 0.8 
Install 0.12 from rawhide, and it installs fine.

 - rolling back to stock 7.2 audiofile and rpm -Fvh still fails, even with newer
pkgconfig already installed.
Comment 3 Jeff Johnson 2002-04-08 15:16:28 EDT
Try rpm --rebuilddb, test with rpm -qa, using rpm-4.0.4.

If rpm -qa segfaults, reopen this bug with a pointer
(i.e. URL, attachments won't work) to a tarball
of your database
	cd /var/lib
	tar czvf /tmp/rpmdb-62959.tar.gz rpm
and I'll see if I can get you a fix.
Comment 4 Frank Sweetser 2002-04-08 15:30:38 EDT
Okay.  I did

 rpm -Uvh --oldpackage audiofile*.rpm to roll back to the stock 7.2 packages.
 rpm --rebuilddb
 rpm -qa > /dev/null ; echo $? produced no errors and returned 0
 rpm -Uvh audiofile*.rpm on the files built from rawhide srpms segfaulted.

RPM database is at http://erwin.wpi.edu/~fs/rpmdb-62959.tar.gz

More experimenting - 

rpm -Uvh audiofile-0.2.3-1.i386.rpm audiofile-devel-0.2.3-1.i386.rpm 

segfaults, while

rpm -Uvh audiofile-devel-0.2.3-1.i386.rpm audiofile-0.2.3-1.i386.rpm 

works fine.
Comment 5 Jeff Johnson 2002-04-08 19:06:05 EDT
You rpmdb looks OK.

The strace would seem to indicate a problem in the Providename
index. An rpm --rebuilddb will rebuild the indices.

Next problem:

What does
    rpm -Uvv audiofile-0.2.3-1.i386.rpm audiofile-devel-0.2.3-1.i386.rpm
have to say?

Do the binary packages from Raw Hide exhibit the same behavior?

Are you using LDAP passwords? If so, make sure you are running
Comment 6 Frank Sweetser 2002-04-08 20:48:46 EDT
rpm -Uvv log attached.

Binary rpms from rawhide die at the same point.

And no, I'm not using LDAP passwords, just local.
Comment 7 Frank Sweetser 2002-04-08 20:49:35 EDT
Created attachment 52804 [details]
Output of rpm -Uvv on audofile rpms
Comment 8 Jeff Johnson 2002-04-09 10:14:45 EDT
Hmmm, a pure install (i.e. audiofile not currently
installed) works fine for me:
	rpm -Uvv audiofile-0.2.3-1.i386.rpm audiofile-devel-0.2.3-1.i386.rpm
Are you upgrading from previous or installing?
Have you tried erasing before installing?
Comment 9 Frank Sweetser 2002-04-09 10:24:00 EDT
rpm -e audiofile audiofile-devel, then rpm -Uvv audiofile audiofile-devel dies
with the same log messages.

rpm --rebuilddb with the packages not installed, and rpm -Uvv still fails with
the same log message.
Comment 10 Jeff Johnson 2002-04-09 10:43:14 EDT
OK, I still can't reproduce using your
database and rpm-4.0.4-7x.14. The only
difference I can see is the version of
rpm used. Try the latest Raw Hide version
of rpm.
Comment 11 Frank Sweetser 2002-04-09 10:58:01 EDT
The rawhide version (rpm-4.0.4-7x.12) seems to work fine.
Comment 12 Jeff Johnson 2002-04-09 14:57:35 EDT
Ah yes. There's an off by one problem in
rpm-4.0.3 and rpm-4.0.4 "official" (fixed in -7x.mumble)
that, in obscure condiitions dependent on command line
ordering and the last element of certain package provides
arrays, walks off the end of an array and segfaults.

Sorry it took so long to remember, most segfaults in rpm are
bad data.

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