This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 86329 - RPM installs stopped working. Tried posted fixes. Still don't work.
RPM installs stopped working. Tried posted fixes. Still don't work.
Status: CLOSED DUPLICATE of bug 74877
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-packages (Show other bugs)
8.0
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-19 16:01 EST by Jack Silberman
Modified: 2007-04-18 12:52 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:52:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jack Silberman 2003-03-19 16:01:23 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208
Netscape/7.02

Description of problem:
 Hello,

Yesterday while I was updating my system the RPM manager went ded.
I can not check my Packages status (add, remove, update). The RPM manager 
starts then disappear. If I try to install any rpm file it also fail. Starts but
then disappear.

I am since yesterday luch time trying to make this work. Could you please help?

I have RH 8.0 and the latest updates until yesterday morning.

I tried to search for a solution but I could not find one.
Bellow is the latest thing I have tried. It seems to be a similar problem, but
is not solving mine.

I can rebuild the database, no error comes back. But still RPM manager
(Packages) does not work. Nor I can install the rpm file by just clicking over
them as I was able to do before.

THANK you in advance.
-JACK
----------------------------------------------------------------


Q. I can't upgrade any packages, run up2date or rpm. What is wrong?

A. The RPM database sometimes gets stuck. One cause of this problem is when a
process working on the RPM database is killed, which leaves lock files in place,
limiting what further processes can do to the database. So, a word to the wise:
make sure such a process really is stuck before killing it - if a process is
using much CPU time (eg. as reported by top) it is probably still doing useful work.

A tip o' the hat to: M A Young <m.a.young@durham.ac.uk> for this summarization.

This has to be repaired manually for rpm to eliminate what are described at
'hangs', and to permit rpm to properly function.

What the nature of the underlying problem is, and how to fix it, are detailed below:

First informally: When a process _is_ so killed [sometimes due to a loss of
power crash, sometimes due to a third party helper application dying without
cleaning up the lock files at exist, sometimes due to an impatient admin], it
will almost always leave some small corruption behind in the RPM 'SleepyCat' db
based database. Usually the simple
rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb
will remove the lockfiles (which start with that distinctive "__"), and fix the
database damage left behind. [Note: we have added the option -vv here, so that
there is visible progress and lots of detail during the rebuild process -- A
worried admin is often impatient at a lack of visible progress -- this option
causes the rebuild process to be quite verbose.]

But, unfortunately, sometimes more substantive database repair is needed, as
described below the section with Jeff Johnson's email later in this discussion.

Think of a two way linked list (we ignore indices to simplify the presentation)
for RPM Package description items thus:
-> -> -> ->
A B C D E
<- <- <- <-
If we have just a couple of broken links, we do not have any 'orphan chains' and
rpm --rebuilddb can repair things:
-> -> ->
A B C D E
<- <- <-
But if substantial persistent corruption occurs, and is not repaired for a long
time, we might get:
-> ->
A B C D E
<- <-
And it becomes unclear where to re-attach A and B, to the other chain. (Note:
This is an analogy, and does not precisely describe the data structures, rebuild
or dump processes from a formal standpoint.)


