Todd Lipcon has submitted this change and it was merged. 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 Reviewed-on: http://gerrit.cloudera.org:8080/2375 Tested-by: Kudu Jenkins Reviewed-by: David Ribeiro Alves <[email protected]> --- M src/kudu/tablet/diskrowset.cc M src/kudu/util/rw_semaphore.h 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: David Ribeiro Alves: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/2375 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee583a1442ac270238112427e37f2ec6565dfd38 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
