Bug 17489 - Segfault while upgrading
Summary: Segfault while upgrading
Status: CLOSED DUPLICATE of bug 19666
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-09-14 03:31 UTC by Enrico Scholz
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-03 21:55:36 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
rpm -qls openssl -vv (19.05 KB, text/plain)
2000-09-14 03:34 UTC, Enrico Scholz
no flags Details
rpm -qlp /usr/src/redhat/RPMS/i686/openssl-0.9.5a-14.i686.rpm -vv (5.36 KB, text/plain)
2000-09-14 03:37 UTC, Enrico Scholz
no flags Details
rpm -sql openssl -vv ## *after* rpm -e openssl; rpm -U openssl-...rpm (6.28 KB, text/plain)
2000-09-14 03:41 UTC, Enrico Scholz
no flags Details

Description Enrico Scholz 2000-09-14 03:31:56 UTC
While upgrading an old openssl version I get:

# gdb rpmu
(gdb) r -U /usr/src/redhat/RPMS/i686/openssl-0.9.5a-14.i686.rpm
Program received signal SIGSEGV, Segmentation fault.
0x400816f4 in handleOverlappedFiles () from /usr/lib/librpm.so.0
(gdb) bt
#0  0x400816f4 in handleOverlappedFiles () from /usr/lib/librpm.so.0
#1  0x40083191 in rpmRunTransactions () from /usr/lib/librpm.so.0
#2  0x4007995c in rpmInstall () from /usr/lib/librpm.so.0
#3  0x804b095 in poptResetContext ()
#4  0x40160b65 in __libc_start_main (...)

Sorry I have no debuginformation compiled in, but I will attach some
information about the packages...

Comment 1 Enrico Scholz 2000-09-14 03:34:45 UTC
Created attachment 3420 [details]
rpm -qls openssl -vv

Comment 2 Enrico Scholz 2000-09-14 03:37:26 UTC
Created attachment 3421 [details]
rpm -qlp /usr/src/redhat/RPMS/i686/openssl-0.9.5a-14.i686.rpm -vv

Comment 3 Enrico Scholz 2000-09-14 03:41:43 UTC
Created attachment 3422 [details]
rpm -sql openssl -vv  ## *after* rpm -e openssl; rpm -U openssl-...rpm

Comment 4 Jeff Johnson 2000-09-14 09:48:25 UTC
What version of rpm?

Try doing "rpm --rebuilddb" first. Inconsistent data from the rpm database will
often cause segfaults.
(N.B. You will almost always have to do "rpm --rebuilddb" after any rpm seg

Comment 5 Enrico Scholz 2000-09-14 10:02:26 UTC
# rpm -q rpm

`rpm --rebuild' was done shortly before I tried to install openssl

Comment 6 Enrico Scholz 2000-09-14 20:26:53 UTC
Was able to create debugable dump:

Core was generated by `rpm -U
/usr/src/redhat/RPMS/i686/openldap-1.2.11-15.i686.rpm /usr/src/redhat/RP'.
Program terminated with signal 11, Segmentation fault.
#0  0x806ebb9 in handleOverlappedFiles (fi=0xbfffefa0, ht=0x823cd98,
probs=0x81bd608, dsl=0xbffff040) at transaction.c:962
962                 for (otherFileNum = 0; otherFileNum < recs[otherPkgNum]->fc;
(gdb) bt
#0  0x806ebb9 in handleOverlappedFiles (fi=0xbfffefa0, ht=0x823cd98,
probs=0x81bd608, dsl=0xbffff040) at transaction.c:962
#1  0x30b in ?? ()
#2  0x80704fe in rpmRunTransactions (ts=0x81b0df0, notify=0x8066d80
<showProgress>, notifyData=0x20, okProbs=0x0, newProbs=0xbffff3f8, transFlags=0,
    at transaction.c:1597
#3  0x8067a74 in rpmInstall (rootdir=0x8168b6c "/rpm/rpmpopt-4.0",
fileArgv=0x81a46b0, transFlags=0, interfaceFlags=32, probFilter=0,
relocations=0x0) at rpminstall.c:370
#4  0x804b386 in main (argc=6, argv=0xbffff5f4) at rpm.c:1133
#5  0x81031ed in __libc_start_main (main=0x80499b0 <main>, argc=6,
ubp_av=0xbffff5f4, init=0x80480b4 <_init>, fini=0x8165ba0 <_fini+32>,
rtld_fini=0, stack_end=0xbffff5ec)
    at ../sysdeps/generic/libc-start.c:111

(gdb) p otherFileNum 
$3 = -1
(gdb) p otherPkgNum
$5 = 139
(gdb) p recs[139]
$6 = (TFI_t *) 0x11
(gdb) p filespec
$31 = 0x824f368 "/usr/share/openldap/migration/migrate_common.ph"
(gdb) p j
$48 = 136732936

I'm seeing a problem in transaction.c:951
for (j = 0; recs[j] != fi; j++) ;

(gdb) p numRecs 
$37 = 1
(gdb) p fi
$49 = (TFI_t *) 0xbfffefa0
(gdb) p recs[0]
$50 = (TFI_t *) 0xbfffeec8
(gdb) p recs[1]
$51 = (TFI_t *) 0x30a

Comment 7 Jeff Johnson 2000-10-03 17:23:40 UTC
Hmmm, weirdness. Can you send me <jbj@redhat.com> a copy (or pointers) to a
tarball of the database and the package being installed? I'll take a look.
Meanwhile, since I have not a prayer
of reproducing this problem otherwise, I'm gonna close this bug. Please reopen
if you have
a reproducible test case.

Comment 8 Enrico Scholz 2000-10-03 21:55:34 UTC
An example:

0. empty %_netsharedpath, rpm-4.0-4, db1-1.85-4, db3-3.1.14-6, glibc-2.1.94-1
(packages are self-compiled for target i586)

1. rpm -U
--force --nodeps --justdb
2. echo '%_netsharedpath /usr/share' >>/etc/rpm/macros
3. rpm -U
--force --nodeps --justdb
Segmentation fault (core dumped)

Comment 9 Jeff Johnson 2001-01-08 15:42:09 UTC
I believe that I know what's happening here, rpm ignored _netsharedpath for
files.  The fix is closely related to #19666, so I'm gonna mark as a dupe.

*** This bug has been marked as a duplicate of 19666 ***

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