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

(mdt_handler.c:2782:mdt_lock_handle_fini()) ASSERTION( !lustre_handle_is_used(&lh->mlh_pdo_lh) ) failed

Details

    • 3
    • 14971

    Description

      In mdt_object_local_lock() we should call mdt_object_unlock() if mdt_fid_lock() fails on the pdo lock. This is because ldlm_cli_enqueue_local() stores the cookie in the lock handle very early on.

                              rc = mdt_fid_lock(ns, &lh->mlh_pdo_lh, lh->mlh_pdo_mode,
                                                policy, res_id, dlmflags,
                                                info->mti_exp == NULL ? NULL :
                                                &info->mti_exp->exp_handle.h_cookie);
                              if (unlikely(rc))
                                      RETURN(rc);
      

      Currently if mdt_fid_lock() fails then we are likely to see

      (mdt_handler.c:2782:mdt_lock_handle_fini()) ASSERTION( !lustre_handle_is_used(&lh->mlh_pdo_lh) ) failed 
      

      at the end of the handler.

      This was found via memory allocation fault injection.

      Attachments

        Issue Links

          Activity

            [LU-5367] (mdt_handler.c:2782:mdt_lock_handle_fini()) ASSERTION( !lustre_handle_is_used(&lh->mlh_pdo_lh) ) failed
            donut-crowd Donut Crowd (Inactive) made changes -
            Remote Link Original: This issue links to "Page (HPDD Community Wiki)" [ 14725 ]
            donut-crowd Donut Crowd (Inactive) made changes -
            Remote Link Original: This issue links to "Page (HPDD Community Wiki)" [ 14623 ]
            simmonsja James A Simmons made changes -
            Link New: This issue is related to LU-8043 [ LU-8043 ]
            sarah Sarah Liu made changes -
            Remote Link Original: This issue links to "Page (HPDD Community Wiki)" [ 14623 ] New: This issue links to "Page (HPDD Community Wiki)" [ 14623 ]
            sarah Sarah Liu made changes -
            Remote Link New: This issue links to "Page (HPDD Community Wiki)" [ 14725 ]
            sarah Sarah Liu made changes -
            Remote Link New: This issue links to "Page (HPDD Community Wiki)" [ 14623 ]
            pjones Peter Jones made changes -
            Link Original: This issue is related to LDEV-14 [ LDEV-14 ]
            pjones Peter Jones made changes -
            Link New: This issue is related to LDEV-13 [ LDEV-13 ]
            pjones Peter Jones made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Reopened [ 4 ] New: Closed [ 6 ]
            pjones Peter Jones made changes -
            Labels Original: easy ldlm lu_st malloc mdt New: easy ldlm malloc mdt

            People

              jhammond John Hammond
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: