Seg fault during xfs repair (segmentation fault / segv)

Jesse Stroik jstroik at ssec.wisc.edu
Tue Jun 30 13:29:01 CDT 2009


I have a server with a ~20TB xfs file system on Linux 
(2.6.18-92.1.22.el5) and am running xfsprogs-2.9.4-4.el5.  We had a few 
corrupted files which I believe were due to a SCSI issue after a recent 
power outage.  Due to the corruption, I ran xfs_check and would like to 
run xfs_repair on the system.

The server has a variety of larger file systems as well for which we 
haven't had any issues and are much more filled, so I doubt it is 
related to the size of the data on the file system.

I found a thread on this list which addresses a similar problem, but the 
issues are different enough that I believe this warrants another thread:

http://oss.sgi.com/archives/xfs/2009-06/msg00089.html

Here is a description of my issue, as output by xfs_repair.

xfs_repair -n executes properly.  However, xfs_repair without -n 
segfaults during phase 2 right before entering phase three.  The output 
follows:


xfs_repair
-------------------
...
primary/secondary superblock 31 conflict - AG superblock geometry info 
conflicts with filesystem geometry
bad magic # 0xea84a85b for agf 31
bad version # -1440567846 for agf 31
bad sequence # -1237535942 for agf 31
bad length -834374160 for agf 31, should be 152534208
flfirst -568402337 in agf 31 too large (max = 128)
fllast 258143670 in agf 31 too large (max = 128)
bad magic # 0x2b8d5c56 for agi 31
bad version # -1456306498 for agi 31
bad sequence # 830698397 for agi 31
bad length # 1972157355 for agi 31, should be 152534208
reset bad sb for ag 31
reset bad agf for ag 31
reset bad agi for ag 31
Segmentation fault
-------------------


xfs_repair -n
-------------------
...
primary/secondary superblock 31 conflict - AG superblock geometry info 
conflicts with filesystem geometry
bad flags field in superblock 31
bad shared version number in superblock 31
bad inode alignment field in superblock 31
bad stripe unit/width fields in superblock 31
bad log/data device sector size fields in superblock 31
bad magic # 0xea84a85b for agf 31
bad version # -1440567846 for agf 31
bad sequence # -1237535942 for agf 31
bad length -834374160 for agf 31, should be 152534208
flfirst -568402337 in agf 31 too large (max = 128)
fllast 258143670 in agf 31 too large (max = 128)
bad magic # 0x2b8d5c56 for agi 31
bad version # -1456306498 for agi 31
bad sequence # 830698397 for agi 31
bad length # 1972157355 for agi 31, should be 152534208
would reset bad sb for ag 31
would reset bad agf for ag 31
would reset bad agi for ag 31
bad uncorrected agheader 31, skipping ag...
         - found root inode chunk
Phase 3 - for each AG...
         - scan (but don't clear) agi unlinked lists...
error following ag 8 unlinked list
error following ag 10 unlinked list
-------------------


I attempt to avoid hand-compiled system tools, but in this case I would 
make an exception if it is necessary to either diagnose or address this 
problem.

Best,
Jesse Stroik

Space Science and Engineering Center
University of Wisconsin




More information about the xfs mailing list