Bug 62959 - Rpm segfaults installing freshly build package
Summary: Rpm segfaults installing freshly build package
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-08 13:29 UTC by Frank Sweetser
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-04-09 14:58:08 UTC
Embargoed:


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

Description Frank Sweetser 2002-04-08 13:29:51 UTC
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 13:31:50 UTC
Created attachment 52644 [details]
Strace log of rpm segfaulting on package upgrade

Comment 2 Frank Sweetser 2002-04-08 13:50:04 UTC
Did a bit more testing.

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

 - 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 19:16:28 UTC
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 19:30:38 UTC
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 23:06:05 UTC
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
nscd.

Comment 6 Frank Sweetser 2002-04-09 00:48:46 UTC
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-09 00:49:35 UTC
Created attachment 52804 [details]
Output of rpm -Uvv on audofile rpms

Comment 8 Jeff Johnson 2002-04-09 14:14:45 UTC
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 14:24:00 UTC
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 14:43:14 UTC
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 14:58:01 UTC
The rawhide version (rpm-4.0.4-7x.12) seems to work fine.

Comment 12 Jeff Johnson 2002-04-09 18:57:35 UTC
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.