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

Truncate vs setxattr deadlock with DoM

    XMLWordPrintable

Details

    • 3
    • 9223372036854775807

    Description

      setxattr takes inode lock and sends reint to MDS.
      truncate takes MDS_INODELOCK_DOM lock and  wants to acquire inode lock.

      PID: 14942 TASK: ffff88007659cf10 CPU: 3 COMMAND: "truncate"
       #0 [ffff88011f397af8] __schedule at ffffffff816b3de4
       #1 [ffff88011f397b88] schedule_preempt_disabled at ffffffff816b5329
       #2 [ffff88011f397b98] __mutex_lock_slowpath at ffffffff816b30d7
       #3 [ffff88011f397bf0] mutex_lock at ffffffff816b24bf
       #4 [ffff88011f397c08] vvp_io_setattr_start at ffffffffc118993d [lustre]
       #5 [ffff88011f397c40] cl_io_start at ffffffffc06e7a25 [obdclass]
       #6 [ffff88011f397c68] cl_io_loop at ffffffffc06e9e01 [obdclass]
       #7 [ffff88011f397cd8] cl_setattr_ost at ffffffffc11847ef [lustre]
       #8 [ffff88011f397d28] ll_setattr_raw at ffffffffc11614d8 [lustre]
       #9 [ffff88011f397df0] ll_setattr at ffffffffc11617d3 [lustre]
      #10 [ffff88011f397e00] notify_change at ffffffff81223bc4
      #11 [ffff88011f397e48] do_truncate at ffffffff81203445
      #12 [ffff88011f397ec0] vfs_truncate at ffffffff8120361c
      #13 [ffff88011f397ef8] do_sys_truncate at ffffffff8120370c
      #14 [ffff88011f397f40] sys_truncate at ffffffff812038de
      
      PID: 15194 TASK: ffff880077f18000 CPU: 1 COMMAND: "setfattr"
       #0 [ffff88011d33b8b8] __schedule at ffffffff816b3de4
       #1 [ffff88011d33b948] schedule at ffffffff816b4409
       #2 [ffff88011d33b958] schedule_timeout at ffffffff816b1ca4
       #3 [ffff88011d33ba00] ptlrpc_set_wait at ffffffffc09070a0 [ptlrpc]
       #4 [ffff88011d33baf0] ptlrpc_queue_wait at ffffffffc09074e3 [ptlrpc]
       #5 [ffff88011d33bb10] mdc_xattr_common at ffffffffc0b52186 [mdc]
       #6 [ffff88011d33bb90] mdc_setxattr at ffffffffc0b522de [mdc]
       #7 [ffff88011d33bbd0] lmv_setxattr at ffffffffc0872524 [lmv]
       #8 [ffff88011d33bc48] ll_xattr_set_common at ffffffffc1175b54 [lustre]
       #9 [ffff88011d33bcc8] ll_xattr_set_common_3_11 at ffffffffc11769ab [lustre]
      #10 [ffff88011d33bcd8] generic_setxattr at ffffffff8122c2d8
      #11 [ffff88011d33bd10] __vfs_setxattr_noperm at ffffffff8122cb45
      #12 [ffff88011d33bd58] vfs_setxattr at ffffffff8122cd45
      #13 [ffff88011d33bd98] setxattr at ffffffff8122ce7e
      #14 [ffff88011d33bef0] sys_setxattr at ffffffff8122d177
      

      MDS locks are for different bits MDS_INODELOCK_UPDATE|MDS_INODELOCK_XATTR vs
      MDS_INODELOCK_DOM but they blocks each other if some blocking lock was present earlier because Lustre tries to grant only first lock in the waiting list.

      Attachments

        Issue Links

          Activity

            People

              tappro Mikhail Pershin
              askulysh Andriy Skulysh
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: