[LU-5221] Missed up_read on mmap_sem in vvp_mmap_locks Created: 18/Jun/14  Updated: 12/Aug/14  Resolved: 18/Jun/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0
Fix Version/s: Lustre 2.6.0, Lustre 2.5.3

Type: Bug Priority: Blocker
Reporter: Patrick Farrell (Inactive) Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: patch

Severity: 3
Rank (Obsolete): 14555

 Description   

In the function vvp_mmap_locks, we down this semaphore:
down_read(&mm->mmap_sem);

Before entering a while loop. After the loop is complete, the semaphore is upped. However, there is an exit case in the loop:
if (result < 0)
RETURN(result);

Which does not up the semaphore.

Recently, Cray IO stress testing has been seeing a number of threads stuck waiting on this semaphore, with out any other threads obviously involved.

It's not clear why this has been showing up lately, as Jay added the code in 2012:
5eb306e7 (Jinshan Xiong 2012-04-13 15:21:49 0700 267) down_read(&mm>mmap_sem);

I'll make a patch available shortly.



 Comments   
Comment by Patrick Farrell (Inactive) [ 18/Jun/14 ]

Patch:
http://review.whamcloud.com/10741

Comment by Jodi Levi (Inactive) [ 18/Jun/14 ]

Patch landed to Master.

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