]>
git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg: fix deadlock when handling existing but closed v2 connection
The deadlock is illustrated best by the following snippet
provided by jianwei zhang who also made the problem analysis
(many thanks!).
```
thread-35
AsyncMessenger::shutdown_connections hold AsyncMessenger::lock std::lock_guard l{lock}
AsyncConnection::stop wait AsyncConnection::lock lock.lock()
thread-3
ProtocolV2::handle_existing_connection hold AsyncConnection::lock std::lock_guard<std::mutex> l(existing->lock)
AsyncMessenger::accept_conn wait AsyncMessenger::lock std::lock_guard l{lock}
```
Fixes: https://tracker.ceph.com/issues/55355
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>