From 9aed2a9f11811c46b6f5eac607f00e7c2f819abe Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 12 Apr 2022 13:25:50 +0100 Subject: [PATCH] Revert "rpc: Reload CNode spans after reloading the log filter". fixes #5863 The span reloading was causing a use-after-free bug at the point the old span was exited. This reverts commit b517be433462315d2a1eecc2ea6d5f29cb127ed8. As a result, `setlogfilter` will not be able to change whether the peer tracing span is enabled (or whether IP addresses are logged) for existing peers. That can be fixed later (#5867). Signed-off-by: Daira Hopwood --- src/rpc/server.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 9ba7e6b00..f7f8fcb66 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -8,7 +8,6 @@ #include "fs.h" #include "init.h" #include "key_io.h" -#include "net.h" #include "random.h" #include "sync.h" #include "ui_interface.h" @@ -274,14 +273,6 @@ UniValue setlogfilter(const UniValue& params, bool fHelp) if (!tracing_reload(pTracingHandle, newFilter.c_str())) { throw JSONRPCError(RPC_INTERNAL_ERROR, "Filter reload failed; check logs"); } - - // Now that we have reloaded the filter, reload any stored spans. - { - LOCK(cs_vNodes); - for (CNode* pnode : vNodes) { - pnode->ReloadTracingSpan(); - } - } } return NullUniValue;