Re: Rebuilding the database from scratch ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

thought it might help: I had the exact same probls when I upgraded my
glibc from RH a couple of days ago -- it happened that 2.3.2-27.9.6 was
only compatible with RH-kernels, and my vanilla 2.4.22 did not work with
that. As a result, _many_ apps (rpm, gkrellm, opera etc.) started
segfaulting -- rpm segfaulted at the very same point you describe below,
leaving behind a __db.001 file.

Fortunately I had access to another RH9 box which hasn't been updated,
and I made a tarball with all the files listed by 'rpm -ql glibc', and
installed it over the files at my box. I don't know if would have been
able to recover otherwise...

RH released a new version (2.3.2-27.9.7) one day after, for which the
only difference was:

[Update 2003-11-13]: The packages for Red Hat Linux 9 have been updated
for compatibility with kernels not provided by Red Hat.

I installed it on my box and everything was smooth again.

BTW: I am now running Fedora.

HTH

Andre

On Tue, 18 Nov 2003 04:03:32 +0000
"R.H. Palko" <rhp_lpt@xxxxxxxxxxx> wrote:

> 18-nov-03
> 
> Hello:
> 
> Please excuse the length of this posting, but I'm trying to include
> all the relevant symptoms.
> 
> I've got basically the same thing. Although in my instance it was
> caused by a failure during a
> 
> 'rpm -Fvh <rpm filename>' failure which left a '__db.001 empty file in
> the /var/lib/rpm directory.
> 
> Trying what has been suggested in this thread, I get the following:
> 
> Running 'sudo rpm -vv --rebuilddb'
> 
> produces:
> 
> D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.2703
> D: creating directory /var/lib/rpmrebuilddb.2703
> D: opening old database with dbapi 3
> D: opening  db environment /var/lib/rpm/Packages create:cdb:mpool
> rpmdb: write: 0xbfffd360, 8192: Invalid argument
> error: db4 error(22) from dbenv->open: Invalid argument
> D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
> error: cannot open Packages index
> D: removing directory /var/lib/rpmrebuilddb.2703
> Exit 1
> 
> Running 'sudo rpm -vv --initdb'
> produces:
> 
> D: opening  db environment /var/lib/rpm/Packages create:cdb:mpool
> rpmdb: write: 0xbfffd3f0, 8192: Invalid argument
> error: db4 error(22) from dbenv->open: Invalid argument
> D: opening  db index       /var/lib/rpm/Packages create mode=0x42
> error: cannot open Packages index using db3 - Invalid argument (22)
> 
> In both instances a __db.001 file is created in /var/lib/rpm
> 
> However, I'm beginning to doubt its related to a corrupted database,
> as
> 
> 'rpm -qa' and 'rpm -qi <package name>' and rpm -ql <package name>'
> 
> all appear to work. It looks like its related to the rpmdb 'write'
> function.
> 
> I'm running rpm 4.2.0.69 under RH 9. on a P4 laptop and have tried the
> 
> suggestions detailed
> in http://www.rpm.org/hintskinks/repairdb/ to no avail.
> 
> Does anyone have a clue to what is going on and how to recover ?
> 
> FWIW the last successfull rpm installatiion just before the problem
> was:
> 
> 'sudo rpm -Fvh --nodeps glibc-2.3.2-27.9.7.i686.rpm'
> 
> which succeeded.
> 
> The next one,
> 
> 'sudo rpm -Fvh glibc-common-2.3.2-27.9.7.i386.rpm' failed
> 
> This means my glibc-common and glibc-devel are at 2.3.2-27.9 vice 
> 2.3.2-27.9.7 for glibc.
> However, I doubt the minor version difference is significant as
> everything appears to be working w/e of rpm.
> 
> Note I was not aware at the time that packages with dependencies could
> be concatenated on the command line, albeit I have used '--nodeps'
> before in this context successfully.
> 
> Thank you
> Bob
> rhp_lpt@xxxxxxxxxxx
> 
> 
> 
> [root@astronaut lib]# rpm --initdb
> rpmdb: write: 0xbfffd670, 8192: Invalid argument
> error: db4 error(22) from dbenv->open: Invalid argument
> error: cannot open Packages index using db3 - Invalid argument (22)
> 
> Same issue.
> 
> Thanks for the help,
> TheFinn.
> 
> ----- Original Message -----
> From: "Rodrigo Barbosa" <rodrigob@xxxxxxxxxxxxxxx>
> To: <rpm-list@xxxxxxxxxx>
> Sent: Saturday, November 15, 2003 1:59 PM
> Subject: Re: Rebuilding the database from scratch ??
> 
> 
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Remove your empty files and try "rpm --initdb".
> >
> >On Sat, Nov 15, 2003 at 01:01:49PM +1100, TheFinn wrote:
> > > How does one rebuild the database from scratch ?
> > >
> > > This is the error I'm getting and since have accidently rm'd the
> Packages
> > > file in /var/lib/rpm (It's not been a good week).
> > >
> > > [root@astronaut rpm]# rpm --rebuilddb
> > > rpmdb: unable to join the environment
> > > error: db4 error(11) from dbenv->open: Resource temporarily
> > > unavailable error: cannot open Packages index
> >
> >- --
> >Rodrigo Barbosa <rodrigob@xxxxxxxxxxxxxxx>
> >"Quid quid Latine dictum sit, altum viditur"
> >"Be excellent to each other ..." - Bill & Ted (Wyld Stallyns)
> >
> >-----BEGIN PGP SIGNATURE-----
> >Version: GnuPG v1.2.1 (GNU/Linux)
> >
> >iD8DBQE/tZanpdyWzQ5b5ckRArDWAJ4y/o5hiEU5zJKAkZ7/aniP0XOMvACfc6bf
> >aeAohYs59xifHx6ec2sspQ4=
> >=SO2i
> >-----END PGP SIGNATURE-----
> >
> >
> >_______________________________________________
> >Rpm-list mailing list
> >Rpm-list@xxxxxxxxxx
> >https://www.redhat.com/mailman/listinfo/rpm-list
> >
> 
> _________________________________________________________________
> From Beethoven to the Rolling Stones, your favorite music is always
> playing on MSN Radio Plus. No ads, no talk. Trial month FREE!  
> http://join.msn.com/?page=offers/premiumradio
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/rpm-list


-- 
Andre Oliveira da Costa


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux