[Top] [All Lists]

Re: xfs_logprint segfault with external log

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: xfs_logprint segfault with external log
From: Alexander Tsvetkov <alexander.tsvetkov@xxxxxxxxxx>
Date: Mon, 16 Feb 2015 16:55:14 +0300
Cc: Eric Sandee <sandeen@xxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150212230940.GD12722@dastard>
References: <54DB5E70.80607@xxxxxxxxxx> <20150211205406.GT4251@dastard> <54DC940D.4030009@xxxxxxxxxx> <20150212230940.GD12722@dastard>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/13/2015 02:09 AM, Dave Chinner wrote:
On Thu, Feb 12, 2015 at 02:52:45PM +0300, Alexander Tsvetkov wrote:
On 02/11/2015 11:54 PM, Dave Chinner wrote:
On Wed, Feb 11, 2015 at 04:51:44PM +0300, Alexander Tsvetkov wrote:

I've obtained corrupted xfs log after some sanity xfs testing:


dd if=/dev/zero "of=$log" bs=4096 count=$log_size
loopdev=$(losetup -f)
losetup $loopdev $log

mkfs.xfs -f -m crc=1 -llogdev=$loopdev,size=${log_size}b $SCRATCH_DEV
mount -t xfs -ologdev=$loopdev $SCRATCH_DEV $SCRATCH_MNT
./fdtree.sh  -l 4 -d 4 -C -o $SCRATCH_MNT

xfs_logprint -l $loopdev $SCRATCH_DEV"

Test makes crc enabled xfs filesystem with the external log of
minimal allowed size and then creates on this fs the small directory
with sub directories and files of fixed depth and size with help of
fdtree utility:
Just take metadump image and put it somewhere we can down load it.

After that xfs_logprint stably reports bad data in log:
Please try the patch below, it fixes the problem on the image you

I've restored provided image to filesystem with the same log file, applied patch to latest xfsprogs and have stable pass runs of xfs_logprint on that filesystem and running with xfsprogs without this patch results to xfs_logprint segfaults reported that means patch is working. The problem that it is not working for repeated test runs where xfs_logprint still continue to report bad log data. It seems it is working for some cases including this image, because sometimes test can be passed but most part of test runs have still this xfs_logprint log error. Here is another fs image that is still failed for me with patch applied to xfsprogs: https://drive.google.com/file/d/0B1Cg0_B_ui2gM1Bzdkc3TWVqbGM/view?usp=sharing


Alexander Tsvetkov

<Prev in Thread] Current Thread [Next in Thread>