[Bugs] [Bug 1625134] New: posix: A race between posix_mknod and posix_unlink can leave the file without a .glusterfs handle

bugzilla at redhat.com bugzilla at redhat.com
Tue Sep 4 08:11:51 UTC 2018


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

            Bug ID: 1625134
           Summary: posix: A race between posix_mknod and posix_unlink can
                    leave the file without a .glusterfs handle
           Product: Red Hat Gluster Storage
           Version: 3.4
         Component: posix
          Assignee: rabhat at redhat.com
          Reporter: nbalacha at redhat.com
        QA Contact: rhinduja at redhat.com
                CC: bugs at gluster.org, rhs-bugs at redhat.com,
                    sankarshan at redhat.com, storage-qa-internal at redhat.com
        Depends On: 1621981
            Blocks: 1619623, 1622001



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

Description of problem:

dht_rename_cbk sends a linkfile create in parallel with the unlinks to clean up
the original src linkto files. If these fops reach the brick out of order, we
end up a linkto file without a gfid handle


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


How reproducible:
Often

Steps to Reproduce:
1. Run glusterfs/tests/bugs/posix/bug-1619720.t over and over again and check
the file listing on both bricks.


Actual results:

/bricks/brick1/backends/patchy0/tmp/:
total 0
---------T. 1 root root 0 Aug 23 20:04 file-3  <-- Only one link

/bricks/brick1/backends/patchy1/tmp/:
total 0
-rw-r--r--. 2 root root 0 Aug 23 20:04 file-3

Expected results:

/bricks/brick1/backends/patchy0/tmp/:
total 0
---------T. 2 root root 0 Aug 23 20:04 file-3

/bricks/brick1/backends/patchy1/tmp/:
total 0
-rw-r--r--. 2 root root 0 Aug 23 20:04 file-3

Additional info:

--- Additional comment from Nithya Balachandran on 2018-08-24 01:46:43 EDT ---

Success case:

[2018-08-23 15:35:39.449830] E [MSGID: 113018]
[posix-entry-ops.c:372:posix_mknod] 0-patchy-posix: debug: Calling mknod for
/bricks/brick1/backends/patchy0/tmp/file-3
[2018-08-23 15:35:39.449874] W [MSGID: 113096]
[posix-handle.c:997:posix_create_link_if_gfid_exists] 0-patchy-posix: debug:
link if handle exists
/bricks/brick1/backends/patchy0/.glusterfs/5d/1d/5d1d04c7-a64e-41dd-89e0-1cbd47123831
(5d1d04c7-a64e-41dd-89e0-1cbd47123831)
[2018-08-23 15:35:39.449898] W [MSGID: 113096]
[posix-handle.c:1011:posix_create_link_if_gfid_exists] 0-patchy-posix: debug:
link 
/bricks/brick1/backends/patchy0/.glusterfs/5d/1d/5d1d04c7-a64e-41dd-89e0-1cbd47123831,
/bricks/brick1/backends/patchy0/tmp/file-3 (0)
[2018-08-23 15:35:39.450396] E [MSGID: 113018]
[posix-entry-ops.c:1119:posix_unlink] 0-patchy-posix: debug: Calling unlink for
/bricks/brick1/backends/patchy0/tmp/file-1  
[2018-08-23 15:35:39.450437] E [MSGID: 113018]
[posix-entry-ops.c:965:posix_unlink_gfid_handle_and_entry] 0-patchy-posix:
debug: Calling unlink_gfid_handle for
/bricks/brick1/backends/patchy0/tmp/file-1, 2



Failure case:

[2018-08-23 15:38:48.480424] E [MSGID: 113018]
[posix-entry-ops.c:372:posix_mknod] 0-patchy-posix: debug: Calling mknod for
/bricks/brick1/backends/patchy0/tmp/file-3
[2018-08-23 15:38:48.480437] E [MSGID: 113018]
[posix-entry-ops.c:1119:posix_unlink] 0-patchy-posix: debug: Calling unlink for
/bricks/brick1/backends/patchy0/tmp/file-1
[2018-08-23 15:38:48.480462] E [MSGID: 113018]
[posix-entry-ops.c:965:posix_unlink_gfid_handle_and_entry] 0-patchy-posix:
debug: Calling unlink_gfid_handle for
/bricks/brick1/backends/patchy0/tmp/file-1, 1
[2018-08-23 15:38:48.480474] W [MSGID: 113096]
[posix-handle.c:997:posix_create_link_if_gfid_exists] 0-patchy-posix: debug:
link if handle exists
/bricks/brick1/backends/patchy0/.glusterfs/8a/d4/8ad46424-529f-4ec8-a8c3-03b94168d470
(8ad46424-529f-4ec8-a8c3-03b94168d470)




The sequence of operation in dht_rename has been fixed. However the issue still
exists in the posix xlator and can be hit in other code paths.


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1621981
[Bug 1621981] dht: File rename removes the .glusterfs handle for linkto
file
https://bugzilla.redhat.com/show_bug.cgi?id=1622001
[Bug 1622001] dht: File rename removes the .glusterfs handle for linkto
file
-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=2vdkBME4jq&a=cc_unsubscribe


More information about the Bugs mailing list