Bug 32880 - Packages corrupted while installing an rpm with disk full
Summary: Packages corrupted while installing an rpm with disk full
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-23 20:29 UTC by Alex Vorobiev
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-03-23 20:29:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Alex Vorobiev 2001-03-23 20:29:51 UTC
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 21:00:52 UTC
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.