Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-13582

open/rmdir/close vs xattr set race may cause a transaction exec abort

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.17.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      An attempt to close a file handle to an ophan striped dir may race with a delayed xattr set or just an chrown. Due to lacking of DLM locks for mdt_close(), the race is not prevented by LDLM and only gets resolved at transaction exec phase. For a striped dir , the xattr set itransaction is a distributed operation, its rollback is complex, potentially buggy, and should be avoided if it is possible.

      The following errors indicate an tx exec error:

      /tmp/test_logs/1589821660/sanityn.test_107.debug_log.devvm1.1589821723.log:00000020:00000040:1.0:1589821723.399086:0:14322:0:(out_lib.c:752:out_tx_xattr_set_exec()) lustre-MDT0002-osd: set xattr buf ffff8d9e52e05548 name user.17 flag 0
      /tmp/test_logs/1589821660/sanityn.test_107.debug_log.devvm1.1589821723.log:00000020:02000000:1.0:1589821723.399089:0:14322:0:(out_lib.c:756:out_tx_xattr_set_exec()) No object found [0x280000402:0x2:0x0]
      /tmp/test_logs/1589821660/sanityn.test_107.debug_log.devvm1.1589821723.log:00000020:00000001:1.0:1589821723.399098:0:14322:0:(out_lib.c:843:out_tx_xattr_set_exec()) Process leaving via out (rc=18446744073709551614 : -2 : 0xfffffffffffffffe)
      /tmp/test_logs/1589821660/sanityn.test_107.debug_log.devvm1.1589821723.log:00000020:00000040:1.0:1589821723.399100:0:14322:0:(out_lib.c:847:out_tx_xattr_set_exec()) lustre-MDT0002-osd: insert xattr set reply ffff8d9de08361e0 index 0: rc = -2
      
      

      I got them by a reproducer I will post later.

      Attachments

        Activity

          [LU-13582] open/rmdir/close vs xattr set race may cause a transaction exec abort
          pjones Peter Jones added a comment -

          Merged for 2.17

          pjones Peter Jones added a comment - Merged for 2.17

          "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53891/
          Subject: LU-13582 out: make tx abort verbose
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: c9042de70e93159c02bd94f5b2d92c27157767cb

          gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53891/ Subject: LU-13582 out: make tx abort verbose Project: fs/lustre-release Branch: master Current Patch Set: Commit: c9042de70e93159c02bd94f5b2d92c27157767cb

          "Alexander Zarochentsev <alexander.zarochentsev@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53891
          Subject: LU-13582 dne: make tx abort verbose
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 6eb98aef2d7fffa6ff84d33130484f2386429264

          gerrit Gerrit Updater added a comment - "Alexander Zarochentsev <alexander.zarochentsev@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53891 Subject: LU-13582 dne: make tx abort verbose Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 6eb98aef2d7fffa6ff84d33130484f2386429264

          Alexander Zarochentsev (alexander.zarochentsev@hpe.com) uploaded a new patch: https://review.whamcloud.com/38652
          Subject: LU-13582 tests: reproducer
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 5e829eb0636e62bd99480a28a61574954517009a

          gerrit Gerrit Updater added a comment - Alexander Zarochentsev (alexander.zarochentsev@hpe.com) uploaded a new patch: https://review.whamcloud.com/38652 Subject: LU-13582 tests: reproducer Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 5e829eb0636e62bd99480a28a61574954517009a

          People

            zam Alexander Zarochentsev
            zam Alexander Zarochentsev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: