This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit d60d43658e2ec832b9c19db7bdcda307e2d68d15 Author: Mo Chen <[email protected]> AuthorDate: Thu Oct 23 13:57:08 2025 -0500 Another attempt to keep plugin DSOs in place (#12596) Even after the previous attempt to keep these plugin DSO files on the filesystem, they were still being deleted when we reload remap.config. (cherry picked from commit dde4ee830f08256c13807571873d161fc5bea3a8) --- src/proxy/http/remap/PluginFactory.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/proxy/http/remap/PluginFactory.cc b/src/proxy/http/remap/PluginFactory.cc index 97c62d2e30..f95e0c91ba 100644 --- a/src/proxy/http/remap/PluginFactory.cc +++ b/src/proxy/http/remap/PluginFactory.cc @@ -104,16 +104,10 @@ PluginFactory::~PluginFactory() _instList.apply([](RemapPluginInst *pluginInst) -> void { delete pluginInst; }); _instList.clear(); - if (!TSSystemState::is_event_system_shut_down()) { - uint32_t elevate_access = 0; - - REC_ReadConfigInteger(elevate_access, "proxy.config.plugin.load_elevated"); - ElevateAccess access(elevate_access ? ElevateAccess::FILE_PRIVILEGE : 0); - - fs::remove_all(_runtimeDir, _ec); - } else { - fs::remove_all(_runtimeDir, _ec); // Try anyways - } + // Don't delete _runtimeDir here - plugin DSOs may still be loaded in memory via dlopen handles. + // Deleting the .so files breaks debugging/symbol resolution. Obsolete .so files are cleaned up + // when the old plugin is unloaded (refcount drops to 0), leaving empty directories that are + // removed by cleanup() on next startup. PluginDbg(_dbg_ctl(), "destroyed plugin factory %s", getUuid()); delete _uuid;
