Bug 1918 - RPM causes segmentation violations when used with --prefix
RPM causes segmentation violations when used with --prefix
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-03-31 12:22 EST by thaynes
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-05-30 17:37:30 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 thaynes 1999-03-31 12:22:40 EST
Problems with rpm on Redhat beta 5.8

The problem is that the version of RPM on this beta CD
segmentation-faults when installing our RPM files.
These RPMs have been uploaded to incoming.redhat.com in the
./lacd directory.

Red Hat Linux release 5.8.1.1
Kernel 2.2.1-6 on an i586
login: tim
Password:

zsh, ps1 11:56AM tim > rpm --version
RPM version 2.91

zsh, ps1 11:56AM tim > cd temp
zsh, ps1 11:57AM temp > ls
openlink-3.2-1.i386-glibc2.rpm
openlink-udbcsdk-3.2-1.i386-glibc2.rpm
openlink-3.2-1.i386.readme.txt
openlink-wwwcfg-3.2-1.i386-glibc2.rpm
openlink-agents-3.2-1.i386-glibc2.rpm
virtuoso-lite-1.0-3.i386-glibc2.rpm
openlink-odbcsdk-3.2-1.i386-glibc2.rpm
virtuoso-lite-1.0-3.i386.readme.txt
zsh, ps1 11:57AM temp > su
Password:
[root@ps1 temp]# rpm -i --prefix=/home/tim/latest
openlink-3.2-1.i386-glibc2.rpm

Segmentation fault
[root@ps1 temp]#

# Trying again with -vvh

[root@ps1 temp]# rpm -ivvh --prefix=/home/tim/latest
openlink-3.2-1.i386-glibc2.
rpm
D: counting packages to install
D: found 1 packages
D: looking for packages to download
D: retrieved 0 packages
D: New Header signature
D: Signature size: 68
D: Signature pad : 4
D: sigsize         : 72
D: Header + Archive: 1186778
D: expected size   : 1186778
D: opening database mode 0x42 in //var/lib/rpm/
D: found 0 source and 1 binary packages
D: dependencies: looking for /bin/sh
D: dependencies: looking for glibc
D: installing binary packages
Segmentation fault
[root@ps1 temp]#

# strace output follows

