[Bug 697207] New: Package data base can not be rebuild.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c0 Summary: Package data base can not be rebuild. Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: x86-64 OS/Version: openSUSE 11.4 Status: NEW Severity: Normal Priority: P5 - None Component: Installation AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Markus.Elfring@web.de QAContact: jsrain@novell.com Found By: --- Blocker: --- I have noticed the following situation. Name : rpm Relocations: (not relocatable) Version : 4.8.0 Vendor: openSUSE Release : 27.1 Build Date: Do 17 Feb 2011 19:28:43 CET Install Date: Fr 11 Mär 2011 13:08:09 CET Build Host: build11 Group : System/Packages Source RPM: rpm-4.8.0-27.1.src.rpm Sonne:~ # rpm --rebuilddb rpmdb: page 1: illegal page type or format rpmdb: PANIC: Invalid argument rpmdb: Packages: pgin failed for page 1 error: db3 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30977) from dbcursor->c_put: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery error: error(-30977) allocating new package instance error: cannot add record originally at 8005 rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30977) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery warning: failed to rebuild database: original database remains in place error: failed to remove directory /var/lib/rpmrebuilddb.5755: No such file or directory Would an undocumented command like "rpm --recoverdb" repair this issue? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c Marcus Meissner <meissner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |mls@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c1 --- Comment #1 from Michael Schröder <mls@novell.com> 2011-06-01 13:26:53 UTC --- A failing 'rpm --rebuilddb' is really a bad thing. It means, that the main packages database is corrupt. 1) there's a cronjob entry that backups the rpm database every day. Check the /var/adm/backup/rpmdb directory 2) you can try to use the berkeleydb tools to get rid of the broken entries: # cd /var/lib/rpm # mv Packages Packages.bad # db_dump Packages.bad | db_load Packages # rpm --rebuilddb -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c2 Markus Elfring <Markus.Elfring@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Package data base can not |Package data base can not |be rebuild. |be rebuilt. --- Comment #2 from Markus Elfring <Markus.Elfring@web.de> 2011-06-01 18:03:37 UTC --- (In reply to comment #1) Thanks for your suggestion. - How do you think about the following result? Sonne:/var/lib/rpm # db_dump Packages-20110531-1856.bdb | db_load Packages db_load: page 1: illegal page type or format db_load: PANIC: Invalid argument db_load: Packages: pgin failed for page 1 db_load: DB_RUNRECOVERY: Fatal error, run database recovery db_load: PANIC: fatal region error detected; run recovery db_load: PANIC: fatal region error detected; run recovery db_load: DB->close: DB_RUNRECOVERY: Fatal error, run database recovery db_load: File handles still open at environment close db_load: Open file handle: Packages db_load: PANIC: fatal region error detected; run recovery db_load: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery Are there still a few more ways to repair this situation (for db-utils 4.8.30-2.4)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c3 --- Comment #3 from Markus Elfring <Markus.Elfring@web.de> 2011-06-01 18:10:45 UTC --- Sonne:/var/lib/rpm # rpm --rebuilddb rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9 error: cannot open Packages index using db3 - Invalid argument (22) Does this message give any more clues? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c4 --- Comment #4 from Michael Schröder <mls@novell.com> 2011-06-03 09:58:36 UTC --- #2: Doesn't that simply mean that you didn't delete the Packages file before running db_load? #3: argh, we need an older db_load. It used to be installed in /usr/lib/rpm, but for some reason, newer rpm packages don't do that. Try db45-utils and use db45_load instead of db_load. (Install with rpm2cpio db45-utils.rpm | cpio --extract --make-directories) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c5 --- Comment #5 from Markus Elfring <Markus.Elfring@web.de> 2011-06-03 11:08:17 UTC --- (In reply to comment #4) I did not delete the file "Packages" (because I renamed it as I showed it in the command). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c6 --- Comment #6 from Michael Schröder <mls@novell.com> 2011-06-03 12:53:26 UTC --- (But then I don't see how db_load can generate such errors.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c7 --- Comment #7 from Markus Elfring <Markus.Elfring@web.de> 2011-06-03 12:56:10 UTC --- (In reply to comment #4) Sonne:/var/lib/rpm # db_dump Packages-20110603-1419.bdb | db45_load Packages db45_load: page 65023: illegal page type or format db45_load: PANIC: Invalid argument db45_load: DB_RUNRECOVERY: Fatal error, run database recovery db45_load: PANIC: fatal region error detected; run recovery db45_load: DB->close: DB_RUNRECOVERY: Fatal error, run database recovery db45_load: PANIC: fatal region error detected; run recovery db45_load: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery Sonne:/var/lib/rpm # rpm --rebuilddb rpmdb: page 65023: illegal page type or format rpmdb: PANIC: Invalid argument error: db3 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30977) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery Which commands should I try next? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c8 --- Comment #8 from Michael Schröder <mls@novell.com> 2011-06-03 13:07:36 UTC --- And "Packages" does not exist before that line? And there is no stray __db* file? Can you attach that Packages-20110603-1419.bdb file, please? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c9 --- Comment #9 from Markus Elfring <Markus.Elfring@web.de> 2011-06-03 13:38:57 UTC --- (In reply to comment #8)
And "Packages" does not exist before that line? And there is no stray __db* file?
Yes. - I did not see these files before my load command. Does it matter that the page type/format is reported as "illegal" for different page numbers if I repeat my load command?
Can you attach that Packages-20110603-1419.bdb file, please?
No because 115 MB exceed the upload size limit here. Does another communication channel exist to provide useful details in a safe way? (I would feel uncomfortable to provide my complete package data base by a "mail attachment".) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c10 --- Comment #10 from Michael Schröder <mls@novell.com> 2011-06-03 14:31:52 UTC --- Different page numbers: no clue, that's berkeleydb internals. Please put it on some server where I can download it from, or, if you don't find one, attach it to a mail to mls@suse.de. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c11 --- Comment #11 from Markus Elfring <Markus.Elfring@web.de> 2011-06-04 07:25:10 UTC --- (In reply to comment #10) Unfortunately, the compressed file (45 Mb) will not arrive in your in-box. <mls@suse.de>: message size 63369288 exceeds size limit 50000000 of server mx1.suse.de[195.135.220.2] <mls@novell.com>: message size 63369297 exceeds size limit 41943040 of server prv1-mx.provo.novell.com[130.57.1.11] I have not got a personal FTP server on a public IP address so far. (Would an interface like "WEB.DE SmartDrive" be usable for you to retrieve the "attachment"?) Are you going to look into its data structures by any other development/repair tools? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c12 --- Comment #12 from Michael Schröder <mls@novell.com> 2011-06-06 06:09:02 UTC --- Just put it on any server I can reach. Or use 'split' to split it in two parts and send them via mail. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c13 --- Comment #13 from Markus Elfring <Markus.Elfring@web.de> 2011-06-06 16:13:13 UTC --- Created an attachment (id=433099) --> (http://bugzilla.novell.com/attachment.cgi?id=433099) First part of a Bzip file Thanks for your hint. I'm sorry that I did not get the idea here before to circumvent size limitations by the split command. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c14 --- Comment #14 from Markus Elfring <Markus.Elfring@web.de> 2011-06-06 16:17:42 UTC --- Created an attachment (id=433100) --> (http://bugzilla.novell.com/attachment.cgi?id=433100) Second part of a Bzip file -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c15 --- Comment #15 from Markus Elfring <Markus.Elfring@web.de> 2011-06-06 16:22:32 UTC --- Created an attachment (id=433102) --> (http://bugzilla.novell.com/attachment.cgi?id=433102) Third part of a Bzip file -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c16 --- Comment #16 from Markus Elfring <Markus.Elfring@web.de> 2011-06-06 16:27:16 UTC --- Created an attachment (id=433104) --> (http://bugzilla.novell.com/attachment.cgi?id=433104) Fourth part of a Bzip file -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c17 --- Comment #17 from Markus Elfring <Markus.Elfring@web.de> 2011-06-06 16:33:55 UTC --- Created an attachment (id=433106) --> (http://bugzilla.novell.com/attachment.cgi?id=433106) Fifth part of a Bzip file Can you concatenate the appended five parts into a Bzip2 file which can be converted to an usable package data base which might me partly damaged? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c18 --- Comment #18 from Michael Schröder <mls@novell.com> 2011-06-07 06:36:08 UTC --- Ok, concatenated it, ran: /usr/bin/db45_dump bug-697207_Packages.bad | /usr/bin/db45_load Packages.ok Worked without problems. What next? (Try running it in /tmp, I suspect that your db environment in /usr/lib/rpm is bad, as written in comment #8. Or you're running out of disk space.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c19 --- Comment #19 from Michael Schröder <mls@novell.com> 2011-06-07 06:43:55 UTC --- Things are getting weird. I took your corrupt Packages file and copied into my /var/lib/rpm, then I ran 'rpm --rebuilddb'. It finished without any error! Are you sure that your computer's memory chips are good? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c20 --- Comment #20 from Markus Elfring <Markus.Elfring@web.de> 2011-06-13 07:57:37 UTC --- (In reply to comment #19) My computer's memory is fine so far. Thanks for your check. - Do you use any software component versions that are different from mine for this use case? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c21 --- Comment #21 from Michael Schröder <mls@novell.com> 2011-06-14 10:13:32 UTC --- I don't see what could make a difference. - rpm comes with it's own db version, so it doesn't depend on another component regarding the database - the db45_utils just depend on the berkeleydb lib. I simply don't see how db45_load can fail, this means that the *new* database that db45_load creates got corrupted. This really sounds like something's very wrong with either the memory or the filesystem or the disks. (Btw, what filesystem do you use? ext3/4, xfs, btrfs? What device driver is used to access the disks?) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c22 --- Comment #22 from Markus Elfring <Markus.Elfring@web.de> 2011-06-14 16:40:34 UTC --- (In reply to comment #21) The package data base is stored in an Ext4 file system of my computer. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c23 --- Comment #23 from Markus Elfring <Markus.Elfring@web.de> 2011-07-02 20:20:37 UTC --- (In reply to comment #19)
It finished without any error!
The command "rpm --rebuilddb" has also worked on my system a moment ago. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c24 --- Comment #24 from Michael Schröder <mls@novell.com> 2011-07-05 10:33:02 UTC --- Huh, this makes things even more weird. Do you think this is because of bad memory or a bad disk or a bug in the kernel (device driver)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c25 --- Comment #25 from Markus Elfring <Markus.Elfring@web.de> 2011-07-05 17:24:39 UTC --- (In reply to comment #24) No. - I was more surprised by a product re-installation. https://bugzilla.novell.com/show_bug.cgi?id=686261#c24 I assume that corresponding updates fixed the open issue somehow on my system. I would like to clean-up my directory "/var/lib/rpm" now. Can it be that the tries with the commands "db_dump" and "db45_load" created files and additional subdirectories which I do not need any more at the moment? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c26 --- Comment #26 from Michael Schröder <mls@novell.com> 2011-07-06 09:07:32 UTC --- Dunno. There should be just an "alternatives" subdirectory in /var/lib/rpm, you can delete all other directories. As for the other files, you just need "Packages", rpm --rebuilddb then rebuilds all other index files. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=697207 https://bugzilla.novell.com/show_bug.cgi?id=697207#c27 Michael Schröder <mls@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |WORKSFORME --- Comment #27 from Michael Schröder <mls@novell.com> 2011-07-06 09:08:26 UTC --- (also closing this bug, as it magically got fixed) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com