Bug 88839 - a Segmentation fault with rpm -ivv
a Segmentation fault with rpm -ivv
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-14 15:47 EDT by John C Mann
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-19 15:00:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John C Mann 2003-04-14 15:47:47 EDT
Description of problem:
Segmentation fault when running "rpm -ivv" to install alsa-kernel... rpm file


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


How reproducible: 2 out of 2 attempts


Steps to Reproduce:
1. [root@dhcppc3 i686]# rpm -ivv alsa-kernel-0.9.2-fr2_2.4.20_6.i686.rpm
2.
3.
    
Actual results:


Expected results:


Additional info:
Comment 1 Jeff Johnson 2003-04-15 16:24:41 EDT
Sanity check: Can you install any package?
Comment 2 Ali-Reza Anghaie 2003-04-15 22:15:46 EDT
I ran into something similar. rpm -ivh would segfault. Add --test, just fine. Use just rpm -i, just 
fine. rpm -Uvh, just fine. Just -ivh on its own would segfault. I'd have to clean-up the __db* 
files. 
 
What worried me though is that on further examination and repetition I noticed that the rpm -ivh 
would actually install all the files but didn't update the RPM DB. I was told that wasn't really 
possible, that confuses me. 
 
Can you provide a URL for the RPM you were having the problem with? The RPM I ran into the 
problem with is internal to Pratt & Whitney and I can't share. Although I could post the .spec 
file. Hrmm. -Ali 
Comment 3 John C Mann 2003-04-16 04:38:34 EDT
   Hello Ali and Jeff and others. Ali inquired about the URL of the rpm that I
was having the SegFault problem with. This alsa-kernel... rpm was the result of
rpmbuild-ing the
http://ftp.freshrpms.net/pub/freshrpms/redhat/9/alsa/driver/alsa-driver-0.9.2-fr2.src.rpm
file using the command
# rpmbuild -ba -v --clean --rmspec --target i686 SPECS/alsa-driver.spec and this
caused the alsa-kernel-0.9.2-fr2_2.4.20_6.i686.rpm file to be generated and
appear in my /usr/src/redhat/RPMS/i686 directory. THAT alsa-kernel... rpm file
was the one that caused the SegFault with rpm -ivv. Not one that I downloaded. 
   I will try your simpler rpm -i to install my rpmbuild-generated
alsa-kernel-0.9.2-fr2_2.4.20_6.i686.rpm file later today (after filing my
taxes!) and see if it goes okay, and further whether I can get sound to work on
my system. Thanks for the tip, Ali. 
John
Comment 4 John C Mann 2003-04-16 04:47:13 EDT
Hello all. I just tried rpm-installing that rpmbuild'd alsa-kernel rpm using
Ali's rpm -i command. It worked! Here's the total transcript:

[root@dhcppc3 redhat]# ls RPMS/i686
alsa-driver-0.9.2-fr2.i686.rpm            alsa-kernel-0.9.2-fr2_2.4.20_6.i686.rpm
alsa-driver-debuginfo-0.9.2-fr2.i686.rpm
[root@dhcppc3 redhat]# cd RPMS/i686/
[root@dhcppc3 i686]# rpm -i alsa-kernel-0.9.2-fr2_2.4.20_6.i686.rpm
error: Failed dependencies:
        alsa-driver = 0.9.2 is needed by alsa-kernel-0.9.2-fr2_2.4.20_6
[root@dhcppc3 i686]# rpm -i alsa-driver-0.9.2-fr2.i686.rpm
[root@dhcppc3 i686]# rpm -i alsa-kernel-0.9.2-fr2_2.4.20_6.i686.rpm
[root@dhcppc3 i686]#

So now I can download the alsa-utils and see if my sound works. (Taxes to be
done later today).
John
Comment 5 Jeff Johnson 2003-04-16 14:32:59 EDT
Presumably this is now fixed.
Comment 6 Ali-Reza Anghaie 2003-04-16 15:00:17 EDT
Umm. Where is it fixed? Did you find a problem? RAWHIDE? It certainly doesn't 
WORKFORME or the above. There is still a problem we're hitting. Did you try a "rpm -ivv" of 
his setup above? If it didn't fail for you I'd like to send you traces and encourage the original 
submitter to do the same. Thoughts? -Ali 
Comment 7 Jeff Johnson 2003-04-16 15:04:56 EDT
The claim was that rpm -i "worked". If there's more to do, then
reopen the bug and give me more info in what the problem is.
Comment 8 John C Mann 2003-04-16 16:17:32 EDT
Ah yes, Jeff, I reported that "rpm -i" did indeed work, after a suggestion by
Ali I believe. But "rpm -ivv"  leads to the SegFault. So the double-verbose
switch causes the problem, it appears. The devil is in the details it appears.
John Mann

P.S. - this is Ali's post from yesterday (Tuesday):

------- Additional Comments From ali@packetknife.com  2003-04-15 22:15 
-------
I ran into something similar. rpm -ivh would segfault. Add --test, just 
fine. Use just rpm -i, just 
fine. rpm -Uvh, just fine. Just -ivh on its own would segfault. I'd 
have to clean-up the __db* 
files. 
 
What worried me though is that on further examination and repetition I 
noticed that the rpm -ivh 
would actually install all the files but didn't update the RPM DB. I 
was told that wasn't really 
possible, that confuses me. 
 
