Project

General

Profile

Bug #44525

LibCephFS::RecalledGetattr test failed

Added by victor zhang 4 months ago. Updated about 2 months ago.

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

0%

Source:
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature:

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);

Related issues

Copied to fs - Backport #44843: octopus: LibCephFS::RecalledGetattr test failed Resolved

History

#1 Updated by Greg Farnum 4 months ago

  • Assignee set to Zheng Yan

#2 Updated by Xiubo Li 4 months ago

  • Status changed from New to In Progress
  • Assignee changed from Zheng Yan to Xiubo Li

As discussed with Yan, I will take it.

#3 Updated by Xiubo Li 4 months 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

#4 Updated by Xiubo Li 4 months 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.

#5 Updated by Xiubo Li 4 months ago

  • Status changed from In Progress to Fix Under Review

#6 Updated by Greg Farnum 3 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to octopus

#7 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #44843: octopus: LibCephFS::RecalledGetattr test failed added

#8 Updated by Nathan Cutler 2 months ago

  • Pull request ID set to 34021

#9 Updated by Nathan Cutler about 2 months 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".

Also available in: Atom PDF