Bug 32880 - Packages corrupted while installing an rpm with disk full
Packages corrupted while installing an rpm with disk full
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-23 15:29 EST by Alex Vorobiev
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-23 15:29:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Vorobiev 2001-03-23 15:29:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686)


Packages file gets corrupted when trying to install any RPM while the disk
is full.  

can't tell actuall package revisions 'cause rpm db is corrupt:
latest RPM, from updates
latest db3, from updates

/var partition filled up
while trying to install latest vim-common from updates, received error that
mentions a .c file (unfortunately, haven't saved the error message). 
immediately after that, any rpm queries would fail:

[root@sasha rpm]# rpm -qa
error: cannot open Packages index using db3 - Invalid argument (22)

[root@sasha rpm]# rpm --rebuilddb
error: cannot open Packages index

[root@sasha rpm]# db_verify Packages 
db_verify: Page 1197: Invalid next_pgno 1198
db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification
failed

[root@sasha rpm]# db_dump -f dump Packages 
db_dump: Packages: file size not a multiple of the pagesize
db_dump: open: Packages: Invalid argument

this happened twice already.  my fault for not keeping an eye on the
partition, but i figure that the rpm db getting corrupted is a bad thing
and shouldn't happen anyway.  i don't know of any way to restore that file,
using -r and -R options with db_dump yield an unusable db file...  it's a
pain to lose my rpm db again...

any help would be appreciated

--sasha

Reproducible: Didn't try
Steps to Reproduce:
i've reproduced it, but not intentionally.  my best guess is that it is
caused by full disk
Comment 1 Jeff Johnson 2001-03-23 16:00:52 EST
Sorry, I dunno of any fix either, although you're basically on the right path by
looking
for db3 utilities to fix the hash access /var/lib/rpmPackages file.

The Right Thing To Do for rpm is to enable logging and transactions in db3, but
that hasn't been deemed worth the engineering effort yet.

Note You need to log in before you can comment on or make changes to this bug.