[SOLVED] HELP-I've broken rpm

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

[SOLVED] HELP-I've broken rpm

Postby jaywalker » Mar 13th, '12, 02:27

First I installed mplayer-gui along with another batch of updates.
Then I tried to run it and then I installed the 1.2 version of libpng.
Then I changed my mind and tried to uninstall it but rpmdrake wouldn't open - failed with a database error message.
So then I tried this:
Code: Select all
[root@Tureen rich]# urpme libpng
error: rpmdb: Thread/process 2573/139782153705216 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
unable to open rpmdb


and then this:
Code: Select all
[root@Tureen rich]# rpmdb --rebuilddb
error: rpmdb: Thread/process 2573/139782153705216 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)


and finally this;
Code: Select all
[root@Tureen rich]# rpmdb --initdb
error: rpmdb: Thread/process 2573/139782153705216 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)


What is a Berkeley DB and what tools do I have to kick it back into shape? All I have is what I have, though I could probably download and manually install anything I might be missing.

All suggestions gratefully received...

Richard
Last edited by jaywalker on Mar 16th, '12, 03:48, edited 3 times in total.
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: HELP-I've broken rpm

Postby doktor5000 » Mar 13th, '12, 03:12

You might want to have a look at: http://www.oldrpm.org/hintskinks/repairdb/
Berkeley DB is the database RPM uses to store metadata, look at some of the mails at the bottom to know how to manually check some parts of that database.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: HELP-I've broken rpm

Postby jaywalker » Mar 13th, '12, 04:16

Thanks Dok, past my bedtime now - I'll explore that tomorrow evening.

Richard
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: HELP-I've broken rpm

Postby jaywalker » Mar 13th, '12, 04:26

OK, so curiosity got the better of me and now everything is working just fine. I did a
Code: Select all
rm -f /var/lib/rpm/__db*
to get rid of 5 files; one dating from 3 March (zero length) and four from tonight (very large).

I don't understand why it works, so that will have to wait for more research later.

Thanks again

Richard
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: [Fixed] HELP-I've broken rpm

Postby DShelbyD » Mar 13th, '12, 16:13

Roughly the same issue here today. Thanks to both of you, things appear to be OK now. A couple of "bad" and/or "missing" signatures, but I went ahead anyway. So far, so good.

Code: Select all
The following packages have bad signatures:                                   
/var/cache/urpmi/rpms/lib64rpmbuild2-4.9.1.2-21.mga2.x86_64.rpm: Missing signature (OK ((none)))
/var/cache/urpmi/rpms/lib64rpmsign2-4.9.1.2-21.mga2.x86_64.rpm: Missing signature (OK ((none)))
David
User avatar
DShelbyD
 
Posts: 99
Joined: Mar 26th, '11, 18:00
Location: Lexington Park, Maryland, U.S.A.

Re: [Fixed] HELP-I've broken rpm

Postby ozky » Mar 13th, '12, 17:33

I have same problem too it broke rpm database and then urpmi --auto-select is still says that need to install rpm update and it fail that install because it is already installed,and it will try to install it again and again,i have rebuild rpm database but it will give no help to this problem.
Image
Mageia user
User avatar
ozky
 
Posts: 581
Joined: Jul 2nd, '11, 08:48
Location: Nakkila Finland

Re: [unFixed] HELP-I've broken rpm

Postby jaywalker » Mar 13th, '12, 19:58

And my problem came back a few minutes ago after installing this evening's updates - mostly rpm and file system layout stuff, from what I recall - first the rpm updates went OK, then the restart and display of half a dozen more. rpmdrake crashed during the installation of these last few.
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: [unFixed] HELP-I've broken rpm

Postby alf » Mar 13th, '12, 20:16

I was also trapped this morning after today's updates. The rpm rebuilddb didn't help so i removed all sources and added them newly. Now it seems to work.
for windows problems reboot; for linux problems be root
alf
 
Posts: 326
Joined: Apr 1st, '11, 23:07
Location: DE Paderborn

