[LU-10769] osd-zfs deadlock on osd_object::oo_guard Created: 05/Mar/18  Updated: 09/Apr/18  Resolved: 08/Mar/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0, Lustre 2.11.0
Fix Version/s: Lustre 2.11.0, Lustre 2.10.4

Type: Bug Priority: Blocker
Reporter: nasf (Inactive) Assignee: nasf (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
Related
Severity: 2
Rank (Obsolete): 9223372036854775807

 Description   

Consider the following scenarios:

1) The Thread1 calls osd_attr_set() to set flags on the object. The osd_attr_set() will call the osd_xattr_get() with holding the read mode semaphore on the object::oo_guard.

2) The Thread2 calls osd_declare_destroy() to destroy the object, it will down_write() on the object::oo_gurad, but be blocked by the Thread1's granted read mode semaphore.

3) The osd_xattr_get() triggered by the osd_xattr_set() will also down_read() on the object::oo_guard. But it will be blocked by the Thread2's pending down_write() request.

Then the Thread1 and the Thread2 deadlock.



 Comments   
Comment by Gerrit Updater [ 05/Mar/18 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/31511
Subject: LU-10769 osd-zfs: fix deadlock on osd_object::oo_guard
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f748a6c51db83cd8945b06a226271a9880ecccd0

Comment by Gerrit Updater [ 05/Mar/18 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/31514
Subject: LU-10769 osd-zfs: fix deadlock on osd_object::oo_guard
Project: fs/lustre-release
Branch: b2_10
Current Patch Set: 1
Commit: 4d9a3def8a135b526f1906aacc861b517b7bfd19

Comment by Gerrit Updater [ 08/Mar/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31511/
Subject: LU-10769 osd-zfs: fix deadlock on osd_object::oo_guard
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 095643bbd1bb7c70061eaddf7b6413c429322b31

Comment by Peter Jones [ 08/Mar/18 ]

Landed for 2.11

Comment by Gerrit Updater [ 05/Apr/18 ]

John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/31514/
Subject: LU-10769 osd-zfs: fix deadlock on osd_object::oo_guard
Project: fs/lustre-release
Branch: b2_10
Current Patch Set:
Commit: 0e51abb8a512213b58579e66a9d74133001877ff

Generated at Sat Feb 10 02:38:01 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.