Bug 463588

Summary: GFS2: gfs2_fsck segfaults when extended attributes are on the file system
Product: Red Hat Enterprise Linux 5 Reporter: Nate Straz <nstraz>
Component: gfs2-utilsAssignee: Robert Peterson <rpeterso>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: bstevens, edamato, syeghiay
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:52:08 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:
Attachments:
Description Flags
core dump from gfs2_fsck, gzipped
none
Patch to fix the problem none

Description Nate Straz 2008-09-23 22:52:55 UTC
Created attachment 317542 [details]
core dump from gfs2_fsck, gzipped

Description of problem:

After adding extended attributes to a file system, gfs2_fsck seg faults while checking it.


Core was generated by `gfs2_fsck /dev/tankmorph/tankmorph0 -yq'.
Program terminated with signal 11, Segmentation fault.
#0  0x0804ed86 in pass1c ()
(gdb) bt
#0  0x0804ed86 in pass1c ()
#1  0x08049cbb in main ()
#2  0x00578dec in __libc_start_main () from /lib/libc.so.6
#3  0x08048fb1 in _start ()


Version-Release number of selected component (if applicable):
gfs2-utils-0.1.47-1.el5

How reproducible:
100%

Steps to Reproduce:
1. add extended attributes to a file system
2. umount
3. fsck
  
Actual results:


Expected results:

gfs2_fsck should not segfault.


Additional info:

Comment 2 Robert Peterson 2008-09-24 16:45:45 UTC
Created attachment 317605 [details]
Patch to fix the problem

This was a simple case of needing to use the "_safe" version of
the osi_list_foreach function.  That's because there are places
where entries are being deleted off the list as I'm running the list.
This patch fixes the problem, and I tested it on the file system
that had the problem, from system tank-01.

Comment 3 Robert Peterson 2008-09-24 17:09:56 UTC
The patch was pushed to the master, STABLE2 and RHEL5 branches of the
cluster git tree for inclusion into 5.3.  It was tested on the failing
file system on tank-01.  Changing status to Modified.

Comment 5 Nate Straz 2008-11-14 21:08:22 UTC
Verified with gfs2-utils-0.1.49-1.el5.

Comment 7 errata-xmlrpc 2009-01-20 20:52:08 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-2009-0087.html