]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson: Move send_to_osd call outside with_obc lambda wip-moagrawa-crimson-with_obc_patch
authorMohit Agrawal <moagrawa@redhat.com>
Thu, 16 Oct 2025 10:58:08 +0000 (16:28 +0530)
committerMohit Agrawal <moagrawa@redhat.com>
Thu, 16 Oct 2025 10:58:08 +0000 (16:28 +0530)
commit5e1b33545a80a19ac074103315af56b508836372
tree368042635a9a05a36378c2da0b1aa1f75139f30b
parent3e6c83bd8cde6cafa6e7122edbb4888ceaf7b971
crimson: Move send_to_osd call outside with_obc lambda

The with_obc() function acquires a lock before invoking the
lambda it wraps. Earlier the lambda itself called send_to_osd()
which returns a future to with_obc. If a future is not resolved
immediately and a response could arrive and trigger
handle_pull_response() which attempts to acquire an exclusive lock.

Because a future is not returned yet to with_obc() so the original
lock is still holding by with_obc and handle_pull_response() throw
an assertion failure due to that osd is crashed.

Solution: Move send_to_osd() call outside with_obc lambda so that
the lock is released before handle_pull_response() is triggered.

Fixed: https://tracker.ceph.com/issues/71861
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
src/crimson/osd/replicated_recovery_backend.cc