]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/SimpleMessenger: drop msgr lock when joining a Pipe 2192/head
authorSage Weil <sage@redhat.com>
Mon, 4 Aug 2014 01:26:34 +0000 (18:26 -0700)
committerSage Weil <sage@redhat.com>
Mon, 4 Aug 2014 01:26:34 +0000 (18:26 -0700)
commit98997f3b2216aac07ee3702dc64dfd8fba278a27
treee6b8cff18e33780fb72e43bcdc0a67c8b65b663d
parente36babc825caf2e6836649308ac431b5dccc83c5
msg/SimpleMessenger: drop msgr lock when joining a Pipe

Avoid this deadlock:

- a fault
- delay thread entry gets a fast dispatch message
 - drops delay_lock
 - calls into fast_dispatch
- reaper tries to reap the pipe
 - pipe->join()
  - delay_thread->join()
   - blocks waiting for delay_thread to exit
- delay thread / fast dispatch blocks on msgr->lock trying to mark_down

The solution is to drop the msgr lock while joining the thread.  This will
allow the join() to complete.  Adjust the reaper thread to recheck the
exit condition since the lock may have been dropped.  The other two callers
do not care.

Fixes: #8891
Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/SimpleMessenger.cc