Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 616338 - [ext4] repquota tricky grace time after running fsstress
[ext4] repquota tricky grace time after running fsstress
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Eric Sandeen
Petr Beňas
: RHELNAK
Depends On: 616334
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-20 04:14 EDT by Petr Beňas
Modified: 2015-01-04 17:59 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-29 04:24:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Beňas 2010-07-20 04:14:44 EDT
+++ This bug was initially created as a clone of Bug #616334 +++

Description of problem:
xfstest 233 failing on ext4

Version-Release number of selected component (if applicable):
2.6.32-44.el6.x86_64

How reproducible:
sometimes

Steps to Reproduce:
install dependencies:
autoconf       
e2fsprogs-devel
gcc-c++        
gdbm-devel     
git            
indent         
libacl-devel   
libaio-devel   
libattr-devel  
libtool        
libuuid-devel  
rpm-build      
xfsprogs-devel 

# useradd fsgqa
# git clone git://oss.sgi.com/xfs/cmds/xfstests
[root@hp-dl360g6-01 ~]# truncate --size 1G file
[root@hp-dl360g6-01 ~]# mkfs.ext4 -F file
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376

Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@hp-dl360g6-01 ~]# losetup /dev/loop0 file 
[root@hp-dl360g6-01 ~]# mkdir /mnt/test
[root@hp-dl360g6-01 ~]# mount /dev/loop0 /mnt/test
[root@hp-dl360g6-01 ~]# export TEST_DEV=/dev/loop0
[root@hp-dl360g6-01 ~]# export TEST_DIR=/mnt/test/
[root@hp-dl360g6-01 ~]# truncate --size 2G scratch
[root@hp-dl360g6-01 ~]# mkfs.ext4 -F scratch 
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@hp-dl360g6-01 ~]# losetup /dev/loop1 scratch 
[root@hp-dl360g6-01 ~]# mkdir /mnt/scratch
[root@hp-dl360g6-01 ~]# mount /dev/loop1 /mnt/scratch/
[root@hp-dl360g6-01 ~]# export SCRATCH_DEV=/dev/loop1
[root@hp-dl360g6-01 ~]# export SCRATCH_DEV=/dev/loop1
[root@hp-dl360g6-01 ~]# cd xfstests/
[root@hp-dl360g6-01 xfstests]# make
[root@hp-dl360g6-01 xfstests]# ./check 233

Actual results:
FSTYP         -- ext4
PLATFORM      -- Linux/x86_64 hp-dl360g6-01 2.6.32-44.el6.x86_64
MKFS_OPTIONS  -- /dev/loop1
MOUNT_OPTIONS -- -o acl,user_xattr -o context=system_u:object_r:nfs_t:s0 /dev/loop1 /mnt/scratch

233      [failed, exit status 1] - output mismatch (see 233.out.bad)
--- 233.out     2010-07-12 07:29:32.358561148 -0400
+++ 233.out.bad 2010-07-13 08:35:04.881930922 -0400
@@ -3,4 +3,11 @@
 Testing fsstress
 
 fsstress -z -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 -n 5000 -d outdir -p 7
+Trying: /root/xfstests/ltp/fsstress
 seed = S
+7,8c7,8
+< #501      --   15392       0       0            998     0     0       
+< #501      --   15392   32000   32000            998  1000  1000       
+---
+> #501      +-   32084   32000   32000  7days     998  1000  1000       
+> #501      --   32084       0       0            998     0     0       
Ran: 233
Failures: 233
Failed 1 of 1 tests

Expected results:
Passes the test

