]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/test: stop the messenger-thrash config on every exit path 69794/head
authorKefu Chai <k.chai@proxmox.com>
Mon, 29 Jun 2026 01:19:02 +0000 (09:19 +0800)
committerKefu Chai <k.chai@proxmox.com>
Mon, 29 Jun 2026 01:22:45 +0000 (09:22 +0800)
commit68ec2a1b3fc20074615aad422b3b5642651b4ee6
tree564daeddc83c6c9217e304bb3f8f14fa97639bf1
parent16052666146c8ebb671b2740c226db4d6d1ea03f
crimson/test: stop the messenger-thrash config on every exit path

test_messenger_thrash put sharded_conf().stop() in the success
continuation, so an exception from the tests skipped it and left the
static sharded<ConfigProxy> holding live instances. its destructor then
asserts. a tester hit this when the run went OOM at --memory 256M:

  ERROR [shard 0:main] test - Test failed: got exception
    ceph::buffer::v15_2_0::bad_alloc (Bad allocation [buffer:1])
  /ceph/src/seastar/include/seastar/core/sharded.hh:573:
    seastar::sharded<Service>::~sharded()
    [with Service = crimson::common::ConfigProxy]:
    Assertion `_instances.empty()' failed.
  terminate called without an active exception

run the body in seastar::async and stop the config through
seastar::deferred_stop, as crimson/osd/main.cc already does. the guard
is constructed only after start() succeeds, and its destructor stops the
config on any exit path, so a failing test exits cleanly instead of
aborting.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/test/crimson/test_messenger_thrash.cc