What else might cause the problem? Warren Togami has reviewd the trouble ticket
trackers for the Conectiva apt for rpm package, and others (the Ximian updater,
Gerald Teschl's autoupdate), and helped locate some interaction issues which are
being worked on and discussed on the RH rpm-list.

More formally: see the Bugzilla master ticket on this issue, 73097

Separately, a testing release (issued 7 Oct 2002) for an updated RPM is
available at Jeff Johnson's personal ftp site
ftp://people.redhat.com/jbj/test-4.1/ -- Warning: This is NOT a formal Red Hat
QA approved release.


Date: Thu, 8 Aug 2002 09:10:12 -0400
From: Jeff Johnson <jbj@redhat.com>
Subject: Re: rpm database - how to repair it?

On Thu, Aug 08, 2002 at 01:37:52PM +0200, Robert Vojta wrote:
<snip>
> What is the safest way how to repair rpm database
> (if it's corrupted)? I was doing this job a long time
> ago and I forgot the whole process :(

Hmmm, "hangs" in select are usually stale locks. Fix by doing

rm -f /var/lib/rpm/__db*
Otherwise,

All that needs repairing is /var/lib/rpm/Packages, the indices can/will be
rebuilt with rpm --rebuilddb later.

Save a copy just in case:

cd /var/lib
tar czvf /tmp/rpmdb.tar.gz rpm
Verify integrity with

cd /var/lib/rpm
db_verify Packages
If there are any errors, repair by doing

mv Packages Packages-ORIG
db_dump Packages-ORIG | db_load Packages
Read all the headers in Packages by doing

rpm -qa
If you segfault here, make an entry at http://bugzilla.redhat.com and I'll tell
you what to do.

Rebuild the indices

rpm --rebuilddb
------------------------------------
HTH

73 de Jeff

-- 
Jeff Johnson ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC


Version-Release number of selected component (if applicable):
Can't use RPM manager nor install RPM files if I click over them. IT worked before.

How reproducible:
Always

Steps to Reproduce:
1.Just call (Packages) under System Settings
2.Just click over any rpm file. It will not install.
3.
    

Actual Results:  The install starts but then stops. No error. The window closes.

Expected Results:  It should show me the status of my installed packages. It
should allow me to install new packages.

Additional info:

I tried the reported solution.
I can rebuild the database.
But it is not helping the RPM manager or installation of new RPM files.
Comment 1 Jeff Johnson 2003-03-19 16:12:49 EST
There you are ;-)

Presumably you're segfaulting on "rpm -qa" after doing rpm --rebuilddb.

Can you give me a pointer (i.e. URL, attachments won't work) to
a tarball of your database
    cd /var/lib
    tar czvf /tmp/rpmdb-86329.tar.gz rpm
and I'll see if I can't figger what's wrong. Thanks.
Comment 2 Jeff Johnson 2003-03-19 17:33:37 EST
OK, your database looks fine, header signatures/digests
all verify.

Can you try (as root)?
    service nscd restart

There's a weird pam-ldap problem that affects statically
linked binaries like /bin/rpm that is corrected by running
the nscd daemon.
Comment 3 Jack Silberman 2003-03-19 17:56:26 EST
> Can you try (as root)?
> service nscd restart
I did.

Stopping nscd    FAILED
Starting nscd  OK

Tried calling Packages, still does not work. 

thanks,
-JACK

Comment 4 Jeff Johnson 2003-03-19 18:00:37 EST
OK, time for strace. Can you try running
    strace -o /tmp/xxx /usr/lib/rpm/rpmq -qa -vv
and attaching /tmp/xxx output here? Thanks.
Comment 5 Jack Silberman 2003-03-19 18:10:00 EST
> strace -o /tmp/xxx /usr/lib/rpm/rpmq -qa -vv


command not found

-JACK
Comment 6 Jeff Johnson 2003-03-19 18:18:02 EST
Download the strace package, install manually by
using rpm2cpio
    cd /var/tmp
    <download strace pkg here>
    mkdir xxx
    cd xxx
    rpm2cpio ../strace*rpm | cpio -dim
    find . -type d -exec chmod 755 {} \;
    tar cf - . | (cd /; tar xvf -)

BTW, I suspect your problem is with the redhat-config-packages package,
that's the Python GUI that installs packages, so I'm probably gonna
redirect you as soon as I verify that rpm (and database and ...)
is AOK.
Comment 7 Jeff Johnson 2003-03-19 18:42:38 EST
Quick check to see if rpm is working is
    rpm -qa -vv

I'm gonna bounce you to redhat-config-packages, as
that's a different problem solution space.

Comment 8 Jack Silberman 2003-03-19 18:49:10 EST
> Quick check to see if rpm is working is
>     rpm -qa -vv

Yep, it is working. I got a bunch of OKs then closed db index, closed dbindex,
closed db environement.

> m gonna bounce you to redhat-config-packages, as
> that's a different problem solution space.

OK Jeff, thank you for trying.

I am looking for some more help once a new problem owner is assigned
-JACK



Comment 9 Jeremy Katz 2003-03-19 18:57:43 EST
If you run redhat-config-packages from a terminal, what sort of output do you see?
Comment 10 Jack Silberman 2003-03-19 21:12:46 EST
Hi,

The same as calling it from the GUI "Packages". It starts, shows the two windows
and some progress bar then dies ...

thanks,
-JACK
Comment 11 Jeremy Katz 2003-03-19 21:22:54 EST
And there's no output in the terminal when it dies?
Comment 12 Jack Silberman 2003-03-19 21:34:21 EST
Sorry I should have sent you this.

Thanks,
-JACK


[root@Linux1 root]# redhat-config-packages
Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/MainWindow.py", line 163, in ?
    comps = im.readCompsViaMethod(hdlist, progress.update)
  File "/usr/share/redhat-config-packages/method.py", line 488, in
readCompsViaMethod
    update_method = update_method)
  File "/usr/share/redhat-config-packages/comps.py", line 387, in __init__
    self.readCompsFile(file, self.packages)
  File "/usr/share/redhat-config-packages/comps.py", line 471, in readCompsFile
    self.setupStateDicts(packages)
  File "/usr/share/redhat-config-packages/comps.py", line 420, in setupStateDicts
    for prov in h[rpm.RPMTAG_PROVIDES]:
TypeError: iteration over non-sequence
[root@Linux1 root]#
Comment 13 Jeremy Katz 2003-03-19 21:39:47 EST
received via email...

[root@Linux1 root]# redhat-config-packages
Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/MainWindow.py", line 163, in ?
    comps = im.readCompsViaMethod(hdlist, progress.update)
  File "/usr/share/redhat-config-packages/method.py", line 488, in
readCompsViaMethod
    update_method = update_method)
  File "/usr/share/redhat-config-packages/comps.py", line 387, in __init__
    self.readCompsFile(file, self.packages)
  File "/usr/share/redhat-config-packages/comps.py", line 471, in readCompsFile
    self.setupStateDicts(packages)
  File "/usr/share/redhat-config-packages/comps.py", line 420, in setupStateDicts
    for prov in h[rpm.RPMTAG_PROVIDES]:
TypeError: iteration over non-sequence
[root@Linux1 root]#

*** This bug has been marked as a duplicate of 74877 ***
Comment 14 Jack Silberman 2003-03-19 21:50:24 EST
Jeremy,

Iam new to Linux.
What exact do I have to do to fix the problem?
I read the other bug but I am not sure what do to.

thank you,
-JACK
Comment 15 Red Hat Bugzilla 2006-02-21 13:52:14 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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