[LU-13246] osd_otable_it_next() can miss spin_unlock() Created: 12/Feb/20 Updated: 14/May/20 Resolved: 14/May/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Alex Zhuravlev | Assignee: | Alex Zhuravlev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
osd_otable_it_next() in osd-zfs can leave the spinlock locked because of race: if (!scrub->os_full_speed) spin_lock(&scrub->os_lock); it->ooi_prefetched--; if (!scrub->os_full_speed) { if (scrub->os_waiting) { scrub->os_waiting = 0; wake_up_all(&thread->t_ctl_waitq); } spin_unlock(&scrub->os_lock); } os_full_speed may chane in-between which sometimes happens in my testing. |
| Comments |
| Comment by Gerrit Updater [ 12/Feb/20 ] |
|
Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/37547 |
| Comment by Alex Zhuravlev [ 12/Feb/20 ] |
|
I verified this adding an assrtion which got hit: LustreError: 419:0:(osd_scrub.c:1750:osd_otable_it_next()) ASSERTION( locked == 0 ) failed: i.e. the spinlock was taken, but wasn't released. |
| Comment by Gerrit Updater [ 14/May/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37547/ |
| Comment by Peter Jones [ 14/May/20 ] |
|
Landed for 2.14 |