Bug 465679

Summary: e2fsck -p crashes with read-only DM device (e.g. logical volume)
Product: [Fedora] Fedora Reporter: Vlado Potisk <reg.bugs>
Component: e2fsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 8CC: esandeen, kzak, oliver
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-06 04:07:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vlado Potisk 2008-10-05 13:37:45 UTC
Description of problem:
e2fsck crashes during the automatic check of a read-only device managed by the device mapper.

Version-Release number of selected component (if applicable):
e2fsprogs-1.40.4-2.fc8.x86_64

How reproducible:
Always

Steps to Reproduce:
1. create a logical volume
    # lvcreate -L 4M -n test SomeVG
2. create an ext3 FS
    # mke2fs -j /dev/SomeVG/test
3. set the device read-only
    # lvchange -p r /dev/SomeVG/test
4. check the FS
    # e2fsck -f -p /dev/SomeVG/test

e2fsprogs-1.40.4-2.fc8.x86_64

Actual results:
e2fsck prints over 100.000 lines of warnings and then it segfaults (signal 11)

Expected results:
As documented in the man page:
   If e2fsck discovers a problem  which  may  require  the system administrator
   to take additional corrective action, e2fsck will print a description
   of the problem and then exit ...

Comment 1 Eric Sandeen 2008-10-05 14:30:09 UTC
Thanks, I'll look into this.

I can reproduce on F8, and also with upstream e2fsprogs.

In the meantime, I suggest not trying to repair devices that can't be written to ;)

Thanks,
-Eric

Comment 2 Eric Sandeen 2008-10-10 22:43:38 UTC
I've sent a patch upstream for this:

http://marc.info/?l=linux-ext4&m=122367685623961&w=2

And another to not even start, if the block device is RO:

http://marc.info/?l=linux-ext4&m=122367707324208&w=2

Thanks,

-Eric

Comment 4 Fedora Update System 2008-10-13 21:06:27 UTC
e2fsprogs-1.41.3-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/e2fsprogs-1.41.3-2.fc9

Comment 5 Eric Sandeen 2008-10-13 21:19:22 UTC
I'll commit for F8 too.

-Eric

Comment 6 Fedora Update System 2008-10-13 21:41:09 UTC
e2fsprogs-1.40.4-3.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/e2fsprogs-1.40.4-3.fc8

Comment 7 Fedora Update System 2008-10-16 02:06:54 UTC
e2fsprogs-1.40.4-3.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update e2fsprogs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-8831

Comment 8 Fedora Update System 2008-10-16 02:12:15 UTC
e2fsprogs-1.41.3-2.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update e2fsprogs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8884

Comment 9 Fedora Update System 2008-11-06 04:07:04 UTC
e2fsprogs-1.41.3-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2008-11-26 06:18:32 UTC
e2fsprogs-1.40.4-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.