+++ This bug was initially created as a clone of Bug #679076 +++
Cloned for a RHEL6 crosswrite fix.
Description of problem:
While recently analyzing a customer's gfs2 metadata, I ran
fsck.gfs2 and it segfaulted in pass1b. I tracked down the
problem, and this bug is to track the problem and its fix.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Restore customer metadata
2. fsck.gfs2 -y /dev/device
Segfault in pass1b
fsck.gfs2 should run to completion.
--- Additional comment from firstname.lastname@example.org on 2011-02-21 09:15:25 EST ---
Created attachment 479925 [details]
Patch to fix the problem
The problem occurred when there were duplicate block
references in a dinode but all references in the duplicate
list are eventually deleted due to other corruption.
The fix is an additional check whether the list is empty.
--- Additional comment from email@example.com on 2011-02-21 09:16:28 EST ---
Requesting ack flags for 5.7.
I pushed the patch to the master branch of the gfs2-util
git repo. I guess I'll have to wait to push it into the
RHEL6 branch of cluster.git until 6.1 branches from RHEL6,
unless management wants to squeeze it in.
Can we get this into the rhel6 branch yet?
RHEL61 still has not branched from RHEL6, so no. I'll bug
Fabio when he's back from pto or Lon when he's back from Summit.
Created attachment 502805 [details]
This is the patch I pushed to the cluster.git repo for the
Since the RHEL6 branch is now open for business, I pushed the
patch to it for inclusion into 6.2. I tested it on system
gfs-i24c-01. Changing status to POST until it gets built.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
When fsck.gfs2 resolves duplicate block references, if all block references are found to be invalid (no valid references are found), its reference list becomes empty.
Some code in pass1b improperly tried to access references on the empty list. As a result, fsck.gfs2 would end abnormally with a segmentation fault. Code was added to pass1b to check for the list being empty. As a result, the segmentation fault no longer occurs and fsck.gfs2 proceeds normally.
Verified SanityOnly in cluster-184.108.40.206-23.el6
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.