]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: fix do_transaction_no_callbacks logs 66406/head
authorMatan Breizman <mbreizma@redhat.com>
Tue, 25 Nov 2025 10:50:43 +0000 (10:50 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 2 Dec 2025 12:50:23 +0000 (12:50 +0000)
See: https://tracker.ceph.com/issues/73978#note-1

errors in do_transaction_no_callbacks fail with vague abort message
showing only the transaction dump.
Instead, add meaningful abort message with the actual error and method.

This could be replaced by assert_all_func, though we would likely
rewrite this method soon.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/os/seastore/seastore.cc
src/crimson/os/seastore/seastore.h

index ab81a692f711613ee60439dc368446000180ef94..f7f5d185e7f40402e303a9a811cbcfb3e4f6b2d5 100644 (file)
@@ -1420,9 +1420,9 @@ SeaStore::Shard::fiemap(
   });
 }
 
-void SeaStore::Shard::on_error(ceph::os::Transaction &t) {
-  LOG_PREFIX(SeaStoreS::on_error);
-  ERROR(" transaction dump:\n");
+void SeaStore::Shard::transaction_dump(ceph::os::Transaction &t) {
+  LOG_PREFIX(SeaStoreS::transaction_dump);
+  ERROR("");
   JSONFormatter f(true);
   f.open_object_section("transaction");
   t.dump(&f);
@@ -1430,7 +1430,6 @@ void SeaStore::Shard::on_error(ceph::os::Transaction &t) {
   std::stringstream str;
   f.flush(str);
   ERROR("{}", str.str());
-  abort();
 }
 
 seastar::future<> SeaStore::Shard::do_transaction_no_callbacks(
@@ -1502,8 +1501,9 @@ seastar::future<> SeaStore::Shard::do_transaction_no_callbacks(
       co_await transaction_manager->submit_transaction(*ctx.transaction);
     })
   ).handle_error(
-    crimson::ct_error::all_same_way([&ctx](auto e) {
-      on_error(ctx.ext_transaction);
+    crimson::ct_error::all_same_way([FNAME, &ctx](auto e) {
+      transaction_dump(ctx.ext_transaction);
+      ceph_abort_msg(fmt::format("{} unexpected error: {}", FNAME, e));
       return seastar::now();
     })
   );
index 1cd88cc95be133d3619511ac01aa3e62b8777d74..4291ea999a2044afa68fcc44206037f9ad6a45ff 100644 (file)
@@ -243,7 +243,7 @@ public:
     TransactionManager::read_extent_iertr::future<std::optional<unsigned>>
     get_coll_bits(CollectionRef ch, Transaction &t) const;
 
-    static void on_error(ceph::os::Transaction &t);
+    static void transaction_dump(ceph::os::Transaction &t);
 
     template <typename Ret, typename F>
     auto repeat_with_onode(