Bug 109801 - rpm segfault on package erase
Summary: rpm segfault on package erase
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.3
Hardware: i686
OS: Linux
high
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-11 22:43 UTC by Nathan Jahnke
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-28 06:46:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Nathan Jahnke 2003-11-11 22:43:58 UTC
Description of problem:
had:

MySQL-client-4.0.16-0
MySQL-server-4.0.16-0
MySQL-devel-4.0.16-0

installed, when trying:

[root@www rpm]# rpm -e -vv MySQL-client-4.0.16-0 MySQL-server-4.0.16-0
MySQL-devel-4.0.16-0
D: opening  db environment /var/lib/rpm/Packages create:mpool
D: opening  db index       /var/lib/rpm/Packages  mode=0x82
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Name  mode=0x82
D: ========== --- MySQL-client-4.0.16-0
D: opening  db index       /var/lib/rpm/Requirename  mode=0x82
D: ========== --- MySQL-server-4.0.16-0
D: ========== --- MySQL-devel-4.0.16-0
D: opening  db index       /var/lib/rpm/Basenames  mode=0x82
D:     erase: MySQL-devel-4.0.16-0 has 46 files, test = 0
Segmentation fault

last few lines of strace:

old_mmap(NULL, 151552, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40191000
stat64("/usr/share/doc/foomatic-1.1", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0000\10\0\0\0\0\0\0001\10\0\0\1\0\346\17"...,
4096, 8585216) = 4096
pread(3, "\0\0\0\0\1\0\0\0001\10\0\0000\10\0\0002\10\0\0\1\0\346"...,
4096, 8589312) = 4096
pread(3, "\0\0\0\0\1\0\0\0002\10\0\0001\10\0\0003\10\0\0\1\0\346"...,
4096, 8593408) = 4096
pread(3, "\0\0\0\0\1\0\0\0003\10\0\0002\10\0\0\0\0\0\0\1\0\n\16\0"...,
4096, 8597504) = 4096
munmap(0x40191000, 151552)              = 0
stat64("/usr/share/doc/xinetd-2.3.9", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0005\10\0\0\0\0\0\0006\10\0\0\1\0\346\17"...,
4096, 8605696) = 4096
pread(3, "\0\0\0\0\1\0\0\0006\10\0\0005\10\0\0007\10\0\0\1\0\346"...,
4096, 8609792) = 4096
pread(3, "\0\0\0\0\1\0\0\0007\10\0\0006\10\0\0\0\0\0\0\1\0X\4\0\7"...,
4096, 8613888) = 4096
stat64("/usr/share/doc/alchemist-1.0.18", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0=\10\0\0\0\0\0\0>\10\0\0\1\0\346\17\0\7"...,
4096, 8638464) = 4096
pread(3,
"\0\0\0\0\1\0\0\0>\10\0\0=\10\0\0\0\0\0\0\1\0\16\10\0\007"..., 4096,
8642560) = 4096
stat64("/usr/share/doc/slocate-2.6", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0?\10\0\0\0\0\0\0@\10\0\0\1\0\346\17\0\7"...,
4096, 8646656) = 4096
pread(3, "\0\0\0\0\1\0\0\0@\10\0\0?\10\0\0\0\0\0\0\1\0v\0\0\7?\0"...,
4096, 8650752) = 4096
stat64("/usr/share/doc/patch-2.5.4", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0t\10\0\0\0\0\0\0u\10\0\0\1\0\346\17\0\7"...,
4096, 8863744) = 4096
pread(3,
"\0\0\0\0\1\0\0\0u\10\0\0t\10\0\0v\10\0\0\1\0\346\17\0\007"..., 4096,
8867840) = 4096
pread(3, "\0\0\0\0\1\0\0\0v\10\0\0u\10\0\0w\10\0\0\1\0\346\17\0\7"...,
4096, 8871936) = 4096
pread(3, "\0\0\0\0\1\0\0\0w\10\0\0v\10\0\0\0\0\0\0\1\0\206\n\0\7"...,
4096, 8876032) = 4096
stat64("/usr/share/doc/freetype-2.0.3", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0|\10\0\0\0\0\0\0\0\0\0\0\1\0|\r\0\7\0\0"...,
4096, 8896512) = 4096
stat64("/usr/share/doc/time-1.7", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
pread(3, "\0\0\0\0\1\0\0\0\215\10\0\0\0\0\0\0\216\10\0\0\1\0\346"...,
4096, 8966144) = 4096
pread(3, "\0\0\0\0\1\0\0\0\216\10\0\0\215\10\0\0\0\0\0\0\1\0\202"...,
4096, 8970240) = 4096
stat64("/usr/share/doc/radvd-0.6.2pl4", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0\221\10\0\0\0\0\0\0\222\10\0\0\1\0\346"...,
4096, 8982528) = 4096
pread(3, "\0\0\0\0\1\0\0\0\222\10\0\0\221\10\0\0\0\0\0\0\1\0\226"...,
4096, 8986624) = 4096
stat64("/usr/lib/perl5/site_perl/5.6.0/i386-linux/XML/Parser/Encodings",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/share/doc/perl-XML-Parser-2.30", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0\223\10\0\0\0\0\0\0\224\10\0\0\1\0\346"...,
4096, 8990720) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\224\10\0\0\223\10\0\0\225\10\0\0\1\0\346"..., 4096,
8994816) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\225\10\0\0\224\10\0\0\226\10\0\0\1\0\346"..., 4096,
8998912) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\226\10\0\0\225\10\0\0\227\10\0\0\1\0\346"..., 4096,
9003008) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\227\10\0\0\226\10\0\0\230\10\0\0\1\0\346"..., 4096,
9007104) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\230\10\0\0\227\10\0\0\231\10\0\0\1\0\346"..., 4096,
9011200) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\231\10\0\0\230\10\0\0\232\10\0\0\1\0\346"..., 4096,
9015296) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\232\10\0\0\231\10\0\0\233\10\0\0\1\0\346"..., 4096,
9019392) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\233\10\0\0\232\10\0\0\234\10\0\0\1\0\346"..., 4096,
9023488) = 4096
pread(3,
"\0\0\0\0\1\0\0\0\234\10\0\0\233\10\0\0\235\10\0\0\1\0\346"..., 4096,
9027584) = 4096
pread(3, "\0\0\0\0\1\0\0\0\235\10\0\0\234\10\0\0\0\0\0\0\1\0<\2\0"...,
4096, 9031680) = 4096
stat64("/usr/share/doc/groff-1.17.2", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pread(3, "\0\0\0\0\1\0\0\0\236\10\0\0\0\0\0\0\237\10\0\0\1\0\346"...,
4096, 9035776) = 4096
pread(3, "\0\0\0\0\1\0\0\0\237\10\0\0\236\10\0\0\0\0\0\0\1\0\316"...,
4096, 9039872) = 4096
stat64("/usr/share/doc/gzip-1.3", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
brk(0x8249000)                          = 0x8249000
open("/etc/my.cnf", O_RDONLY)           = -1 ENOENT (No such file or
directory)
pread(6, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"...,
4096, 0) = 4096
pread(6, "\0\0\0\0\1\0\0\0\26\1\0\0\0\0\0\0J\1\0\0,\1s\2\0\2\364"...,
4096, 1138688) = 4096
pread(6, "\0\0\0\0\1\0\0\0A\0\0\0\0\0\0\0\0\0\0\0\324\0\340\6\0\2"...,
4096, 266240) = 4096
pread(6, "\0\0\0\0\1\0\0\0\264\1\0\0\0\0\0\0\0\0\0\0\266\0\1\10\0"...,
4096, 1785856) = 4096
pread(6, "\0\0\0\0\1\0\0\0\313\1\0\0\0\0\0\0\0\0\0\0\274\0000\7\0"...,
4096, 1880064) = 4096
pread(6,
"\0\0\0\0\1\0\0\0u\1\0\0\0\0\0\0\0\0\0\0\322\0\7\6\0\2\363"..., 4096,
1527808) = 4096
pread(6, "\0\0\0\0\1\0\0\0\27\0\0\0\0\0\0\0\0\0\0\0\272\0\374\7\0"...,
4096, 94208) = 4096
pread(6, "\0\0\0\0\1\0\0\0\263\1\0\0\0\0\0\0\0\0\0\0\236\0\363\10"...,
4096, 1781760) = 4096
pread(6, "\0\0\0\0\1\0\0\0\24\1\0\0\0\0\0\0Q\0\0\0*\1z\2\0\2\357"...,
4096, 1130496) = 4096
pread(6, "\0\0\0\0\1\0\0\0\345\0\0\0\0\0\0\0\257\0\0\0 \1b\2\0\2"...,
4096, 937984) = 4096
pread(6, "\0\0\0\0\1\0\0\0\337\0\0\0\0\0\0\0\0\0\0\0\30\1r\3\0\2"...,
4096, 913408) = 4096
pread(6,
"\0\0\0\0\1\0\0\0g\1\0\0\0\0\0\0\0\0\0\0\240\0(\t\0\2\356"..., 4096,
1470464) = 4096
pread(6,
"\0\0\0\0\1\0\0\0w\0\0\0\0\0\0\0\0\0\0\0\226\0_\t\0\2\366"..., 4096,
487424) = 4096
pread(6,
"\0\0\0\0\1\0\0\0H\0\0\0\0\0\0\0\0\0\0\0\320\0\t\7\0\2\364"..., 4096,
294912) = 4096
pread(6, "\0\0\0\0\1\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\230\0\355\t\0"...,
4096, 16384) = 4096
pread(6, "\0\0\0\0\1\0\0\0\240\1\0\0\0\0\0\0\0\0\0\0\250\0\254\10"...,
4096, 1703936) = 4096
pread(6, "\0\0\0\0\1\0\0\0000\1\0\0\0\0\0\0Y\1\0\0\346\0\372\4\0"...,
4096, 1245184) = 4096
pread(6, "\0\0\0\0\1\0\0\0\314\1\0\0\0\0\0\0\0\0\0\0\272\0\340\6"...,
4096, 1884160) = 4096
pread(6,
"\0\0\0\0\1\0\0\0w\1\0\0\0\0\0\0\0\0\0\0\260\0p\10\0\2\373"..., 4096,
1536000) = 4096
pread(3, "\0\0\0\0\1\0\0\0\2\2\0\0\0\0\0\0\3\2\0\0\1\0\346\17\0\7"...,
4096, 2105344) = 4096
pread(3, "\0\0\0\0\1\0\0\0\3\2\0\0\2\2\0\0\4\2\0\0\1\0\346\17\0\7"...,
4096, 2109440) = 4096
pread(3, "\0\0\0\0\1\0\0\0\4\2\0\0\3\2\0\0\0\0\0\0\1\0\360\2\0\7"...,
4096, 2113536) = 4096
stat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/share/man/man1", {st_mode=S_IFDIR|0755, st_size=20480,
...}) = 0
pread(3, "\0\0\0\0\1\0\0\0\207\3\0\0\0\0\0\0\210\3\0\0\1\0\346\17"...,
4096, 3698688) = 4096
pread(3, "\0\0\0\0\1\0\0\0\210\3\0\0\207\3\0\0\211\3\0\0\1\0\346"...,
4096, 3702784) = 4096
pread(3, "\0\0\0\0\1\0\0\0\211\3\0\0\210\3\0\0\0\0\0\0\1\0D\r\0\7"...,
4096, 3706880) = 4096
stat64("/usr/include", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
brk(0x8250000)                          = 0x8250000
stat64("/etc/init.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/etc/logrotate.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/share", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
chroot(".")                             = 0
chdir("/var/lib/rpm")                   = 0
pread(4, "\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
pread(4, "\0\0\0\0\1\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0b\1R\3\0\2\357"...,
4096, 8192) = 4096
socket(PF_UNIX, SOCK_STREAM, 0)         = 7
connect(7, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) =
-1 ENOENT (No such file or directory)
close(7)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=1750, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40191000
read(7, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1750
read(7, "", 4096)                       = 0
close(7)                                = 0
munmap(0x40191000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=19240, ...}) = 0
old_mmap(NULL, 19240, PROT_READ, MAP_PRIVATE, 7, 0) = 0x40191000
close(7)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 7
read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\34"...,
1024) = 1024
fstat64(7, {st_mode=S_IFREG|0755, st_size=50028, ...}) = 0
old_mmap(NULL, 44700, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) = 0x40196000
mprotect(0x401a0000, 3740, PROT_NONE)   = 0
old_mmap(0x401a0000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 7, 0x9000) = 0x401a0000
close(7)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 7
read(7,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0008U\1\000"..., 1024)
= 1024
fstat64(7, {st_mode=S_IFREG|0755, st_size=1465640, ...}) = 0
old_mmap(NULL, 1198788, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) =
0x401a1000
mprotect(0x402c0000, 23236, PROT_NONE)  = 0
old_mmap(0x402c0000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 7, 0x11e000) = 0x402c0000
old_mmap(0x402c4000, 6852, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402c4000
close(7)                                = 0
open("/lib/ld-linux.so.2", O_RDONLY)    = 7
read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\n\0\000"...,
1024) = 1024
fstat64(7, {st_mode=S_IFREG|0755, st_size=88760, ...}) = 0
old_mmap(NULL, 75860, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) = 0x402c6000
mprotect(0x402d8000, 2132, PROT_NONE)   = 0
old_mmap(0x402d8000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 7, 0x11000) = 0x402d8000
close(7)                                = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

rpm also segfaults when trying to erase other packages.

already tried rpm -qa which is successful, rpm --rebuilddb which is
successful, and --rebuilddb after doing the hint in bug
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90268 about using
rpm2cpio to rebuild rpm. behavior seems pretty consistent, wondering
where to go from here.

thanks,
nathan

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


How reproducible:


Steps to Reproduce:
1. rpm -e *
2.
3.
  
Actual results:
Segmentation fault

Expected results:
Package(s) erased

Additional info:

Comment 1 Jeff Johnson 2003-12-27 20:45:14 UTC
A --rebuilddb with rpm-4.1 or later will probably fix your problem.

Can you do that, using rpm2cpio as in #90268 if necessary?
rpm-4.1.1 packages for RHL 7.3 are at
    ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x

Comment 2 Nathan Jahnke 2003-12-27 23:24:18 UTC
that did it. was able to remove the orphaned packages without problems after the 
"manual" upgrade to 4.1.1. thanks a million for this final push.


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