]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/alienstore: make CnLog::_flush non-blocking 69838/head
authorRonen Friedman <rfriedma@redhat.com>
Tue, 30 Jun 2026 12:55:33 +0000 (12:55 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 2 Jul 2026 16:33:05 +0000 (16:33 +0000)
commite4fa5048e0b12d627f95f47e70b5cd90d1c1b388
tree374513eb9d694f96a7284f5897e753fd190b3e33
parent8a39773f5889b23e1e05f1e54748055b17ab36d3
crimson/os/alienstore: make CnLog::_flush non-blocking

CnLog::_flush() calls alien::submit_to(...).wait(), which blocks the
log flusher thread until the seastar reactor finishes outputting the
log entries. When the reactor writes to stderr and the pipe buffer is
full (e.g. two OSDs on the same host both dumping at debug level 20),
the reactor itself blocks on the write() syscall. Meanwhile BlueStore
threads filling the log buffer past m_max_new block in submit_entry()
waiting for the flusher - which is waiting for the reactor - which is
blocked on I/O. The kv thread cannot fire commit callbacks while it is
blocked on logging, so store transactions (including osdmap persistence)
hang indefinitely.

Fix by moving the entries into the lambda capture so _flush() can
return immediately without waiting.

This is a corrected version of the approach in commit 511af83e274
("crimson/os/alienstore/alien_log: _flush concurrently", PR #55262),
which was reverted in 4d52d1d22b7 because its lambda captured the
EntryVector by reference - the caller would clear/reuse the vector
before the lambda finished, causing a "pure virtual method called"
crash (https://tracker.ceph.com/issues/64140). The fix here avoids
that by swapping the entries out of the caller's vector and moving
them into the lambda's capture, so the lambda owns them for their
full lifetime.

Fixes: https://tracker.ceph.com/issues/77826
Fixes (failure of the 1st attempt): https://tracker.ceph.com/issues/64140
Assisted-by: Claude <claude.ai>
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/crimson/os/alienstore/alien_log.cc