Project

General

Profile

Bug #41148

client: _readdir_cache_cb() may use the readdir_cache already clear

Added by huanwen ren over 1 year ago. Updated 11 months ago.

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

0%

Source:
Community (dev)
Tags:
Backport:
nautilus,mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
fs
Component(FS):
Client
Labels (FS):
Pull request ID:
Crash signature:

Description

Calling function A means to get dir information from the cache, but in the while loop,
the contents of readdir_cache are not static.

For example, _getattr() will trigger insert_trace to update readdir_cache, such as:
1. insert_trace()->clear_dir_complete_and_ordered() or
2. insert_trace()->add_update_inode()->add_update_cap()-> check_cap_issue()->clear_dir_complete_and_ordered()

So, there is a possibility that dn is empty after the _getattr() call.

client.log View (24.8 KB) huanwen ren, 08/07/2019 07:19 AM

2019-08-07_152907.png View (93.4 KB) huanwen ren, 08/07/2019 07:31 AM


Related issues

Copied to fs - Backport #42038: mimic: client: _readdir_cache_cb() may use the readdir_cache already clear Resolved
Copied to fs - Backport #42039: luminous: client: _readdir_cache_cb() may use the readdir_cache already clear Resolved
Copied to fs - Backport #42040: nautilus: client: _readdir_cache_cb() may use the readdir_cache already clear Resolved

History

#1 Updated by huanwen ren over 1 year ago

  • Source set to Community (dev)
  • Affected Versions v14.2.2 added
  • Affected Versions deleted (v14.2.1)

#2 Updated by Zheng Yan over 1 year ago

  • Source deleted (Community (dev))
  • Affected Versions v14.2.1 added
  • Affected Versions deleted (v14.2.2)

I think getattr does not affect parent directory inode's completeness

#3 Updated by huanwen ren over 1 year ago

Zheng Yan wrote:

I think getattr does not affect parent directory inode's completeness

From the log, there is a trigger clear_dir_complete_and_ordered call, see the log print "clearing I_DIR_ORDERED" in the attached file.

#4 Updated by huanwen ren over 1 year ago

huanwen ren wrote:

Zheng Yan wrote:

I think getattr does not affect parent directory inode's completeness

From the log, there is a trigger clear_dir_complete_and_ordered call, see the log print "clearing I_DIR_ORDERED" in the attached file.

if there is a concurrent delete operation, insert_trace will also trigger the unlink operation and update the readdir_cache

#5 Updated by huanwen ren over 1 year ago

segment fault:inode=0x0

#6 Updated by Zheng Yan over 1 year ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 29526

#7 Updated by Patrick Donnelly about 1 year ago

  • Status changed from Fix Under Review to Pending Backport
  • Assignee set to huanwen ren
  • Target version set to v15.0.0
  • Start date deleted (08/07/2019)
  • Source set to Community (dev)
  • Backport set to nautilus,mimic,luminous

#8 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #42038: mimic: client: _readdir_cache_cb() may use the readdir_cache already clear added

#9 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #42039: luminous: client: _readdir_cache_cb() may use the readdir_cache already clear added

#10 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #42040: nautilus: client: _readdir_cache_cb() may use the readdir_cache already clear added

#11 Updated by Nathan Cutler 11 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