From ca05bbd652ad7436eae697a37175d9d2bc0c66c2 Mon Sep 17 00:00:00 2001 From: Pawel Chmielowski Date: Wed, 22 Oct 2025 14:59:39 +0200 Subject: [PATCH] Don't catch exit:{aborted, _} inside mnesia transactions This is used by mnesia internally to retry deadlocked transaction, so we should allow it to propagate. This could be triggered by calling create_node concurrently from multiple processes and did lead to {cyclic, ...} errors. --- src/mod_pubsub.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index bd0aff20f..7204210bb 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -3920,6 +3920,8 @@ do_transaction(ServerHost, Fun, Trans, DBType) -> F = fun() -> try Fun() catch + exit:{aborted, _} = Err when DBType == mnesia -> + exit(Err); Class:Reason:StackTrace when (DBType == mnesia andalso Trans == transaction) orelse DBType == sql ->