Re: [unFixed] HELP-I've broken rpm

Postby DShelbyD » Mar 14th, '12, 04:04

FWIW I'm still OK after the updates of late 13 March (new rpm + others).
David
User avatar
DShelbyD
 
Posts: 99
Joined: Mar 26th, '11, 18:00
Location: Lexington Park, Maryland, U.S.A.

Re: [unFixed] HELP-I've broken rpm

Postby jaywalker » Mar 14th, '12, 04:15

Despite the two rpm updates we had today, 4.9.1.2-21.mga2 and 4.9.1.2-22.mga2, I am still experiencing the problem. It is under investigation as https://bugs.mageia.org/show_bug.cgi?id=4918.

It can still be temporarily cleared by;
Code: Select all
 rm -f /var/lib/rpm/_*
rpmd --rebuilddb


I also delete /var/lib/rpm/.RPMLOCK, but I don't know if it makes a difference.
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: [unFixed] HELP-I've broken rpm

Postby DShelbyD » Mar 14th, '12, 14:37

Yes, after applying the mageia version update and one other package this morning, the previous DB problem returned. However, I applied
Code: Select all
rm -f /var/lib/rpm/_*

and then did
Code: Select all
urpmi --auto-update

Here is the session:
Code: Select all
[root@Athlon6000 ~]# urpmi --auto-update
medium "Core Release (distrib1)" is up-to-date
medium "Core Updates (distrib3)" is up-to-date
medium "Nonfree Release (distrib11)" is up-to-date
medium "Nonfree Updates (distrib13)" is up-to-date
medium "Tainted Release (distrib21)" is up-to-date
medium "Tainted Updates (distrib23)" is up-to-date
medium "Core 32bit Release (distrib31)" is up-to-date
medium "Core 32bit Updates (distrib33)" is up-to-date
To satisfy dependencies, the following package is going to be installed:
   Package                        Version      Release       Arch   
(medium "Core Release (distrib1)")
  meta-task                      2            33.mga2       noarch 
127B of additional disk space will be used.
33KB of packages will be retrieved.
Proceed with the installation of one package? (Y/n)


    ftp://mirrors.kernel.org/mageia/distrib/cauldron/x86_64/media/core/release/meta-task-2-33.mga2.noarch.rpm
installing meta-task-2-33.mga2.noarch.rpm from /var/cache/urpmi/rpms           
Preparing...                     #############################################
      1/1: meta-task             #############################################
restarting urpmi
To satisfy dependencies, the following packages are going to be installed:
   Package                        Version      Release       Arch   
(medium "Core Release (distrib1)")
  dhcp-client                    4.2.3P2      4.mga2        x86_64 
  dhcp-common                    4.2.3P2      4.mga2        x86_64 
  mageia-release-Default         2            0.7.mga2      x86_64 
0B of additional disk space will be used.
684KB of packages will be retrieved.
Proceed with the installation of the 3 packages? (Y/n)


    ftp://mirrors.kernel.org/mageia/distrib/cauldron/x86_64/media/core/release/dhcp-client-4.2.3P2-4.mga2.x86_64.rpm
    ftp://mirrors.kernel.org/mageia/distrib/cauldron/x86_64/media/core/release/dhcp-common-4.2.3P2-4.mga2.x86_64.rpm
                                                                               
installing dhcp-client-4.2.3P2-4.mga2.x86_64.rpm dhcp-common-4.2.3P2-4.mga2.x86_64.rpm mageia-release-Default-2-0.7.mga2.x86_64.rpm from /var/cache/urpmi/rpms
Preparing...                     #############################################
      1/3: dhcp-common           #############################################
      2/3: dhcp-client           #############################################
      3/3: mageia-release-Default
                                 #############################################
[root@Athlon6000 ~]#

Only FWIW,
David
User avatar
DShelbyD
 
Posts: 99
Joined: Mar 26th, '11, 18:00
Location: Lexington Park, Maryland, U.S.A.

Re: [unFixed] HELP-I've broken rpm

