(gdb) bt full #0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 tid = ret = 0 pd = old_mask = {__val = {0}} ret = #1 0x00007fc6354a815f in __pthread_kill_internal (signo=6, threadid=) at ./nptl/pthread_kill.c:78 No locals. #2 0x00007fc63545a472 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 ret = #3 0x00007fc6354444b2 in __GI_abort () at ./stdlib/abort.c:79 save_stage = 1 act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {0 , 7167589996808792434, 7503118402219671557, 0}}, sa_flags = 797308496, sa_restorer = 0x7fc62a6eaa60} #4 0x00007fc6326a89ab in __gnu_cxx::__verbose_terminate_handler () at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/libsupc++/vterminate.cc:95 terminating = false t = #5 0x0000000000c61e66 in backtrace_terminate_handler () at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/utilities/terminate_handler.cc:88 No locals. #6 0x00007fc6326b82fa in __cxxabiv1::__terminate (handler=) at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:48 No locals. #7 0x00007fc6326b8365 in std::terminate () at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:58 No locals. #8 0x00007fc6326b8608 in __cxxabiv1::__cxa_rethrow () at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/libsupc++/eh_throw.cc:136 globals = header = #9 0x0000000000d45c3e in __cxxabiv1::__cxa_rethrow () at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/folly/folly-prefix/src/folly/folly/experimental/exception_tracer/ExceptionTracerLib.cpp:119 orig_cxa_rethrow = 0x0 #10 0x000000000053d605 in log_handled_exception () at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/utilities/terminate_handler.cc:39 tried_throw = 0 #11 backtrace_terminate_handler () at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/utilities/terminate_handler.cc:79 No locals. #12 0x00007fc6326b82fa in __cxxabiv1::__terminate (handler=) at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:48 No locals. #13 0x00007fc6326b8365 in std::terminate () at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:58 No locals. #14 0x00007fc6326b9063 in __cxxabiv1::__cxa_pure_virtual () at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/libsupc++/pure.cc:50 No locals. #15 0x000000000060cd6e in Connection::to_json[abi:cxx11]() const (this=0x7fc62d5fcd80) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/connection.cc:226 ret = {m_type = nlohmann::json_abi_v3_11_2::detail::value_t::object, m_value = {object = 0x7fc62cfa9e70, array = 0x7fc62cfa9e70, string = 0x7fc62cfa9e70, binary = 0x7fc62cfa9e70, boolean = 112, number_integer = 140489134874224, number_unsigned = 140489134874224, number_float = 6.9410855155311474e-310}} features = {m_type = nlohmann::json_abi_v3_11_2::detail::value_t::array, m_value = {object = 0x7fc62d171440, array = 0x7fc62d171440, string = 0x7fc62d171440, binary = 0x7fc62d171440, boolean = 64, number_integer = 140489136739392, number_unsigned = 140489136739392, number_float = 6.9410856076826906e-310}} arr = {m_type = nlohmann::json_abi_v3_11_2::detail::value_t::array, m_value = {object = 0x7fc62d188fa0, array = 0x7fc62d188fa0, string = 0x7fc62d188fa0, binary = 0x7fc62d188fa0, boolean = 160, number_integer = 140489136836512, number_unsigned = 140489136836512, number_float = 6.9410856124810562e-310}} value = 868257070 #16 0x0000000000627432 in Cookie::~Cookie (this=0x7fc62d22f000, __in_chrg=) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/cookie.cc:775 _logger_ = 0x7fc62f85f650 _logger_ = #17 0x0000000000627519 in Cookie::~Cookie (this=0x7fc62d22f000, __in_chrg=) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/cookie.cc:785 _logger_ = #18 0x000000000060750f in std::default_delete::operator() (__ptr=, this=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:99 No locals. #19 std::unique_ptr >::~unique_ptr (this=0x7fc54f03ce00, __in_chrg=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:404 __ptr = #20 std::_Destroy > > (__pointer=0x7fc54f03ce00) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/stl_construct.h:151 No locals. #21 std::_Destroy_aux::__destroy >*> (__last=, __first=0x7fc54f03ce00) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/stl_construct.h:163 No locals. #22 std::_Destroy >*> (__last=, __first=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/stl_construct.h:196 No locals. #23 std::_Destroy >*, std::unique_ptr > > (__last=, __first=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/alloc_traits.h:947 No locals. #24 std::deque >, std::allocator > > >::_M_destroy_data_aux (this=, __last=..., __first=...) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/deque.tcc:875 --Type for more, q to quit, c to continue without paging-- No locals. #25 std::deque >, std::allocator > > >::_M_destroy_data (this=0x7fc62d5fcdc8, __first=..., __last=...) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/stl_deque.h:2091 No locals. #26 std::deque >, std::allocator > > >::~deque (this=0x7fc62d5fcdc8, __in_chrg=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/stl_deque.h:1028 No locals. #27 Connection::~Connection (this=this@entry=0x7fc62d5fcd80, __in_chrg=) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/connection.cc:1263 No locals. #28 0x000000000061cd6c in LibeventConnection::~LibeventConnection (this=0x7fc62d5fcd80, __in_chrg=) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/connection_libevent.cc:76 No locals. #29 LibeventConnection::~LibeventConnection (this=0x7fc62d5fcd80, __in_chrg=) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/connection_libevent.cc:76 No locals. #30 0x00000000005cf7e4 in std::default_delete::operator() (__ptr=, this=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:99 No locals. #31 std::unique_ptr >::~unique_ptr (this=0x7fc62fd00290, __in_chrg=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:404 __ptr = #32 std::pair > >::~pair (this=0x7fc62fd00288, __in_chrg=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/stl_pair.h:187 No locals. #33 std::__new_allocator > >, false> >::destroy > > > (__p=0x7fc62fd00288, this=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/new_allocator.h:194 No locals. #34 std::allocator_traits > >, false> > >::destroy > > > (__p=0x7fc62fd00288, __a=...) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/alloc_traits.h:557 No locals. #35 std::_Node_handle_common > >, std::allocator > >, false> > >::_M_reset (this=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/node_handle.h:166 __alloc = __alloc = #36 std::_Node_handle_common > >, std::allocator > >, false> > >::~_Node_handle_common (this=, __in_chrg=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/node_handle.h:89 No locals. #37 std::_Node_handle > >, std::allocator > >, false> > >::~_Node_handle (this=, __in_chrg=) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/node_handle.h:243 No locals. #38 FrontEndThread::destroy_connection (this=, connection=...) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/thread.cc:332 node = { > >, std::allocator > >, false> > >> = {_M_ptr = 0x7fc62fd00280, _M_alloc = {_M_empty = {}, _M_alloc = { > >, false> >> = {}, }}}, _M_pkey = 0x7fc62fd00288, _M_pmapped = } #39 0x000000000061e9ea in LibeventConnection::read_callback (this=0x7fc62d5fcd80) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/connection_libevent.cc:136 phosphor_internal_category_enabled_130 = {_M_b = {_M_p = 0x0}} phosphor_internal_category_enabled_temp_130 = phosphor_internal_tpi_wait_130 = {category = 0xe3dd0d "mutex", name = 0xde0d18 "LibeventConnection::read_callback::threadLock.wait", type = phosphor::TraceEventType::Complete, argument_names = {_M_elems = {0xe3a7cd "this", 0xe3e723 ""}}, argument_types = {_M_elems = {phosphor::TraceArgumentType::is_pointer, phosphor::TraceArgumentType::is_none}}} phosphor_internal_tpi_held_130 = {category = 0xe3dd0d "mutex", name = 0xde0ce0 "LibeventConnection::read_callback::threadLock.held", type = phosphor::TraceEventType::Complete, argument_names = {_M_elems = {0xe3e723 "", 0xe3e723 ""}}, argument_types = {_M_elems = {phosphor::TraceArgumentType::is_pointer, phosphor::TraceArgumentType::is_none}}} phosphor_internal_guard_130 = {tpiWait = 0xe4f220 , tpiHeld = 0xe4f1e0 , enabled = true, mutex = @0x7fc62fd58ee0, threshold = {__r = 10000000}, start = {__d = {__r = 7497502325363639}}, lockedAt = {__d = {__r = 7497502325364227}}, releasedAt = {__d = {__r = 0}}} #40 0x00007fc633c0f84e in bufferevent_run_deferred_callbacks_unlocked (cb=, arg=0x7fc62d5fb980) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/libevent/libevent-prefix/src/libevent/bufferevent.c:208 readcb = 0x61ebb0 cbarg = 0x7fc62d5fcd80 bufev_private = 0x7fc62d5fb980 bufev = 0x7fc62d5fb980 #41 0x00007fc633c18b99 in event_process_active_single_queue (base=base@entry=0x7fc62f865200, activeq=0x7fc6303ec0e0, max_to_process=max_to_process@entry=2147483647, endtime=endtime@entry=0x0) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/libevent/libevent-prefix/src/libevent/event.c:1726 evcb_cbfinalize = ev = evcb = 0x7fc62d5fbb20 count = 2 #42 0x00007fc633c19287 in event_process_active (base=0x7fc62f865200) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/libevent/libevent-prefix/src/libevent/event.c:1789 activeq = i = 0 c = 0 --Type for more, q to quit, c to continue without paging-- tv = {tv_sec = 0, tv_usec = 140489092149504} maxcb = 2147483647 endtime = 0x0 limit_after_prio = 2147483647 activeq = i = c = endtime = tv = maxcb = limit_after_prio = done = #43 event_base_loop (base=0x7fc62f865200, flags=flags@entry=1) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/libevent/libevent-prefix/src/libevent/event.c:2012 n = evsel = 0x7fc633e2cc20 tv = {tv_sec = 0, tv_usec = 0} tv_p = res = done = 0 retval = 0 __func__ = "event_base_loop" #44 0x0000000000d7bcc6 in (anonymous namespace)::EventBaseBackend::eb_event_base_loop (flags=1, this=) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/folly/folly-prefix/src/folly/folly/io/async/EventBase.cpp:74 No locals. #45 folly::EventBase::loopBody (this=this@entry=0x7fc62fd58c80, flags=flags@entry=0, ignoreKeepAlive=ignoreKeepAlive@entry=false) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/folly/folly-prefix/src/folly/folly/io/async/EventBase.cpp:381 callbacks = {, (boost::intrusive::link_mode_type)2, boost::intrusive::dft_tag, 1>, unsigned long, false, void>> = { static constant_time_size = false, static stateful_value_traits = , static has_container_from_iterator = , static safemode_or_autounlink = true, data_ = {, (boost::intrusive::link_mode_type)2, boost::intrusive::dft_tag, 1>> = {*, boost::intrusive::dft_tag, 1>> = {}, static link_mode = boost::intrusive::auto_unlink}, root_plus_size_ = {> = { static constant_time_size = }, m_header = {> = {next_ = 0x7fc62a6eb0a0, prev_ = 0x7fc62a6eb0a0}, }}}}, } message = 0xe2ba38 "Your code just tried to loop over an event base from inside another event base loop. Since libevent is not reentrant, this leads to undefined behavior in opt builds. Please fix immediately. For the co"... SCOPE_EXIT_STATE8 = { = {dismissed_ = false}, function_ = {__this = 0x7fc62fd58c80}} res = 0 ranLoopCallbacks = blocking = true once = false prev = {__d = {__r = 7497294903795535}} idleStart = {__d = {__r = 7497502325356900}} busy = idle = prevLoopThread = {_M_thread = 0} #46 0x0000000000d7c1ce in folly::EventBase::loop (this=this@entry=0x7fc62fd58c80) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/folly/folly-prefix/src/folly/folly/io/async/EventBase.cpp:305 guard = {list_ = {prev = 0x11ee8a0 , curr = {forbid = true, allowTerminationOnBlocking = false, ex = 0x7fc62fd58c90, tag = {static npos = , b_ = 0x0, e_ = 0x0}}}} #47 0x0000000000d7e698 in folly::EventBase::loopForever (this=this@entry=0x7fc62fd58c80) at /home/couchbase/jenkins/cbdeps-ws/deps/packages/build/folly/folly-prefix/src/folly/folly/io/async/EventBase.cpp:524 SCOPE_EXIT_STATE9 = SCOPE_EXIT_STATE10 = ret = #48 0x00000000005cf0d9 in worker_libevent (arg=0x7fc62fd58c70) at /home/couchbase/jenkins/workspace/couchbase-server-unix/kv_engine/daemon/thread.cc:272 me = #49 0x0000000000cce91c in std::function::operator()() const (this=0x7fc62fd07838) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/std_function.h:591 No locals. #50 operator() (__closure=0x7fc62fd07818) at /home/couchbase/jenkins/workspace/couchbase-server-unix/platform/src/thread.cc:117 main = n = main = n = #51 std::__invoke_impl, std::string):: > (__f=...) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/invoke.h:61 No locals. #52 std::__invoke, std::string):: > (__fn=...) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/invoke.h:96 No locals. #53 std::thread::_Invoker, std::string):: > >::_M_invoke<0> (this=0x7fc62fd07818) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/std_thread.h:292 No locals. #54 std::thread::_Invoker, std::string):: > >::operator() (this=0x7fc62fd07818) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/std_thread.h:299 No locals. #55 std::thread::_State_impl, std::string):: > > >::_M_run(void) (this=0x7fc62fd07810) at /opt/gcc-13.2.0/include/c++/13.2.0/bits/std_thread.h:244 --Type for more, q to quit, c to continue without paging-- No locals. #56 0x00007fc6326e4aa3 in std::execute_native_thread_routine (__p=0x7fc62fd07810) at /tmp/deploy/objdir/../gcc-13.2.0/libstdc++-v3/src/c++11/thread.cc:104 __t = #57 0x00007fc6354a63ec in start_thread (arg=) at ./nptl/pthread_create.c:444 ret = pd = out = unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140489274319152, 5557518730196469383, -40320, 0, 140720678532080, 140489083801600, -5572059902401001849, -5572026670628944249}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = { prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = #58 0x00007fc635526a4c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 No locals. (gdb)