Bug #44525
closedLibCephFS::RecalledGetattr test failed
0%
Description
Error reason:
When do Client::_open, MDS didn't return Fs which causes error on this code
ASSERT_EQ(ceph_ll_delegation(cmount2, fh, CEPH_DELEGATION_RD, dummy_deleg_cb, &recalled), 0);
logs:
2020-03-03 02:59:50.165572 7f74a53e45c0 10 set_deleg: inode 0x1000000048a.head(faked_ino=0 ref=6 ll_ref=1 cap_refs={4=0,2048=0,4096=0,8192=0} open={1=1,2=0} mode=100666 size=32/0 nlink=1 mtime=2020-03-03 02:59:50.163809 caps=pAsLsXsFrw(0=pAsLsXsFrw) flushing_caps=Fw objectset[0x1000000048a ts 0/0 objects 0 dirty_or_tx 0] parents=0x7f7258012fa0 0x7f7258011530)
2020-03-03 02:59:50.165582 7f74a53e45c0 10 set_deleg: cap mismatch, have=pAsLsXsFrw need=pAsLsXsFscr
Check code Client::_open, This function didn't require CEPH_CAP_FILE_SHARED. There is possibility MDS didn't return Fs in time, but the Client::open continues without Fs.
if (deleg_timeout && result == 0)
{
int need = 0, have;
if (cmode & CEPH_FILE_MODE_WR)
need |= CEPH_CAP_FILE_WR;
if (cmode & CEPH_FILE_MODE_RD)
need |= CEPH_CAP_FILE_RD; <<<
result = get_caps(in, need, want, &have, -1);
Updated by Xiubo Li about 4 years ago
- Status changed from New to In Progress
- Assignee changed from Zheng Yan to Xiubo Li
As discussed with Yan, I will take it.
Updated by Xiubo Li about 4 years ago
Hi Victor Zhang,
I have tried to reproduce it by checking the v12.2.12, but couldn't success. BTW, is there any change or pre-setting before running the test command ?
$ ./bin/ceph_test_libcephfs
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from LibCephFS
[ RUN ] LibCephFS.DelegMultiClient
[ OK ] LibCephFS.DelegMultiClient (40021 ms)
[ RUN ] LibCephFS.DelegSingleClient
[ OK ] LibCephFS.DelegSingleClient (5043 ms)
[ RUN ] LibCephFS.DelegTimeout
[ OK ] LibCephFS.DelegTimeout (11954 ms)
[ RUN ] LibCephFS.RecalledGetattr
[ OK ] LibCephFS.RecalledGetattr (8017 ms)
[----------] 4 tests from LibCephFS (65035 ms total)
[----------] Global test environment tear-down
[==========] 4 tests from 1 test case ran. (65035 ms total)
[ PASSED ] 4 tests.
Thanks
Updated by Xiubo Li about 4 years ago
The cap grant may delayed and in the case if the inode locally didn't have the 'Fscr', the set_deleg() will return -EAGAIN, we need to wait and retry here.
Updated by Xiubo Li about 4 years ago
- Status changed from In Progress to Fix Under Review
Updated by Greg Farnum about 4 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to octopus
Updated by Nathan Cutler about 4 years ago
- Copied to Backport #44843: octopus: LibCephFS::RecalledGetattr test failed added
Updated by Nathan Cutler almost 4 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".