Bug 107127 - rpm fails with segmentation fault, when --prefix is specified
Summary: rpm fails with segmentation fault, when --prefix is specified
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-15 08:29 UTC by Winfrid Tschiedel
Modified: 2007-11-30 22:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-26 00:40:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
rpm file to reproduce the error (65.93 KB, text/plain)
2004-01-14 13:07 UTC, Winfrid Tschiedel
no flags Details
rpm file to reproduce the error (65.93 KB, text/plain)
2004-01-15 10:46 UTC, Winfrid Tschiedel
no flags Details
Core file for rpm -iv --prefix (131.50 KB, application/octet-stream)
2004-03-10 16:07 UTC, Leonard den Ottolander
no flags Details

Description Winfrid Tschiedel 2003-10-15 08:29:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.8 [en] (Windows NT 5.0; U)

Description of problem:
rpm -ivh --prefix /opt/intel/compiler80  intel-icc8-8.0-38.i386.rpm   intel-isubh8-8.0-38.i386.rpm
Segmentation fault

Operation okay without --prefix option

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

How reproducible:
Always

Steps to Reproduce:
1. Need a relocatable product
2. install with rpm -iivh --prefix /abc
3.
    

Actual Results:  segmenation fault

Expected Results:  correct execution

Additional info:

Comment 1 Gene Czarcinski 2003-10-17 21:13:02 UTC
I am not sure I am see the same problem or not but I get a segment fault when I
try installing "old" rpms build on rhl 8 and rhl 9.  rpm is 4.2.1-0.30

Comment 2 Gene Czarcinski 2003-10-17 21:53:06 UTC
Something definitely strange here.

I tried another ("simple") rpm built on rhl 9 and tried installing it ... no
segfault this time, rpm just "hung".  After waiting a bit (about a minute), I
killed the rpm process, cleanup /var/lib/rpm/, did --rebuilddb (just to be
safe), and then tried the install again ... this time with the same package
build on FC1 T3 -- it installed fine (ten seconds total).

rpm -Uvh for src rpms seems to work fine.

Comment 3 Gene Czarcinski 2003-10-17 21:54:07 UTC
BTW, suggest subject be changed to just "rpm fails with segmentation fault"

Comment 4 Jeff Johnson 2003-10-18 13:32:28 UTC
Does this problem track with --prefix or not?

Seperate bug reports please. It's really hard to sort out
2 problems from the same report.

Comment 5 Barry K. Nathan 2003-10-18 14:05:45 UTC
Gene, would you mind telling us the names of at least some of the packages that
are segfaulting for you? Even naming just one or two of the packages would
greatly help others attempt to reproduce the problems -- especially since it
sounds like you might be seeing segfaults on some packages and freezes on
others, if I'm understanding your comments correctly.

Posting a separate bug report, as Jeff suggests, would be a great idea too. If
it turns out to be the same bug after all, it can be easily marked as a
duplicate later, and if it turns out to be a different bug than what Winfrid
reported, you'll save everyone else a lot of effort.

Comment 6 Gene Czarcinski 2003-10-18 14:15:10 UTC
OK, I will open another report for my problem.  I was going to at first but then
thought this was really the same problem.  I will create a new report.

The packages I started having the problem with were the VMware-workstation-3.2.0
and 4.0.5 packages (these can be downloaded from vmware).  I have no idea what
release thee were build on.

I then tried a package of my own that had been built on RHL8 and has few
dependencies.  This install hung.  A package rebuilt on FC1T3 installed.  I am
going to try the failing package again.  I can make this package available if
you need it.

I have also had up2date hang trying to install today's updates from rawhide.



Comment 7 Gene Czarcinski 2003-10-18 14:21:44 UTC
Then again, I guess I will not open a new report ... the problem has "disappeared".

I just successfully removed my package and installed the one that had hung
earlier.  I then successfully installed VMware-workstation-4.0.5 which had
gotten a segfault earlier.

I am unclear about the up2date hang at this time.

Between the hang/segfault problems and these successful installs, I did a
--rebuilddb.

Comment 8 Barry K. Nathan 2003-10-18 15:16:19 UTC
If you see segfaults or other problems again, try running:
/usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages
(hopefully I remembered that correctly)
and include the output (if any) in your bug report.

BTW, if up2date seems to be hanging, try giving it a *lot* of time (e.g., leave
it there for half an hour or an hour and see if it's still frozen). Particularly
on slower machines or when accessing large yum repos (think rawhide) over slow
connections, up2date can be slow and can seem frozen when it's really not. Also,
if you were using up2date 4.1.5, try 4.1.7 -- it seems a faster to me.

Comment 9 Winfrid Tschiedel 2003-10-21 05:49:39 UTC
This error occurred for the same level of rpm on RHEL 3.0 beta,
it is gone now, because rpm has now a higher level ( rpm-4.2.1-4.2 )
so you should use at least the same level on fedora.

Winfrid

Comment 10 Winfrid Tschiedel 2003-12-08 14:27:15 UTC
The segmentation fault of rpm with --prefix option fails still
with fedora core 1 release.
The problem could easily be solved with 
a higher version of rpm .

Could you please provide rpm-4.2.1-4.x for fedora in the fedora 
updates.

Thanks,

Winfrid

Comment 11 Jeff Johnson 2003-12-27 19:55:58 UTC
OK, there's at least 4 problems here, all different.

Please make a new bug report with a reproducible test case.
The version of rpm used and a ptr (i.e. URL) to the package are
absolutely essential for me to attempt to reproduce.

Winfrid: Where is intel-icc8-8.0-38.i386.rpm?

Comment 12 Winfrid Tschiedel 2004-01-07 16:34:59 UTC
Because I wrote, that you can produce this error with any 
rpm which is relocable I did not attach the rpm. 
The rpm is quite big so I looked for a smaller one.

Instructions to install ( to produce the error ) : 
rpm -ivh --prefix /opt/intel/compiler80 intel-iidb7-7.3.1-87.i386.rpm

Winfrid

PS: I tried to upload the rpm, but I am not allowed to transfer a file
> 1 mb, please advise me, or download Intel Compiler 8.0 ( either
fortran or c ++ )  from  www.intel.com/software/products/global/eval.htm

Comment 13 Winfrid Tschiedel 2004-01-14 13:07:26 UTC
Created attachment 96967 [details]
rpm file to reproduce the error

Finally I found a smaller rpm-file to reproduce the error :

[root@wv2-fedora l_cc_p_8.0.055]# !r
rpm -ivh --prefix /opt/intel/compiler80 intel-isubh8-8.0-44.i386.rpm
Segmentation fault


While rpm command without --prefix works :
[root@wv2-fedora l_cc_p_8.0.055]# rpm -ivh intel-isubh8-8.0-44.i386.rpm
Preparing...		    ########################################### [100%]
   1:intel-isubh8	    ########################################### [100%]

Regards,

Winfrid

Comment 14 Winfrid Tschiedel 2004-01-15 10:46:33 UTC
Created attachment 97009 [details]
rpm file to reproduce the error

Finally I found a smaller rpm-file to reproduce the error :

[root@wv2-fedora l_cc_p_8.0.055]# !r
rpm -ivh --prefix /opt/intel/compiler80 intel-isubh8-8.0-44.i386.rpm
Segmentation fault


While rpm command without --prefix works :
[root@wv2-fedora l_cc_p_8.0.055]# rpm -ivh intel-isubh8-8.0-44.i386.rpm
Preparing...		    ########################################### [100%]
   1:intel-isubh8	    ########################################### [100%]

Regards,

Winfrid

Comment 15 Richard Lee 2004-03-10 00:32:29 UTC
I am seeing this problem as well.  If I pass the "--prefix" flag, RPM
crashes with a seg fault.  Without the "--prefix" flag, it succeeds. 
Unfortunately, I can't send you the RPM in question as it is part of
our internal codebase.  I believe it was generated on a machine
running red hat 7.2 with rpm version 4.0.3.  Is there a short term fix
for this problem?  I am kind of dead-in-the-water for development
otherwise.

[b-5-x dev-x86 04:32 PM] rpm -hiv --test --nodeps --ignorearch
--prefix $TOOLROOT --dbpath
/home/trees/local/b-5-x/toolroot/var/lib/rpm
/home/trees/rpms/b-5-x/latest/dev-x86-tools/toolroot/tivotools-tools_ism-default-1.0-131854.i386.rpm
Segmentation fault
lauterbrunnen:/home/trees
[b-5-x dev-x86 04:32 PM] rpm -hiv --test --nodeps --ignorearch
--dbpath /home/trees/local/b-5-x/toolroot/var/lib/rpm
/home/trees/rpms/b-5-x/latest/dev-x86-tools/toolroot/tivotools-tools_ism-default-1.0-131854.i386.rpm
Preparing...               
########################################### [100%]
lauterbrunnen:/home/trees
[b-5-x dev-x86 04:33 PM]

Comment 16 Leonard den Ottolander 2004-03-10 16:06:04 UTC
Reproduced the seg fault with the rpm attached to comment 14. Funny
thing is I issued
$ rpm -iv --prefix /opt/intel/compiler80 intel-isubh8-8.0-44.i386.rpm
without adding "sudo". Still see a segfault.

Attaching core dump.


Comment 17 Leonard den Ottolander 2004-03-10 16:07:42 UTC
Created attachment 98427 [details]
Core file for rpm -iv --prefix

Comment 18 Richard Lee 2004-03-10 23:35:14 UTC
Any ETA on a fix?

Comment 19 Winfrid Tschiedel 2004-03-12 13:12:04 UTC
Hi,

I am currently on holiday, so I cannot check this item -
could you please check if this error exists on core 1.9x.

As I reported, this is a very old bug, but it has be corrected
on rhel 3.0 and rh 9.0 

Winfrid

Please check also fedora core 1 for x86_64

Comment 20 Gary Lerhaupt 2004-05-05 16:10:04 UTC
Dell is also seeing this issue on RHEL3.  If you take a RHEL3 gold 
install and then upgrade to all RHN latest packages (pre-Update2) our 
upcoming systems management driver RPM gets a segmentation fault when 
attempting to install it.  If the rpm is rebuilt to not use prefix, 
the rpm does not segfault.



Comment 21 Frank Hirtz 2004-05-07 15:45:41 UTC
I'm not able to get this to replicate on a current RHEL 3 system with
the attached RPM:

[root@dhcp170 tmp]# rpm -ivh --prefix /opt/intel/compiler80
intel-isubh8-8.0-44.i386.rpm
Preparing...               
########################################### [100%]
   1:intel-isubh8          
########################################### [100%]
[root@dhcp170 tmp]# rpm -ql intel-isubh8
/opt/intel/compiler80
/opt/intel/compiler80/bin
/opt/intel/compiler80/bin/uninstall.sh
/opt/intel/compiler80/substitute_headers
/opt/intel/compiler80/substitute_headers/libio.tar.gz
[root@dhcp170 tmp]# rpm -q rpm
rpm-4.2.1-4.4


Has anyone seen this particular package break for them in testing on
RHEL 3?

Comment 22 Winfrid Tschiedel 2004-05-10 11:38:37 UTC
Hi,

I cheked in the meantime fedora 1.91 for x86_64 - there is no 
problem, so I suppose that there will be no problem in the upcoming 
fedora core 2. In case of rhel 3.0 for ipf I saw this problem only in 
preproduction version.

Winfrid Tschiedel

Comment 23 Eugene Oden 2004-12-07 00:22:32 UTC
here's a fix for this problem: 
 
http://www.mail-archive.com/openpkg-dev%40openpkg.org/msg09531.html 

Comment 24 Jeff Johnson 2005-10-26 00:40:07 UTC
FWIW, the openpkg fix is insuffficient.

Otherewise this is fixed in rpm-4.4.2 and later afaik. Reopen if 4.4.2 does not solve the preoblem.


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