Postby wobo » Mar 14th, '12, 18:10

DShelbyD wrote:Yes, after applying the mageia version update and one other package this morning, the previous DB problem returned. However, I applied
Code: Select all
rm -f /var/lib/rpm/_*

and then did
Code: Select all
urpmi --auto-update

Does not work here.

1 hour ago I did the latest updates with urpmi, no problems. Then I opened rpmdrake, marking all -handbook packages for uninstall. Uninstalling worked for 2 packages then I faced a segmentation fault.
Opening rpmdrake again showed the known error and advice to rebuild the database.
I removed _db* and did 'rpm --rebuilddb' but this returned:
Code: Select all
Error: rpmdb: Thread/process 2794/1397..... failed: Thread died in Berkeley DB library
Error: db4 error from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
Error: Unable to open packages index, using db4
Result: system is unusable, I can't even update or whatever.

Solution:
I erased the _db* files in /var/lib/rpm via and removed the rpm lock files. After that I could rebuild the rpm database.
wobo
---
And a new day will dawn for those who stand long
And the forests will echo with laughter
(Stairway to Heaven, Led Zeppelin)
User avatar
wobo
 
Posts: 1649
Joined: Mar 22nd, '11, 17:13

Re: [unFixed] HELP-I've broken rpm

Postby wobo » Mar 14th, '12, 19:39

Hours later and after doing the rebuild dance 4 times more I can say:

1. System is updated to latest status as of 17:01 Paris time
2. It is not a rpm nor urpmi issue. Both work fine.
3. It is an rpmdrake issue - removing any installed package with rpmdrake results in a segmentation fault. Reproducible with any installed package. Uninstalling the same package with urpme works fine.
4. the error message about not being able to access the database is a result of the segfault (rpmdrake leaves it locked and corrupted).
wobo
---
And a new day will dawn for those who stand long
And the forests will echo with laughter
(Stairway to Heaven, Led Zeppelin)
User avatar
wobo
 
Posts: 1649
Joined: Mar 22nd, '11, 17:13

Re: [unFixed] HELP-I've broken rpm

Postby pmithrandir » Mar 14th, '12, 22:06

I get that

Code: Select all
[root@portablePierre ~]# urpmi --auto-update
    ftp://ftp.mandrivauser.de/mirrors/Mageia/distrib/cauldron/i586/media/core/release/media_info/20120314-190816-synthesis.hdlist.cz                           
média « Core Release (distrib1) » mis à jour                                   
le média « Core Updates (distrib3) » est à jour                                 
le média « Core Backports (distrib7) » est à jour                               
le média « Nonfree Release (distrib11) » est à jour                             
le média « Nonfree Updates (distrib13) » est à jour                             
le média « Nonfree Backports (distrib17) » est à jour                           
le média « Tainted Release (distrib21) » est à jour                             
le média « Tainted Updates (distrib23) » est à jour                             
le média « Tainted Backports (distrib27) » est à jour                           
Afin de poursuivre la mise à jour, les paquetages suivants doivent être désinstallés :                                                                         
meta-task-2-33.mga2.noarch                                                     
 (pour installer le paquetage meta-task-2-33.mga2.noarch)                       
rpm-4.9.1.2-22.mga2.i586                                                       
 (pour installer le paquetage rpm-4.9.1.2-22.mga2.i586) (o/N) o                 
Pour satisfaire les dépendances, les paquetages suivants vont être installés :
   Paquetage                      Version      Révision      Arch   
(média « Core Release (distrib1) »)
  meta-task                      2            33.mga2       noarch 
  rpm                            4.9.1.2      22.mga2       i586   
un espace de 1.6Mo sera libéré.
447Ko de paquets seront récupérés.
Procéder à l'installation des 2 paquetages ? (O/n) o


installation de meta-task-2-33.mga2.noarch.rpm rpm-4.9.1.2-22.mga2.i586.rpm depuis /var/cache/urpmi/rpms
Préparation ...                  #############################################
L'installation a échoué :       paquetage rpm-1:4.9.1.2-22.mga2.i586 déjà installé
        paquetage meta-task-1:2-33.mga2.noarch déjà installé



