Bug 1722546 - do not assert in inode_unref if the inode table cleanup has started
Summary: do not assert in inode_unref if the inode table cleanup has started
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-20 15:28 UTC by Raghavendra Bhat
Modified: 2019-07-05 08:10 UTC (History)
2 users (show)

Fixed In Version: glusterfs-7.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-05 08:10:54 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 22650 0 None Open * core: do not assert in inode_unref if the inode table cleanup has started 2019-06-20 15:30:06 UTC

Description Raghavendra Bhat 2019-06-20 15:28:23 UTC
Description of problem:

There is a good chance that, the inode on which unref came has already been
zero refed and added to the purge list. This can happen when inode table is
being destroyed (glfs_fini is something which destroys the inode table).

Consider a directory 'a' which has a file 'b'. Now as part of inode table destruction
zero refing of inodes does not happen from leaf to the root. It happens in the order
inodes are present in the list. So, in this example, the dentry of 'b' would have its
parent set to the inode of 'a'. So if 'a' gets zero refed first (as part of
inode table cleanup) and then 'b' has to zero refed, then dentry_unset is called on
the dentry of 'b' and it further goes on to call inode_unref on b's parent which is
'a'. In this situation, GF_ASSERT would be called as the refcount of 'a' has been
already set to zero.

So, return the inode (in the function inode_unref without doing anything) if the
inode table cleanup has already started and inode's refcount is zero.


Version-Release number of selected component (if applicable):


How reproducible:

This might happen when glfs_fini is called from a gfapi based process.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2019-06-20 15:30:08 UTC
REVIEW: https://review.gluster.org/22650 (* core: do not assert in inode_unref if the inode table cleanup has started) posted (#4) for review on master by Raghavendra Bhat


Note You need to log in before you can comment on or make changes to this bug.