option(WITH_RADOSGW_DAOS "DAOS backend for RADOS Gateway" OFF)
option(WITH_RADOSGW_SELECT_PARQUET "Support for s3 select on parquet objects" ON)
option(WITH_RADOSGW_ARROW_FLIGHT "Build arrow flight when not using system-provided arrow" OFF)
+option(WITH_RADOSGW_BACKTRACE_LOGGING "Enable backtraces in rgw logs" OFF)
option(WITH_SYSTEM_ARROW "Use system-provided arrow" OFF)
option(WITH_SYSTEM_UTF8PROC "Use system-provided utf8proc" OFF)
message(FATAL_ERROR "Can't find gperf")
endif()
+if(WITH_RADOSGW_BACKTRACE_LOGGING)
+ add_definitions(-D_BACKTRACE_LOGGING)
+endif(WITH_RADOSGW_BACKTRACE_LOGGING)
+
if(WITH_RADOSGW_SELECT_PARQUET)
set(ARROW_LIBRARIES Arrow::Arrow Arrow::Parquet)
add_definitions(-D_ARROW_EXIST)
#include "rgw_acl_s3.h"
#include "rgw_aio_throttle.h"
#include "rgw_compression.h"
+#include "common/BackTrace.h"
#define dout_subsys ceph_subsys_rgw
// work on asio threads should be asynchronous, so warn when they block
if (is_asio_thread) {
ldpp_dout(dpp, 20) << "WARNING: blocking librados call" << dendl;
+#ifdef _BACKTRACE_LOGGING
+ ldpp_dout(dpp, 20) << "BACKTRACE: " << __func__ << ": " << ClibBackTrace(0) << dendl;
+#endif
}
return ioctx.operate(oid, op, nullptr, flags);
}
}
if (is_asio_thread) {
ldpp_dout(dpp, 20) << "WARNING: blocking librados call" << dendl;
+#ifdef _BACKTRACE_LOGGING
+ ldpp_dout(dpp, 20) << "BACKTRACE: " << __func__ << ": " << ClibBackTrace(0) << dendl;
+#endif
}
return ioctx.operate(oid, op, flags);
}
}
if (is_asio_thread) {
ldpp_dout(dpp, 20) << "WARNING: blocking librados call" << dendl;
+#ifdef _BACKTRACE_LOGGING
+ ldpp_dout(dpp, 20) << "BACKTRACE: " << __func__ << ": " << ClibBackTrace(0) << dendl;
+#endif
}
return ioctx.notify2(oid, bl, timeout_ms, pbl);
}