any ideas how to resolve it ?

I did the rm command, and the build db one also...
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: [unFixed] HELP-I've broken rpm

Postby jaywalker » Mar 14th, '12, 22:31

https://bugs.mageia.org/show_bug.cgi?id=4918

According to the bug history it looks like this one is getting a lot of attention.

wobo wrote:3. It is an rpmdrake issue - removing any installed package with rpmdrake results in a segmentation fault. Reproducible with any installed package. Uninstalling the same package with urpme works fine.4. the error message about not being able to access the database is a result of the segfault (rpmdrake leaves it locked and corrupted).


My experience this evening seems to support wobo's findings so you could try just using urpmi and friends. When you get another update flag, just ignore it and execute the update in a console. If that keeps you clear of the problem then it would be worth adding that information to the bug tracker.

Richard
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: [unFixed] HELP-I've broken rpm

Postby pmithrandir » Mar 14th, '12, 23:00

what else can do in console?
thanks
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: [unFixed] HELP-I've broken rpm

Postby wilcal » Mar 14th, '12, 23:23

This worked for me:

rm -f /var/lib/rpm/_*
rpmd --rebuilddb
"DISK BOOT FAILURE - INSERT SYSTEM DISK AND PRESS ENTER"
is my friend
wilcal
 
Posts: 567
Joined: Jun 20th, '11, 02:01
Location: San Diego CA

Re: [unFixed] HELP-I've broken rpm

Postby jaywalker » Mar 14th, '12, 23:33

I know it sounds stupid but do you think it might help to repeat the rpm tidy-up and rebuild the db AGAIN. You might also clean up in /var/cache/urpmi/rpms. It can't do any harm; at worst you will just download some packages again.

I have been deleting /var/lib/__db00*, /var/lib/rpm/.RPMLOCK and /var/lib/urpmi/.LOCK files so often tonight I am seriously considering putting it all in a script (not forgetting rpmdb --rebuilddb).
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: [unFixed] HELP-I've broken rpm

Postby wobo » Mar 15th, '12, 01:59

I have now tested for a while in various configurations of Mageia Cauldron:
1. From a clean system urpm* and rpm are working as they should.
2. After latest updates I had no problems with rpmdrake any more.
rpm-4.9.1.2-22.mga2
rpmdrake-5.30-mga2

Problems encountered before:
1. Using the GUI rpmdrake (either starting in a konsole or via MCC) for uninstalling or installing a package results in a segmentation fault (window closes without error message, if started from the konsole window you see the message "segmentation fault")
2. Restarting rpmdrake or trying to use urpm* results in the error messages about not being able to use the database.

For temporary solution I did:
1. Go to konsole window, become root
2. Do these commands one after the other:
Code: Select all
rm -f /var/lib/rpm/_db*
rm -f /var/lib/rpm/.RPMLOCK
rpm --rebuilddb

After this your urpm* and rpm should be working as normal.
wobo
---
And a new day will dawn for those who stand long
And the forests will echo with laughter
(Stairway to Heaven, Led Zeppelin)
User avatar
wobo
 
Posts: 1649
Joined: Mar 22nd, '11, 17:13

Re: [unFixed] HELP-I've broken rpm

Postby DShelbyD » Mar 15th, '12, 15:12

wobo wrote:After latest updates I had no problems with rpmdrake any more.
rpm-4.9.1.2-22.mga2
rpmdrake-5.30-mga2

rpm - yes, that is the version I have. But
Code: Select all
[root@Athlon6000 ~]# rpm -q rpmdrake
rpmdrake-5.30-1.mga2

No, wait. As I type another rpmdrake update to 5.30-2.mga2 followed by the return of the familiar index/DB issues. Now for me rpmdrake fails, as does urpmi --auto-update.

