Bug 125749 - up2date SEGV's on new RHEL3u2 install
Summary: up2date SEGV's on new RHEL3u2 install
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm   
(Show other bugs)
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2004-06-10 20:40 UTC by James Antill
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-11 13:34:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
gdb --args python /usr/sbin/up2date -l (4.40 KB, text/plain)
2004-06-10 21:05 UTC, James Antill
no flags Details

Description James Antill 2004-06-10 20:40:02 UTC
Description of problem:
 New Install of RHEL3-u2, ran rhnreg_ks with activation key. Then
doing "up2date -l" works but SEGVs just before comming back to the prompt.
 gdb shows it inside /usr/lib/python2.2/site-packages/rpmmodule.so

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


How reproducible:
 Always atm.

Additional info:

 Attached is an strace and a gdb.

Comment 2 James Antill 2004-06-10 21:05:14 UTC
Created attachment 101048 [details]
gdb --args python /usr/sbin/up2date -l

Comment 3 Jeff Johnson 2004-06-10 21:25:41 UTC
Hmmm, -0.14 not what is in QU2, afaik. you might want to upgrade.

No matter. Do the following:
    cd /var/lib/rpm
    rm __db*
    /usr/lib/rpm/rpmdb_verify Packages
If that fails, the fix is
    mv Packages Packages-ORIG
    /usr/lib/rpm/rpmdb_dump Packages-ORIG |\
    /usr/lib/rpm/rpmdb_load Packages
and until rpmdb_verify passes.

    rpm --rebuilddb -vv
to regenerate the indices.

Finally, rpm -qa -vv to verify that the headers
are intact. If that passes, I think you are alright.

If not, append the output of rpm -qa -vv and I'll tell you what to do.

Comment 5 James Antill 2004-06-11 01:29:54 UTC
 According to both up2date and ...
0.14 is the latest for RHEL3.
 I did all the rpm rebuild stuff, and none of it printed out anything
that looked like an error. And I thought it had fixed itself, but then
realised that I was running via. sudo and so /usr/bin was in front of
/usr/sbin so consolehelper was fork()ing the actual up2date which was
still SEGV'ing (apart from "up2date -u" not doing anything everything
works fine).
 Attached is the tar file of stdout/stderr for the: rpm -qa -vv

Comment 6 James Antill 2004-06-11 01:33:12 UTC
 Just in case the above wasn't clear, I did:

    cd /var/lib/rpm
    rm __db*
    /usr/lib/rpm/rpmdb_verify Packages
    rpm --rebuilddb -vv
    rpm -qa -vv
[ran up2date ... ]
    rpm -qa -vv > /tmp/rpmqavv_stdout 2> /tmp/rpmqavv_stderr

Comment 7 Jeff Johnson 2004-06-11 03:35:40 UTC
OK, your database is find, that's the 1st step. The strace
showed rpmdb activity, easily identified by pread(2) calls.

up2date can segfault with bad data in /var/spool/up2date
as well. Can you try up2date with -vv? that turns on
rpm debugging, and I can often guess what the problem is from
seeing the spew.

If it looks like a hdr read in /var/spool/'up2date, you might
try nuking that file, or all the headers there. Network
problems can corrupt rpm hdrs, and the format was never
designed to detect errors. So segfaults can/will happen sometimes.

Comment 8 James Antill 2004-06-11 13:34:54 UTC
Arggggh, the header problems I'd seen before happened just after
up2date opened the .hdr files. But, yes, going through the packages to
install I realized that "up2date -u squid" was not working and a "rm
/var/spoool/up2date/squid*" fixed everything.


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