[LU-1112] POSIX test failed in 2.1.55 Created: 17/Feb/12  Updated: 29/Feb/12  Resolved: 29/Feb/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.2.0
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Sarah Liu Assignee: Zhenyu Xu
Resolution: Duplicate Votes: 0
Labels: None

Attachments: File posix     File res.tar.gz    
Severity: 3
Rank (Obsolete): 6453

 Description   

SUCCESS SUMMARY:

News POSIX successes: 1

Test Name Baseline Lustre Report
read.15 Failed Succeeded

FAILURE SUMMARY:

POSIX failures: 9

Test Name Baseline Lustre Report
creat.10 Succeeded Failed
creat.15 Succeeded Failed
creat.7 Succeeded Failed
open.14 Succeeded Failed
open.15 Succeeded Failed
unlink.6 Succeeded Failed
utime.4 Succeeded Failed
utime.9 Succeeded Failed
write.15 Succeeded Failed

For the failure of write.15 and unlink.6 please refer to LU-380



 Comments   
Comment by Peter Jones [ 17/Feb/12 ]

Bobi

Could you please look at this one

Thanks

Peter

Comment by Zhenyu Xu [ 17/Feb/12 ]

Is there any lustre logs?

Comment by Zhenyu Xu [ 17/Feb/12 ]

what is the LSB-VSX posix test suite version?

Comment by Zhenyu Xu [ 17/Feb/12 ]

And please also upload posix test result, so that we can see what specific test step fails.

Comment by Sarah Liu [ 17/Feb/12 ]

Hi, you can find the version and posix result in the attached file and there is no lustre log.

Comment by Zhenyu Xu [ 17/Feb/12 ]

Is the uploaded "posix" detailed posix test result? Sorry, would you collect lustre logs for another try? I still need lustre logs to analyse what problem it is.

Comment by Sarah Liu [ 20/Feb/12 ]

ok, will keep you updated.

Comment by Zhenyu Xu [ 21/Feb/12 ]

From the log file "posix" all errors are EPERM, I'm wondering that it's because user "vsx0" has no proper access right in /mnt/lustre/TESTROOT.

If you re-hit the issue, would you mind trying "chown -R vsx0.vsxg0 /mnt/lustre/TESTSROOT" after /mnt/lutsre is mounted and run the test again?

Comment by Sarah Liu [ 22/Feb/12 ]

Hi,
I found the permission of /mnt/lustre/TESTROOT is

[root@client-15 tmp]# ls -al /mnt/lustre/
total 16
drwxr-xr-x 4 root root 4096 Feb 22 13:13 .
drwxr-xr-x. 4 root root 4096 Feb 22 12:25 ..
drwxr-xr-x 2 root root 4096 Feb 22 13:05 .lustre
drwxr-sr-x 5 vsx0 vsxg0 4096 Feb 22 13:14 TESTROOT

I don't know why it will cause permission issue. And please find the lustre debug log in the attached.I also upload the whole result dir, hope that does help.

Comment by Sarah Liu [ 22/Feb/12 ]

results. Sorry the debug log is too big to be uploaded, you can find it in my home dir on brent /home/sarah/debug_log

Comment by Zhenyu Xu [ 23/Feb/12 ]