Can you provide a URL for the RPM you were having the problem with? The 
RPM I ran into the 
problem with is internal to Pratt & Whitney and I can't share. Although 
I could post the .spec 
file. Hrmm. -Ali 
Comment 9 Ali-Reza Anghaie 2003-04-17 20:15:19 EDT
BTW, grab the apt RPM from freshrpms.net. That segfaults on me without a rebuild or anything 
as such... 
 
rpm -ivh faults without doing anything. 
rpm -i installs everything but doesn't ever come back and doesn't update the rpm DB. 
rpm -Uvh installs just fine. 
 
apt-0.5.5cnc5-fr2.i386.rpm 
 
Is the RPM used. I don't use apt except to update other packages from freshrpms... 
interesting. 
 
Cheers, -Ali 
Comment 10 Jeff Johnson 2003-04-21 11:12:07 EDT
Ali: apt-0.5.5cnc5-fr2.i386.rpm installs for me using rpm-4.2-1.
John: Ditto, using "-ivv", not "-i".

So something else is needed to reproduce the problem. What is it?
Comment 11 Ali-Reza Anghaie 2003-04-21 11:26:58 EDT
So are you suggesting we update to Rawhide's RPM and try again? RHL 9 RPM is 
rpm-4.2-0.69 .. 
 
I'll do that later and try try try again. Perhaps the bug was fixed / is different in the Rawhide 
rpm. 
 
Thanks, -Ali 
Comment 12 Jeff Johnson 2003-04-21 11:40:43 EDT
No segfault with either "-i" or "-ivv" on apt-0.5.5cnc5-fr2.i386.rpm
using rpm-4.2-0.69.

Again, what's different here?
Comment 13 Ali-Reza Anghaie 2003-04-21 11:52:52 EDT
My entry on 2003-04-17 20:15 indicates the -ivh faults on me, -i doesn't fault but never comes 
back (does the install but doesn't update DB), and -Uvh works fine. Each step done after a 
RPM DB clean-up and rpm -e if it installed succesfully. 
 
I've run memory tests here, everytihng else seems to be fine. Bizarre. 
 
When I get to a point I can afford to goof-around again I will do traces and more testing. 
Anything besides a strace you'd like to see Jeff? 
 
This has come up in #redhat on Freenode too. It seems common enough.. hrmm. 
 
Cheers and thanks, update you tonight, -Ali 
Comment 14 Jeff Johnson 2003-04-21 11:57:42 EDT
I can try "-ivh", but I strongly doubt that's the difference.

I suspect that there's some problem mixing and matching
kernel, glibc, rpm, and apt. Dunno what the common element
is yet.

One thing to try is rpm-4.1.1 (from ftp://ftp.rpm.org/pub/rpm/test-4.1.1)

rpm-4.1.1 is the same code as rpm-4.2, but compiled w/o posix mutexes
(rpm's only dependency on NPTL/TLS kernel/glibc code).
Comment 15 Ali-Reza Anghaie 2003-04-21 12:05:05 EDT
BTW, glibc-2.3.2-27.9 and kernel-2.4.20-9. And note that I've had this problem with a lot more 
than APT. That was just the example above. I've had it with RPMs I've build, others, etc. 
 
I'll try your RPM later. Cheers, -Ali 
 
 
Comment 16 Jeff Johnson 2003-04-21 12:07:11 EDT
Again, I dunno common factor.

I'd suggest trying glibc and kernel from Red Hat 9. That's
what I am using (or closest approximation anyways).
Comment 17 Ali-Reza Anghaie 2003-04-22 04:52:37 EDT
Jeff, I _am_ using RHL 9... unless using errata was a bad thing. And I haven't seen the 
segfault yet when using just '-i'... I see it more often with '-ivh'.. 
 
I pulled popt-1.7.1-1.8x and rpm-4.1.1-1.8x to test with and I'll keep you posted. 
 
One thought, could prelink make a difference? If a system was prelink(ed) (then reboot of 
course). Curious. Cheers, -Ali 
 
Comment 18 Jeff Johnson 2003-04-22 09:00:18 EDT
prelink might be the difference, but there needs to be smoke
from the gun. ;-)

If Red Hat 9, then rpm-4.2 (with posix-mutexes) is probably
better than 4.1.1, but I don't know of any reason you can't
use rpm-4.1.1.

Here's what I see with -ivh:

bash$ sudo rpm -ivh apt-0.5.5cnc5-fr2.i386.rpm 
warning: apt-0.5.5cnc5-fr2.i386.rpm: V3 DSA signature: NOKEY, key ID e42d547b
Preparing...                ########################################### [100%]
   1:apt                    ########################################### [100%]



Comment 19 Ali-Reza Anghaie 2003-04-24 21:10:42 EDT
Ok. Once all prelinking was undone a few days back, I haven't been able to replicate the 
problem. I'd rather ~not~ close the bug yet but I'll acknowledge it might not need to be 
assigned against rpm/jbj anymore. I'll leave that up to the Mad Hatters to decide. Cheers, -Ali 
Comment 20 Jeremy Katz 2005-04-19 15:00:16 EDT
Closing due to inactivity.  If this is still occurring on more current releases,
please reopen with details on the failures there.

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