[root@ps1 temp]# strace rpm -iv --prefix=/home/tim/latest
openlink-3.2-1.i386-gl
ibc2.rpm
execve("/bin/rpm", ["rpm", "-iv",
"--prefix=/home/tim/latest", "openlink-3.2-1.i
386-glibc2.rpm"], [/* 20 vars */]) = 0
personality(PER_LINUX)                  = 0
geteuid()                               = 0
getuid()                                = 0
getegid()                               = 0
getgid()                                = 0
brk(0)                                  = 0x8107dcc
brk(0x8107dec)                          = 0x8107dec
brk(0x8108000)                          = 0x8108000
getpid()                                = 2266
brk(0x8109000)                          = 0x8109000
open("/usr/lib/rpm/rpmpopt", O_RDONLY)  = 3
lseek(3, 0, SEEK_END)                   = 2657
lseek(3, 0, SEEK_SET)                   = 0
read(3, "#\n# This file *should not be mo"..., 2657) = 2657
close(2657)                             = -1 EBADF (Bad file
descriptor)
open("/etc/popt", O_RDONLY)             = -1 ENOENT (No such
file or directory)
getuid()                                = 0
geteuid()                               = 0
open("/root/.popt", O_RDONLY)           = -1 ENOENT (No such
file or directory)
uname({sys="Linux", node="ps1", ...})   = 0
brk(0x810a000)                          = 0x810a000
open("/usr/lib/rpm/rpmrc", O_RDONLY)    = 4
fstat(4, {st_mode=0, st_size=0, ...})   = 0
read(4, "################################"..., 5776) = 5776
brk(0x810b000)                 = 0x810b000
brk(0x810c000)                          = 0x810c000
brk(0x810d000)                          = 0x810d000
close(4)                                = 0
open("/etc/rpmrc", O_RDONLY)            = -1 ENOENT (No such
file or directory)
open("/root/.rpmrc", O_RDONLY)          = -1 ENOENT (No such
file or directory)
open("/usr/lib/rpm/macros", O_RDONLY)   = 4
fstat(4, {st_mode=S_ISUID|0603, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400000
00
read(4, "#==============================="..., 4096) = 4026
brk(0x810e000)                          = 0x810e000
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x40000000, 4096)                = 0
open("openlink-3.2-1.i386-glibc2.rpm", O_RDONLY) = 4
fstat(4, {st_mode=S_IFCHR|S_ISUID|S_ISGID|0420,
st_rdev=makedev(84, 65), ...}) =
 0
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\355\253\356\333\3\0\0\0\0\377op"..., 96) = 96
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\216\255\350\1", 4)            = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\0\0", 4)                  = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\0\2", 4)                  = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\0\24", 4)                 = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\3\350\0\0\0\4\0\0\0\0\0\0\0"..., 52) = 52
fstat(4, {st_mode=S_IFCHR|S_ISUID|S_ISGID|0420,
st_rdev=makedev(84, 110), ...})
= 0
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\0\0", 4)                  = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\216\255\350\1", 4)            = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\0\0", 4)                  = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\0)", 4)                   = 4
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0W\343", 4)                 = 4
brk(0x8114000)                          = 0x8114000
select(5, [4], NULL, NULL, {5, 0})      = 1 (in [4], left
{5, 0})
read(4, "\0\0\3\350\0\0\0\6\0\0\0\0\0\0\0"..., 23155) =
23155
brk(0x8115000)                          = 0x8115000
brk(0x8118000)                          = 0x8118000
brk(0x8119000)                          = 0x8119000
open("//var/lib/rpm/packages.rpm", O_RDWR|O_CREAT, 0644) = 5
lseek(5, 0, SEEK_END)                   = 4627656
lseek(5, 0, SEEK_SET)                   = 0
read(5, " \t\5\2\210\276B\0", 8)        = 8
lseek(5, 0, SEEK_END)                   = 4627656
lseek(5, 0, SEEK_CUR)                   = 4627656
fcntl(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0,
len=0}) = 0
stat("//var/lib/rpm/nameindex.rpm", {st_mode=0, st_size=0,
...}) = 0
open("//var/lib/rpm/nameindex.rpm", O_RDWR|O_CREAT, 0644) =
6
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
read(6, "\0\6\25a\0\0\0\2\0\0\4\322\0\0\20"..., 260) = 260
stat("//var/lib/rpm/fileindex.rpm", {st_mode=S_ISVTX|0145,
st_size=0, ...}) = 0
open("//var/lib/rpm/fileindex.rpm", O_RDWR|O_CREAT, 0644) =
7
fcntl(7, F_SETFD, FD_CLOEXEC)           = 0
read(7, "\0\6\25a\0\0\0\2\0\0\4\322\0\0\20"..., 260) = 260
lseek(7, 4096, SEEK_SET)                = 4096
read(7, "\266\0\360\17\350\17\335\17\325\17"..., 4096) =
4096
stat("//var/lib/rpm/providesindex.rpm",
{st_mode=S_IFCHR|S_ISUID|S_ISGID|0602, s
t_rdev=makedev(84, 65), ...}) = 0
open("//var/lib/rpm/providesindex.rpm", O_RDWR|O_CREAT,
0644) = 8
fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
read(8, "\0\6\25a\0\0\0\2\0\0\4\322\0\0\20"..., 260) = 260
stat("//var/lib/rpm/requiredby.rpm", {st_mode=0, st_size=0,
...}) = 0
open("//var/lib/rpm/requiredby.rpm", O_RDWR|O_CREAT, 0644) =
9
fcntl(9, F_SETFD, FD_CLOEXEC)           = 0
read(9, "\0\6\25a\0\0\0\2\0\0\4\322\0\0\20"..., 260) = 260
stat("//var/lib/rpm/conflictsindex.rpm",
{st_mode=S_ISVTX|0761, st_size=0, ...})
 = 0
open("//var/lib/rpm/conflictsindex.rpm", O_RDWR|O_CREAT,
0644) = 10
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
read(10, "\0\6\25a\0\0\0\2\0\0\4\322\0\0\20"..., 260) = 260
stat("//var/lib/rpm/groupindex.rpm", {st_mode=S_ISVTX|0771,
st_size=0, ...}) = 0
open("//var/lib/rpm/groupindex.rpm", O_RDWR|O_CREAT, 0644) =
11
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0
read(11, "\0\6\25a\0\0\0\2\0\0\4\322\0\0\20"..., 260) = 260
stat("//var/lib/rpm/triggerindex.rpm",
{st_mode=S_ISVTX|0723, st_size=0, ...}) =
 0
