Project

General

Profile

Bug #56010

xfstests-dev generic/444 test failed

Added by Xiubo Li 6 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Q/A
Tags:
backport_processed
Backport:
quincy,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

[root@lxbceph1 xfstests-dev]# ./check generic/444
FSTYP         -- ceph
PLATFORM      -- Linux/x86_64 lxbceph1 5.18.0+ #147 SMP PREEMPT_DYNAMIC Sun Jun 12 12:13:36 CST 2022
MKFS_OPTIONS  -- 10.72.47.117:40975:/testB
MOUNT_OPTIONS -- -o name=admin,nowsync,copyfrom,rasize=4096 -o context=system_u:object_r:root_t:s0 10.72.47.117:40975:/testB /mnt/kcephfs.B

generic/444 67s ... - output mismatch (see /data/xfstests-dev/results//generic/444.out.bad)
    --- tests/generic/444.out    2022-04-07 21:42:10.626045735 +0800
    +++ /data/xfstests-dev/results//generic/444.out.bad    2022-06-13 10:02:26.697625941 +0800
    @@ -1,3 +1,3 @@
     QA output created by 444
    -drwxrwsr-x
    -drwxrwsr-x
    +drwxrwxr-x
    +drwxrwxr-x
    ...
    (Run 'diff -u /data/xfstests-dev/tests/generic/444.out /data/xfstests-dev/results//generic/444.out.bad'  to see the entire diff)
Ran: generic/444
Failures: generic/444
Failed 1 of 1 tests


Related issues

Copied to CephFS - Backport #56464: quincy: xfstests-dev generic/444 test failed Resolved
Copied to CephFS - Backport #56465: pacific: xfstests-dev generic/444 test failed Resolved

History

#1 Updated by Xiubo Li 6 months ago

Just sleep for 10 seconds the test passed:

[root@lxbceph1 xfstests-dev]# git diff tests/
diff --git a/tests/generic/444 b/tests/generic/444
index 8f6b7c2c..f7715e9c 100755
--- a/tests/generic/444
+++ b/tests/generic/444
@@ -31,6 +31,7 @@ setfacl -d -m u:101:rwx $TDIR
 chown 100:100 $TDIR
 chmod 2755 $TDIR

+sleep 10
 _runas -u 100 -g 100 -- mkdir $TDIR/testsub1
 stat -c %A $TDIR/testsub1
 _runas -u 100 -g 101 -- mkdir $TDIR/testsub2

When making the testsub1 and testsub2 in MDS side while preparing new Cinode, it will use parent diri's non-projected inode, please see https://github.com/ceph/ceph/blob/main/src/mds/Server.cc#L3361-L3372.

Just wait for 10s, which is larger than 5s, the mdlog has been flushed.

I am not sure why with 5.18-rc5 it worked, while with new kernel code it won't.

Anyway we should fix it in MDS side first.

#2 Updated by Xiubo Li 6 months ago

  • Status changed from New to In Progress

#3 Updated by Xiubo Li 6 months ago

It was introduce by recent fixing from [1].

When setting the system.posix_acl_default it will always do sync request, which in MDS side it will revoke the Xx cap from kclient:

2080 <7>[  425.580581] ceph:  d_revalidate 0000000073151ee9 'testdir.444' inode 0000000015190edc offset 0x0
2081 <7>[  425.580588] ceph:  dentry_lease_is_valid - dentry 0000000073151ee9 = 0
2082 <7>[  425.580594] ceph:  __ceph_caps_issued_mask ino 0x10000000000 cap 00000000f795da95 issued pAsLsXsFsxcr (mask Fs)
2083 <7>[  425.580600] ceph:  __touch_cap 000000003068a869 cap 00000000f795da95 mds0
2084 <7>[  425.580606] ceph:  dentry_dir_lease_touch 000000005f9dcb27 0000000073151ee9 'testdir.444' (offset 0x0)
2085 <7>[  425.580613] ceph:  dir_lease_is_valid dir 000000003068a869 v3 dentry 0000000073151ee9 = 1
2086 <7>[  425.580619] ceph:  d_revalidate 0000000073151ee9 valid
2087 <7>[  425.581070] ceph:  __ceph_caps_issued 0000000015190edc cap 00000000dcba0f3b issued pAsxLsXsxFsx
2088 <7>[  425.581084] ceph:  __get_required_blob_size c=0 names.size=0 vals.size=0
2089 <7>[  425.581095] ceph:  __ceph_setxattr do sync setxattr: version: 1 size: 80 max: 0                                                             
2090 <7>[  425.581177] ceph:  setxattr value size: 44
2091 <7>[  425.581323] ceph:  xattr.ver (before): 1
2092 <7>[  425.581332] ceph:  do_request on 00000000429e7c02
2093 <7>[  425.581341] ceph:  submit_request on 00000000429e7c02 for inode 0000000000000000
2094 <7>[  425.581354] ceph:  reserve caps ctx=00000000ae8fc6af need=1
2095 <7>[  425.581360] ceph:  reserve caps ctx=00000000ae8fc6af 7 = 5 used + 1 resv + 1 avail
2096 <7>[  425.581367] ceph:  __register_request 00000000429e7c02 tid 11
2097 <7>[  425.581374] ceph:  __choose_mds 0000000015190edc is_hash=0 (0x0) mode 2
2098 <7>[  425.581382] ceph:  __choose_mds 0000000015190edc 100000005df.fffffffffffffffe mds0 (auth cap 00000000dcba0f3b)
2099 <7>[  425.581393] ceph:  do_request mds0 session 00000000146e08e4 state open
2100 <7>[  425.581401] ceph:  __prepare_send_request 00000000429e7c02 tid 11 setxattr (attempt 1)
2101 <7>[  425.581409] ceph:   inode 0000000015190edc 100000005df.fffffffffffffffe
2102 <7>[  425.581416] ceph:   path system.posix_acl_default

Then later in MDS side in [2] when making new testsub1 directory and preparing the new CInode it will always get the non-projected inode, but the mdlog hasn't flushed yet from previous setxattr request as mentioned in https://tracker.ceph.com/issues/56010?issue_count=86&issue_position=1&next_issue_id=55857#note-1.

I will fix it in MDS side instead.

[1] https://github.com/ceph/ceph-client/commit/dea94541077519a9c62dba9f980b1509e5a52872
[2] https://github.com/ceph/ceph/blob/main/src/mds/Server.cc#L3361-L3372

#4 Updated by Xiubo Li 6 months ago

  • Project changed from Linux kernel client to CephFS
  • Status changed from In Progress to Fix Under Review
  • Backport set to quincy,pacific
  • Pull request ID set to 46641
  • Component(FS) MDS added

#5 Updated by Patrick Donnelly 6 months ago

  • Target version set to v18.0.0
  • Source set to Q/A

#6 Updated by Venky Shankar 5 months ago

  • Status changed from Fix Under Review to Pending Backport

#7 Updated by Backport Bot 5 months ago

  • Copied to Backport #56464: quincy: xfstests-dev generic/444 test failed added

#8 Updated by Backport Bot 5 months ago

  • Copied to Backport #56465: pacific: xfstests-dev generic/444 test failed added

#9 Updated by Backport Bot 4 months ago

  • Tags set to backport_processed

#10 Updated by Xiubo Li 3 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF