Alle,
I have a major problem. I'm running CentOS 5.5 on some rather old hardware (Dual Celeron 500MHz with 768MB of memory). Sometime in the last week, the DB became corrupted (I noticed when yum update would hang). I've tried running rpm --rebuild with both the 2.6.18-194.17.4 and 2.6.18-194.26.1 kernels and get a segmentation fault each time. Consequently, I'm pretty much stuck and cannot do any update. Also, the machine has a tendency to hang any time operations are done. I've disabled some of the cronjobs that do this, but this is no way to operate. I would appreciate any input on where to go from here to try and rectify the problem.
Best Regards, Camron
I've tried running rpm --rebuild with both the 2.6.18-194.17.4 and 2.6.18-194.26.1 kernels and get a segmentation fault each time.
You might try moving /var/lib/rpm/__db.00* out of the way and trying to rebuild your rpm DB again. If that doesn't work, you might want to use strace to see where it gets hung up.
Barry
On 11/01/07 17:27, Barry Brimer wrote:
I've tried running rpm --rebuild with both the 2.6.18-194.17.4 and 2.6.18-194.26.1 kernels and get a segmentation fault each time.
You might try moving /var/lib/rpm/__db.00* out of the way and trying to rebuild your rpm DB again. If that doesn't work, you might want to use strace to see where it gets hung up.
Barry
Barry,
It completed the run without a segmentation fault with the strace and provided the following output errors:
[root@lurker rpm]# strace -f -ff -t -o /var/tmp/rpm_rebuild_strace.txt rpm --rebuilddb error: rpmdbNextIterator: skipping h# 1460 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 292 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 316 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbNextIterator: skipping h# 1024 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 591 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 592 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 620 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbNextIterator: skipping h# 207 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 827 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 870 Header V3 DSA signature: BAD, key ID e8562897 error: rpmdbAdd: skipping h# 883 Header V3 DSA signature: BAD, key ID e8562897 rpmdb: page 9866: illegal page type or format rpmdb: PANIC: Invalid argument rpmdb: /var/lib/rpm/Packages: pgin failed for page 9866 error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db4 error(-30977) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db4 error(-30977) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery [root@lurker rpm]#
Best Regards, Camron
On Fri, Jan 7, 2011 at 10:11 PM, Camron W. Fox cwfox@us.fujitsu.com wrote:
Alle,
I have a major problem. I'm running CentOS 5.5 on some rather old hardware (Dual Celeron 500MHz with 768MB of memory). Sometime in the last week, the DB became corrupted (I noticed when yum update would hang). I've tried running rpm --rebuild with both the 2.6.18-194.17.4 and 2.6.18-194.26.1 kernels and get a segmentation fault each time.
This has little, if anything, to do with the kernel itself unless your hardware drivers are seriously mangled.
Can you get an "rpm -qav" report without errors? If so, can you re-install all the RPM's manually with a "--replacepkgs" option?
Consequently, I'm pretty much stuck and cannot do any update. Also, the machine has a tendency to hang any time operations are done. I've disabled some of the cronjobs that do this, but this is no way to operate.
Time to back up your configurations and rebuild, if that's feasible. Your last /var/log/rpmpkgs that was valid should be a helpful guideline for packages to re-install as part of a new deployment.
I would appreciate any input on where to go from here to try and rectify the problem.
Best Regards, Camron
-- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cwfox@us.fujitsu.com
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, 7 Jan 2011, Camron W. Fox wrote:
To: CentOS mailing list centos@centos.org From: Camron W. Fox cwfox@us.fujitsu.com Subject: [CentOS] Corrupted RPM DB can't be rebuilt.
Alle,
I have a major problem. I'm running CentOS 5.5 on some rather old hardware (Dual Celeron 500MHz with 768MB of memory). Sometime in the last week, the DB became corrupted (I noticed when yum update would hang). I've tried running rpm --rebuild with both the 2.6.18-194.17.4 and 2.6.18-194.26.1 kernels and get a segmentation fault each time.
Consequently, I'm pretty much stuck and cannot do any update. Also, the machine has a tendency to hang any time operations are done. I've disabled some of the cronjobs that do this, but this is no way to operate. I would appreciate any input on where to go from here to try and rectify the problem.
Hi Camron.
I make daily backups of my rpm database, just in case things go pear shaped like this.
###
Oldest backup dir is: rpm-database-2011-01-03_01.15.02
There are 6 backups available.
NUMBER_REQUIRED_BACKUPS: 5
The oldest backup dir to be deleted is: /backup/rpm-database/rpm-database-2011-01-03_01.15.02
There are more than 5 backups in this directory, and oldest backup rpm-database-2011-01-03_01.15.02 has been deleted.
Contents of /backup/rpm-database backup dir is:
rpm-database-2011-01-04_01.15.01 rpm-database-2011-01-05_01.15.01 rpm-database-2011-01-06_01.15.01 rpm-database-2011-01-07_01.15.02 rpm-database-2011-01-08_01.15.01
/dev/hdc6 umounted
You can get the script to do this and more, from:
Generic PHP CL backup script http://forums.fedoraforum.org/showthread.php?t=248436
Kind Regards,
Keith Roberts
----------------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------