[Bugs] [Bug 1423385] New: Crash in index xlator because of race in inode_ctx_set and inode_ref

bugzilla at redhat.com bugzilla at redhat.com
Fri Feb 17 08:18:28 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1423385

            Bug ID: 1423385
           Summary: Crash in index xlator because of race in inode_ctx_set
                    and inode_ref
           Product: GlusterFS
           Version: 3.10
         Component: libglusterfsclient
          Assignee: bugs at gluster.org
          Reporter: pgurusid at redhat.com
                CC: bugs at gluster.org
        Depends On: 1423373



+++ This bug was initially created as a clone of Bug #1423373 +++

Description of problem:
Some regression test cases in afr were failing because of this bug.

RCA:
    Currently inode ref count is gaurded by inode_table->lock, and
    inode_ctx is gauarded by inode->lock. With the new patch [1]
    inode_ref was modified to change the inode_ctx to track the ref
    count per xlator. Thus inode_ref performed under inode_table->lock
    is modifying inode_ctx which has to be modified only under inode->lock

Solution:
    When a inode is created, inode_ctx holder is allocated for all the xlators.
    Hence in case of inode_ctx_set instead of using the first free index in
    inode ctx holder, we can have predecided index for every xlator in the
graph.



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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Worker Ant on 2017-02-17 03:17:16 EST ---

REVIEW: https://review.gluster.org/16622 (libglusterfs: Fix a crash due to race
between inode_ctx_set and inode_ref) posted (#4) for review on master by
Poornima G (pgurusid at redhat.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1423373
[Bug 1423373] Crash in index xlator because of race in inode_ctx_set and
inode_ref
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list