The rpm --rebuilddb command, issued following the other two, results in
Code: Select all
error: rpmdb: Thread/process 8567/140113150666496 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)

[EDIT]In addition, and to further complicate things,
Code: Select all
[root@Athlon6000 ~]# rpm -q rpm
error: rpmdb: Thread/process 8567/140113150666496 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
error: rpmdb: Thread/process 8567/140113150666496 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages database in /var/lib/rpm
package rpm is not installed

And it cannot be installed under the circumstances.

[EDIT again] I solved the issue from the /var/lib/rpm directory with
Code: Select all
rm -f __db*
rm -f .rpm.lock
rm -f rebuilddb

Note in the first: two underscore characters instead of one
Note in the second: lower case and a dot separating "rpm" from "lock"
Now I can urpmi successfully, and rpm shows up as present and current.
Code: Select all
[root@Athlon6000 rpm]# rpm -q rpm
rpm-4.9.1.2-22.mga2
Last edited by DShelbyD on Apr 16th, '12, 03:02, edited 1 time in total.
David
User avatar
DShelbyD
 
Posts: 99
Joined: Mar 26th, '11, 18:00
Location: Lexington Park, Maryland, U.S.A.

Re: [unFixed] HELP-I've broken rpm

Postby wobo » Mar 15th, '12, 18:55

DShelbyD wrote:[EDIT again] I solved the issue from the /var/lib/rpm directory with
Code: Select all
rpm -f __db*
rpm -f .rpm.lock
rpm -f rebuilddb

Note in the first: two underscore characters instead of one
Note in the second: lower case and a dot separating "rpm" from "lock"
Now I can urpmi successfully, and rpm shows up as present and current.
Code: Select all
[root@Athlon6000 rpm]# rpm -q rpm
rpm-4.9.1.2-22.mga2


Ah, ok. The missing underscore was a typo, sorry about that.
As for the lockfile: At first I had 2 of them, one with the capital letters and the other as you describe. At the next test and all others I only saw the file with the capital letters. Sorry about forgetting that.
wobo
---
And a new day will dawn for those who stand long
And the forests will echo with laughter
(Stairway to Heaven, Led Zeppelin)
User avatar
wobo
 
Posts: 1649
Joined: Mar 22nd, '11, 17:13

Re: [unFixed] HELP-I've broken rpm

Postby DShelbyD » Mar 15th, '12, 19:12

Ego te absolvo! ;-)

I think this problem is fixed with the new RPM. Do you? Is anyone still having problems?
David
User avatar
DShelbyD
 
Posts: 99
Joined: Mar 26th, '11, 18:00
Location: Lexington Park, Maryland, U.S.A.

Re: [unFixed] HELP-I've broken rpm

Postby wobo » Mar 15th, '12, 19:19

Can say late tonight, today my 2 machines with Cauldron are sleeping at home and I am still sitting outside with my laptop, nice spring weather! :)
wobo
---
And a new day will dawn for those who stand long
And the forests will echo with laughter
(Stairway to Heaven, Led Zeppelin)
User avatar
wobo
 
Posts: 1649
Joined: Mar 22nd, '11, 17:13

Re: [unFixed] HELP-I've broken rpm

Postby DShelbyD » Mar 15th, '12, 19:27

Only one machine have I running Cauldron, and it's doing very well now, having just run rpmdrake for a few library updates. The spring weather here in the Mid-Atlantic of the U.S. is downright radiant with trees and flowers bursting. Great day. I am loathe, however, to start a "How's the weather" thread!! Spare me. Right now I'm filled with gratitude.
David
User avatar
DShelbyD
 
Posts: 99
Joined: Mar 26th, '11, 18:00
Location: Lexington Park, Maryland, U.S.A.

Re: [re-Fixed] HELP-I've broken rpm

Postby pmithrandir » Mar 16th, '12, 09:39

I'm going to check, but last time I tried I couldn't perform the meta task installation, and there was no other updates. I will check this evening if I have time before my week end.
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Next

Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: No registered users and 1 guest

cron