Bug 681071 - e2fsck fails to fix errors in filesystem
Summary: e2fsck fails to fix errors in filesystem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: e2fsprogs
Version: 5.4
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-01 01:38 UTC by Lachlan McIlroy
Modified: 2015-04-12 23:14 UTC (History)
3 users (show)

Fixed In Version: e2fsprogs-1.39-32.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 09:06:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1080 0 normal SHIPPED_LIVE e2fsprogs bug fix and enhancement update 2011-07-21 09:04:54 UTC

Description Lachlan McIlroy 2011-03-01 01:38:45 UTC
Description of problem:

While running some tests against a 2.6.18-245 kernel on an ext3 filesystem for BZ 662838 the fs became corrupted.  Running e2fsck failed with this error:

sh-3.2# e2fsck -yf /dev/hda3
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Inode 876220, i_size is 37433344, should be 37429248.  Fix? yes

Inode 876220, i_blocks is 73240, should be 73232.  Fix? yes

Pass 2: Checking directory structure
Directory inode 876220 has an unallocated block #9138.  Allocate? yes

XXX should never happen!!!
Aborted

Running e4fsck fixed the problem and e2fsck no long reports any errors.

An e2image of the corrupted filesystem is available from:
file.rdu.redhat.com:~lmcilroy/hda3.e2i.bz2

Version-Release number of selected component (if applicable):
kernel-2.6.18-245.el5
e2fsprogs-1.39-23.el5

How reproducible:
e2fsck fails every time when run on the e2image.

Comment 1 Eric Sandeen 2011-03-01 22:36:54 UTC
This upstream commit fixes it:

commit d45edec0fb2e5d100d122fdda0914560c64def44
Author: Theodore Ts'o <tytso>
Date:   Wed Mar 12 16:10:48 2008 -0400

    e2fsck: Handle a pass 2 "should never happen" error gracefully
    
    Turns out a "should never happen" error can indeed happen very easily
    if a directory with an htree index has an incorrect, and too-large,
    i_size field.  This patch fixes this so that we handle this situation
    gracefully, allowing filesystems with this error to be fixed.
    
    In another patch I will clean up the specific problem which caused the
    internal "should never happen" error from happening at all, but patch
    will prevent e2fsck from crashing, and prompt the user to remove the
    htree index, so it can be rebuilt again after pass 3.
    
    Thanks to Bas van Schaik at Tetra for giving me access to his system
    so this problem could be debugged.
    
    Addresses-Launchpad-Bug: #129395
    
    Signed-off-by: "Theodore Ts'o" <tytso>

Thanks,
-Eric

Comment 2 Eric Sandeen 2011-03-14 18:09:59 UTC
Built & tagged in e2fsprogs-1.39-32.el5

Comment 5 errata-xmlrpc 2011-07-21 09:06:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1080.html

Comment 6 errata-xmlrpc 2011-07-21 12:39:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1080.html


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