Additional info:
the difference between 233 and 231 failures is the "7days" note which is not
present in 231 failure. This is the failure for this bug, the used blocks
increased are reported in bz 616334.
this is the function where fail is detected:
check_usage()
{
	quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
	repquota -u -g -n $SCRATCH_MNT  | grep -v "^#0" | filter_scratch |
		sort >$tmp.orig
	quotacheck -u -g $SCRATCH_MNT 2>/dev/null
	repquota -u -g -n $SCRATCH_MNT  | grep -v "^#0" | filter_scratch |
		sort >$tmp.checked
	quotaon -u -g $SCRATCH_MNT 2>/dev/null
	diff $tmp.orig $tmp.checked
}
if you get Permission denied while running this test, change $FSSTRESS_PROG to
./ltp/fsstress in the following function.
_fsstress()
{
	echo ""
	echo "Testing fsstress"
	echo ""

	out=$SCRATCH_MNT/fsstress.$$
	count=5000
	args="-z \
-f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
-f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
-n $count -d $out -p 7"

	echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
	if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $here/$seq.full | _filter_num
	then
		echo "    fsstress $args returned $?"
		cat $tmp.out | tee -a $here/$seq.full
		status=1
	fi
}
see xfstest 233 for more details
Comment 2 RHEL Product and Program Management 2010-07-20 04:37:43 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 3 Eric Sandeen 2010-07-26 17:24:03 EDT
This doesn't fail for me.

It looks like in your case, quotacheck was somehow setting a "7days" grace period, or at least repquota was only reporting it the 2nd time it was called.

In my runs, I got nothing in the grace period column either time.

quota-3.17-10.el6.x86_64 is what I tested with.... how about you?  Perhaps the quota package changed behavior at some point?
Comment 5 Eric Sandeen 2010-07-27 11:08:19 EDT
I think this is just a test problem.

Could you please update your xfstests git tree to the latest, and re-run the test?

http://git.kernel.org/?p=fs/xfs/xfstests-dev.git;a=commitdiff;h=176002236e4902dc66e20a2bbba8609731733e8a

should have fixed this problem.
Comment 6 Petr Beňas 2010-07-29 04:24:30 EDT
closed notabug. it's fixed in latest xfstests with additional oneline patch required. It's not ext4 bug at all.

it fails due to unsufficient  permissions of fsgqa user on /root absolute path.
[root@dell-pesc1420-01 xfstests]# ./check 233
FSTYP         -- ext4
PLATFORM      -- Linux/x86_64 dell-pesc1420-01 2.6.32-44.el6.x86_64
MKFS_OPTIONS  -- /dev/loop1
MOUNT_OPTIONS -- -o acl,user_xattr -o context=system_u:object_r:nfs_t:s0 /dev/loop1 /mnt/scratch

233      - output mismatch (see 233.out.bad)
--- 233.out     2010-07-29 03:48:50.859625165 -0400
+++ 233.out.bad 2010-07-29 04:02:58.484624084 -0400
@@ -3,6 +3,6 @@
 Testing fsstress
 
 fsstress -z -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 -n 5000 -d outdir -p 7
-seed = S
+bash: /root/xfstests/ltp/fsstress: Permission denied
 Comparing user usage
 Comparing group usage
Ran: 233
Failures: 233
Failed 1 of 1 tests

with common.config scripth slightly changed
[root@dell-pesc1420-01 xfstests]# diff -u common.config.orig common.config
--- common.config.orig  2010-07-29 04:13:04.383628531 -0400
+++ common.config       2010-07-29 04:18:38.040625087 -0400
@@ -117,7 +117,7 @@
 export UMOUNT_PROG="`set_prog_path umount`"
 [ "$UMOUNT_PROG" = "" ] && _fatal "umount not found"
 
-export FSSTRESS_PROG="`set_prog_path fsstress $PWD/ltp/fsstress`"
+export FSSTRESS_PROG="`set_prog_path fsstress ./ltp/fsstress`"
 [ "$FSSTRESS_PROG" = "" ] && _fatal "fsstress not found"
 
 export PERL_PROG="`set_prog_path perl`"

it passes
[root@dell-pesc1420-01 xfstests]# ./check 233
FSTYP         -- ext4
PLATFORM      -- Linux/x86_64 dell-pesc1420-01 2.6.32-44.el6.x86_64
MKFS_OPTIONS  -- /dev/loop1
MOUNT_OPTIONS -- -o acl,user_xattr -o context=system_u:object_r:nfs_t:s0 /dev/loop1 /mnt/scratch

233
Ran: 233
Passed all 1 tests

Note You need to log in before you can comment on or make changes to this bug.