open("//var/lib/rpm/triggerindex.rpm", O_RDWR|O_CREAT, 0644)
= 12
fcntl(12, F_SETFD, FD_CLOEXEC)          = 0
read(12, "\0\6\25a\0\0\0\2\0\0\4\322\0\0\20"..., 260) = 260
brk(0x811c000)                          = 0x811c000
stat("/bin", {st_mode=0, st_size=0, ...}) = 0
brk(0x811e000)                          = 0x811e000
lseek(7, 278528, SEEK_SET)              = 278528
read(7, "\360\0\354\17\344\17\331\17\321\17"..., 4096) =
4096
lseek(5, 110104, SEEK_SET)              = 110104
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0,", 4)                   = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\v`", 4)                   = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0d\0\0\0\10\0\0\0\0\0\0\0\1"..., 3616) = 3616
brk(0x811f000)                          = 0x811f000
stat("/home/ftp/bin", {st_mode=S_ISVTX|0726, st_size=0,
...}) = 0
lseek(5, 414616, SEEK_SET)              = 414616
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0-", 4)                   = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\r\340", 4)                = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0d\0\0\0\10\0\0\0\0\0\0\0\4"..., 4272) = 4272
stat("/bin", {st_mode=0, st_size=0, ...}) = 0
lseek(6, 8192, SEEK_SET)                = 8192
read(6, "v\1\373\17\363\17\351\17\341\17\323"..., 4096) =
4096
lseek(5, 127000, SEEK_SET)              = 127000
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0/", 4)                   = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0041\250", 4)               = 4
mmap(0, 278528, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000
0000
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0d\0\0\0\10\0\0\0\0\0\0\0\1"..., 275608) =
275608
brk(0x8135000)                          = 0x8135000
brk(0x8138000)                          = 0x8138000
brk(0x813a000)                          = 0x813a000
brk(0x813d000)                          = 0x813d000
brk(0x8150000)                          = 0x8150000
brk(0x8153000)                          = 0x8153000
brk(0x8157000)                          = 0x8157000
brk(0x815b000)                          = 0x815b000
brk(0x815c000)                          = 0x815c000
brk(0x815f000)                          = 0x815f000
brk(0x8162000)                          = 0x8162000
munmap(0x40000000, 278528)              = 0
brk(0x811e000)                          = 0x811e000
brk(0x8120000)                          = 0x8120000
lseek(10, 4096, SEEK_SET)               = 4096
read(10, "\f\0\370\17\360\17\350\17\340\17"..., 4096) = 4096
lseek(6, 4096, SEEK_SET)                = 4096
read(6, "d\1\366\17\356\17\346\17\336\17\325"..., 4096) =
4096
lseek(5, 4351832, SEEK_SET)             = 4351832
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0*", 4)                   = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0TJ", 4)                    = 4
brk(0x8126000)                          = 0x8126000
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\3\350\0\0\0\6\0\0\0\0\0\0\0"..., 22250) =
22250
brk(0x8127000)                          = 0x8127000
brk(0x812a000)                          = 0x812a000
brk(0x812b000)                          = 0x812b000
lseek(5, 4351832, SEEK_SET)             = 4351832
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\0*", 4)                   = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0TJ", 4)                    = 4
select(6, [5], NULL, NULL, {5, 0})      = 1 (in [5], left
{5, 0})
read(5, "\0\0\3\350\0\0\0\6\0\0\0\0\0\0\0"..., 22250) =
22250
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
[root@ps1 temp]#

## Moving onto an older 5.2 machine,

[root@opllinux5 temp]# rpm --version
RPM version 2.5.2
[root@opllinux5 temp]# rpm -i --prefix=/home/tim/latest
openlink-odbcsdk-3.2-1.i
386-glibc2.rpm
[root@opllinux5 temp]#
Comment 1 Jeff Johnson 1999-03-31 13:01:59 EST
You are correct. Later versions of rpm have disabled --prefix
and print the message
	--prefix is broke, use --relocate /oldpath=/newpath instead

The --prefix option will either be fixed or removed in rpm-3.0.
Comment 2 Jeff Johnson 1999-05-30 17:37:59 EDT
The prefix option has been fixed in rpm-3.0.1.

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