Bug 75146

Summary: rpm crashes when installing a custom built rpm
Product: [Retired] Red Hat Linux Reporter: Nathan G. Grennan <redhat-bugzilla>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 8.0CC: dag
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-04 20:41:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nathan G. Grennan 2002-10-04 19:46:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020827

Description of problem:
I took the wine spec file and modified it to work with wine-20020904. Then I
compiled it and tried to install it with rpm -i it segmentation faults.

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


How reproducible:
Always

Steps to Reproduce:
1. rpm -i wine-20020904-1.athlon.rpm
2.
3.
	

Actual Results:  zsh: segmentation fault  rpm -i
/var/builder/rpmbuild/RPMS/wine-20020904-1.athlon.rpm

or

Segmentation fault
with bash

Expected Results:  Return to prompt

Additional info:

Below is output from gdb and strace. This is happening on a clean install of
RedHat 8.0 with miminal changes.



Starting program: /bin/rpm -i /var/builder/rpmbuild/RPMS/wine-20020904-1.athlon.rpm

Program received signal SIGSEGV, Segmentation fault.
0x0817881a in _int_malloc ()


open("/var/lib/rpm/Pubkeys", O_RDONLY|O_LARGEFILE) = 5
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=12288, ...}) = 0
_llseek(5, 0, [0], SEEK_SET)            = 0
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 256) = 256
close(5)                                = 0
open("/var/lib/rpm/Pubkeys", O_RDONLY|O_LARGEFILE) = 5
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=12288, ...}) = 0
pread(5, "\0\0\0\0\0\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 4096, 0) =
4096
brk(0x8289000)                          = 0x8289000
pread(5, "\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\2\0\356\17\0\2"..., 4096,
4096) = 4096
brk(0x828a000)                          = 0x828a000
pread(3, "\0\0\0\0\1\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\6\1M\7\0\2\373"..., 4096,
8192) = 4096
brk(0x828b000)                          = 0x828b000
pread(3, "\0\0\0\0\1\0\0\0\216\30\0\0\0\0\0\0\0\0\0\0\1\0\230\16"..., 4096,
25747456) = 4096
brk(0x828c000)                          = 0x828c000
brk(0x828d000)                          = 0x828d000
rt_sigprocmask(SIG_BLOCK, ~[], [RTMIN], 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

Comment 1 Jeff Johnson 2002-10-04 20:22:47 UTC
This smells like a damaged header in the database.

What happens if you do rpm --rebuilddb ?


Comment 2 Nathan G. Grennan 2002-10-04 20:41:34 UTC
rpm --rebuilddb and then rpm -i worked

Comment 3 Jeff Johnson 2002-10-04 21:20:28 UTC
Hmmm, there should have been an error message
complaining about some (damaged) header as well.

FYI, the final release of rpm-4.1 on ftp.rpm.org
provides slighlt more detailed info on the type
of damage than rpm-4.1-1.06 from Red Hat 8.0,
but either version will handle damaged headers
with --rebuilddb equally well.