Hello David Ribeiro Alves,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/2375

to review the following change.

Change subject: diskrowset: Fix reentrant acquisition of DiskRowSet 
component_lock
......................................................................

diskrowset: Fix reentrant acquisition of DiskRowSet component_lock

Our RW spinlocks are not safe to acquire re-entrantly, since they
avoid writer starvation. If a thread holds a read lock, then a writer
waits, and then the thread tries to acquire another read lock, it will
block to prevent starving the writer. Of course the writer cannot
proceed either, and we have a deadlock.

I found this due to TSAN flagging a lock order inversion on these
locks. The trace didn't quite make sense, but when I looked at this
code I spotted the reentrant read-lock acquisition. We'll see if it
silences the trace or if there's another issue lurking.

Change-Id: Iee583a1442ac270238112427e37f2ec6565dfd38
---
M src/kudu/tablet/diskrowset.cc
M src/kudu/util/rw_semaphore.h
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/75/2375/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2375
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee583a1442ac270238112427e37f2ec6565dfd38
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>

Reply via email to