[rhn-users] RPM doesn't work!

Corné Beerse cbeerse at lycos.nl
Mon Sep 13 09:31:15 UTC 2004


Tom Weeks wrote:

> On Wednesday 08 September 2004 12:26 pm, James P wrote:
> 
>>Later versions of RPM are kind of flaky. I have had this problem in
>>the past and have always been abel to fix it by rebuilding the rpm
>>database. Do this:
>>
>>cd /var/lib/rpm
>>mv __db* ..
>>rpmdb --rebuilddb
>>
>>It will take a few minutes to recreate the __db* files. Should work
>>after that.
> 
> 
> It's not a fix... That's just a bandaid until the next time it breaks.
> 
> The bug showed up in RPM 4.1 around RH8.0:
> http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=74877
> 
> Jeff Johnson still, to this day, refuses to accept that this is a bug:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=72543
> 
> And AFAIK, he still claims that it's not reproducable... and therefore not a 
> bug.

On my systems I find it reproducable just by starting 2 (or more) actions on the 
rpm-database. For example:
- start up2date manually and while actually installing the packages
- find the system is peeking in the rpm database to see if it needs some update 
(the rhn-deamon runs by default multiple times per hour)
- do an `rpm -q` to find some package is installed.
- and wait until you get bored, finish your coffee and like to go home....

Now you have one or more hanging rpm-commands of which one is using an entire 
processor. If not on a multi-processor machine, the systems gets 'hung'....

Kill the cpu-hungry rpm command and wait some more time to find all others do 
hang somehow. Now kill them all and find yourself having to rebuild the database.

> 
> I would say.. if the whole world says it's broken.. then it's being 
> reproduced.. and therefore IS, a bug... ;)

My routine does take some carefull timing. I think the root is some deadlock 
while updating and scanning the rpm database. To realy debug the problem, a 
multi-processor system is needed.

I can recall a message from the RedHat knowledge base that the source of the 
problem might be related to the used database-engine, in more detail the verion 
used in the rpm system differs from the one actually used on the sytem, the one 
used in the rpm system might also be a beta-version... This I found while 
investigating the problem on a RH9 system. My workaround was to disable the 
rhn-deamon and to do a weekly up2date, at least avoiding to run rpm more than once.



CBee






More information about the rhn-users mailing list