00000080:00200000:1.0:1329945342.255336:0:7319:0:(namei.c:535:ll_lookup_it()) VFS Op:name=creat-t.10,dir=144115205255726268/33554436(ffff88023fca3828),intent=open|creat
00000080:00200000:1.0:1329945342.256257:0:7319:0:(namei.c:789:ll_create_it()) VFS Op:name=creat-t.10,dir=144115205255726268/33554436(ffff88023fca3828),intent=open|creat
00000080:00010000:1.0:1329945342.256279:0:7319:0:(namei.c:758:ll_create_node()) setting l_ast_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00010000:1.0:1329945342.256281:0:7319:0:(llite_internal.h:1431:ll_set_lock_data()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00200000:1.0:1329945342.256284:0:7319:0:(file.c:513:ll_file_open()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768), flags 100101 ==> O_LARGEFILE|O_CREAT|O_WRONLY
00000080:00200000:1.0:1329945342.256297:0:7319:0:(file.c:2509:ll_inode_permission()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768), inode mode 81ff mask 0
00000080:00200000:1.0:1329945342.257014:0:7319:0:(xattr.c:419:ll_getxattr()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768), xattr security.capability
00000080:00200000:1.0:1329945342.257016:0:7319:0:(xattr.c:284:ll_getxattr_common()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768)
00000080:00200000:1.0:1329945342.257106:0:7319:0:(file.c:297:ll_file_release()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768)

00000080:00200000:3.0:1329945342.263165:0:7323:0:(namei.c:535:ll_lookup_it()) VFS Op:name=creat-t.10,dir=144115205255726268/33554436(ffff88023fca3828),intent=getattr
00000080:00010000:0.0:1329945342.263964:0:7323:0:(llite_internal.h:1431:ll_set_lock_data()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00010000:0.0:1329945342.263967:0:7323:0:(dcache.c:376:ll_lookup_finish_locks()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00200000:0.0:1329945342.263986:0:7323:0:(file.c:2252:__ll_inode_revalidate_it()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768),name=creat-t.10
00000080:00010000:0.0:1329945342.264004:0:7323:0:(dcache.c:376:ll_lookup_finish_locks()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00010000:0.0:1329945342.264006:0:7323:0:(llite_internal.h:1431:ll_set_lock_data()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00200000:0.0:1329945342.264415:0:7323:0:(dcache.c:410:ll_revalidate_it()) VFS Op:name=creat-t.10,intent=open|creat
00000080:00010000:1.0:1329945342.265200:0:7323:0:(llite_internal.h:1431:ll_set_lock_data()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00200000:1.0:1329945342.265204:0:7323:0:(file.c:513:ll_file_open()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768), flags 101101 ==>O_LARGEFILE|O_TRUNC|O_CREAT|O_WRONLY
00000080:00200000:1.0:1329945342.265224:0:7323:0:(file.c:2509:ll_inode_permission()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768), inode mode 81ff mask 42 ==>mode:S_IFREG|S_IRWXU|S_IRWXG|S_IRWXO ==>mask:MAY_CHDIR|MAY_WRITE
00000080:00200000:1.0:1329945342.265229:0:7323:0:(llite_lib.c:1329:ll_setattr_raw()) VFS Op:inode=144115205255726326 valid a068
00000080:00200000:1.0:1329945342.265794:0:7323:0:(file.c:297:ll_file_release()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768)
00000080:00200000:0.0:1329945342.272682:0:7319:0:(namei.c:535:ll_lookup_it()) VFS Op:name=creat-t.10,dir=144115205255726268/33554436(ffff88023fca3828),intent=getattr
00000080:00010000:1.0:1329945342.273533:0:7319:0:(llite_internal.h:1431:ll_set_lock_data()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00010000:1.0:1329945342.273536:0:7319:0:(dcache.c:376:ll_lookup_finish_locks()) setting l_data to inode ffff8802a3b3f768 (144115205255726326/33554436)
00000080:00200000:1.0:1329945342.273556:0:7319:0:(namei.c:1135:ll_unlink_generic()) VFS Op:name=creat-t.10,dir=144115205255726268/33554436(ffff88023fca3828)
00000080:00200000:1.0:1329945342.274565:0:7319:0:(llite_lib.c:1130:ll_clear_inode()) VFS Op:inode=144115205255726326/33554436(ffff8802a3b3f768)
00000080:00200000:3.0:1329945383.166170:0:7319:0:(namei.c:535:ll_lookup_it()) VFS Op:name=creat-t.10,dir=144115205255726268/33554436(ffff88023fca3828),intent=getattr

from the log (in creatt.10 case), the permission check is ok, also inode_permission() will not return -EPERM, but suspicious code lies in may_open()

excerpt from may_open()
	error = inode_permission(inode, acc_mode);
	if (error)
		return error;

	/*
	 * An append-only file must be opened in append mode for writing.
	 */
	if (IS_APPEND(inode)) {
		if  ((flag & O_ACCMODE) != O_RDONLY && !(flag & O_APPEND))
			return -EPERM;
		if (flag & O_TRUNC)
			return -EPERM;
	}

	/* O_NOATIME can only be set by the owner or superuser */
	if (flag & O_NOATIME && !inode_owner_or_capable(inode))
		return -EPERM;

The second ll_file_open() call has O_TRUNC flag, I suspect that the inode was set S_APPEND flag.

Comment by Zhenyu Xu [ 24/Feb/12 ]

my local vm test does not have this issue.

Comment by Jian Yu [ 28/Feb/12 ]

Hi Sarah and Bobi,

FYI...

Lustre Branch: master
Lustre Build: http://build.whamcloud.com/job/lustre-master/491/
Distro/Arch: RHEL6/x86_64 (kernel version: 2.6.32_220.4.2.el6)
Network: IB (in-kernel OFED)

I ran the same POSIX compliance test but did not hit the issues in this ticket (except unlink.6 and write.15 which is issue LU-380). Here is the summary:

FAILURE SUMMARY:

POSIX failures: 2

Test Name                   Baseline   Lustre Report
unlink.6                   Succeeded          Failed
write.15                   Succeeded          Failed

Maloo report: https://maloo.whamcloud.com/test_sets/4c324da6-61d5-11e1-b462-5254004bbbd3

Comment by Sarah Liu [ 29/Feb/12 ]

I ran POSIX on the same build and distro as Yu Jian(build 491-RHEL6-x86_64) and got 3 failures, two of them are mentioned in LU-380 and another one is readdir.6 which is shown in LU-379.

FAILURE SUMMARY:

POSIX failures: 3

Test Name Baseline Lustre Report
readdir.6 Succeeded Failed
unlink.6 Succeeded Failed
write.15 Succeeded Failed

Comment by Peter Jones [ 29/Feb/12 ]

Thanks everyone. So we can close this ticket as a duplicate of LU-379 and LU-380

Generated at Sat Feb 10 01:13:37 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.