[LU-7829] Glimpse lock shouldn't match not granted locks Created: 01/Mar/16 Updated: 13/May/16 Resolved: 23/Mar/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andriy Skulysh | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
A deadlock is possible during ccc_prep_size()->ldlm_lock_match() vs It is better to send an aditional lock request to avoid deadlock. |
| Comments |
| Comment by Gerrit Updater [ 01/Mar/16 ] |
|
Andriy Skulysh (andriy.skulysh@seagate.com) uploaded a new patch: http://review.whamcloud.com/18738 |
| Comment by Oleg Drokin [ 04/Mar/16 ] |
|
I am pulling Jinshan into this ticket. I am not happy about the current matching behavior either, but I think this was discussed a few years ago and there were some compelling reasons to do it too. Possibly they went away with clio simplification, but I want to be sure that is fine now. |
| Comment by Jinshan Xiong (Inactive) [ 07/Mar/16 ] |
|
Hi Andriy, Can you please describe the deadlock issue in detail? In my understanding, the cl_io_lock() should have finished before doing ccc_prep_size() in the same I/O. |
| Comment by Andriy Skulysh [ 08/Mar/16 ] |
|
yes, we have obtained a lock in cl_io_lock() and call ccc_prep_size() which matches not granted lock from another I/O. The second lock can't be granted because it conflicts with lock from first I/O. It can be obtained for some limited range but ccc_prep_size() needs [0..EOF] |
| Comment by Wally Wang (Inactive) [ 12/Mar/16 ] |
|
We have an instance of this: crash> bt 7141 The lock matched is conflicting with the lock it held in cl_io_lock before coming to this point. And also because this deadlock the lock couldn't be canceled for blocking AST and the client eventually got evicted by the server. The dump of the instance is on ftp.cray.com:/outbound/835240-logs-021116.tar.bz2. The client is Lustre 2.5. |
| Comment by Gerrit Updater [ 23/Mar/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18738/ |
| Comment by Joseph Gmitter (Inactive) [ 23/Mar/16 ] |
|
Landed for 2.9.0 |