]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test_msgr: Avoid deadlock between send_message and dispatch
authorHaomai Wang <haomaiwang@gmail.com>
Fri, 19 Dec 2014 14:28:54 +0000 (22:28 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Tue, 23 Dec 2014 11:22:09 +0000 (19:22 +0800)
commit917ed9665b8340263d1dda8b5f40d608a1d8e845
tree4af76ef7f7f6f34a147bc5218485f28c58a74aea
parent1cb78eeb73a6b9d79aa30ebd3adb794234a9c5f3
test_msgr: Avoid deadlock between send_message and dispatch

If connection holds Connection's lock and try to acquire
FakeDispatcher's lock while gtest thread try to send_message with
FakeDispatcher's lock and try to acquire Connection's lock,
it will be deadlock.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/test/msgr/test_msgr.cc