Bug #41148
client: _readdir_cache_cb() may use the readdir_cache already clear
0%
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.
Related issues
History
#1 Updated by huanwen ren over 4 years ago
- Source set to Community (dev)
- Affected Versions v14.2.2 added
- Affected Versions deleted (
v14.2.1)
#2 Updated by Zheng Yan over 4 years 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 4 years ago
- File client.log View added
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 4 years 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 4 years ago
- File 2019-08-07_152907.png View added
segment fault:inode=0x0
#6 Updated by Zheng Yan over 4 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 29526
#7 Updated by Patrick Donnelly over 4 years 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 over 4 years ago
- Copied to Backport #42038: mimic: client: _readdir_cache_cb() may use the readdir_cache already clear added
#9 Updated by Nathan Cutler over 4 years ago
- Copied to Backport #42039: luminous: client: _readdir_cache_cb() may use the readdir_cache already clear added
#10 Updated by Nathan Cutler over 4 years ago
- Copied to Backport #42040: nautilus: client: _readdir_cache_cb() may use the readdir_cache already clear added
#11 Updated by Nathan Cutler about 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".