xinyiZzz opened a new pull request, #33732:
URL: https://github.com/apache/doris/pull/33732

   ## Proposed changes
   
   fix
   ```
   F20240415 23:42:47.509416  9710 thread_context.h:204] Check failed: 
!doris::config::enable_memory_orphan_check || thread_mem_tracker()->label() != 
"Orphan" If you crash here, it means that SCOPED_ATTACH_TASK and 
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER are not used correctly. starting 
position of each thread is expected to use SCOPED_ATTACH_TASK to bind a 
MemTrackerLimiter belonging to Query/Load/Compaction/Other Tasks, otherwise 
memory alloc using Doris Allocator in the thread will crash. If you want to 
switch MemTrackerLimiter during thread execution, please use 
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER, do not repeat Attach. Of course, you 
can modify enable_memory_orphan_check=false in be.conf to avoid this 
crash.F20240415 23:42:47.509719  9730 thread_context.h:204] Check failed: 
!doris::config::enable_memory_orphan_check || thread_mem_tracker()->label() != 
"Orphan" If you crash here, it means that SCOPED_ATTACH_TASK and 
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER are not used corr
 ectly. starting position of each thread is expected to use SCOPED_ATTACH_TASK 
to bind a MemTrackerLimiter belonging to Query/Load/Compaction/Other Tasks, 
otherwise memory alloc using Doris Allocator in the thread will crash. If you 
want to switch MemTrackerLimiter during thread execution, please use 
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER, do not repeat Attach. Of course, you 
can modify enable_memory_orphan_check=false in be.conf to avoid this crash.
   23:54:03   *** Check failure stack trace: ***
   23:54:03    0# doris::signal::(anonymous 
namespace)::FailureSignalHandler(int, siginfo_t*, void*) at 
/home/zcp/repo_center/doris_master/doris/be/src/common/signal_handler.h:421
   23:54:03    1# 0x00007F4CB957A090 in /lib/x86_64-linux-gnu/libc.so.6
   23:54:03    2# raise at ../sysdeps/unix/sysv/linux/raise.c:51
   23:54:03    3# abort at /build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:81
   23:54:03    4# 0x000055D07A68DBDD in 
/mnt/hdd01/ci/master-deploy/be/lib/doris_be
   23:54:03    5# 0x000055D07A68027A in 
/mnt/hdd01/ci/master-deploy/be/lib/doris_be
   23:54:03    6# google::LogMessage::SendToLog() in 
/mnt/hdd01/ci/master-deploy/be/lib/doris_be
   23:54:03    7# google::LogMessage::Flush() in 
/mnt/hdd01/ci/master-deploy/be/lib/doris_be
   23:54:03    8# google::LogMessageFatal::~LogMessageFatal() in 
/mnt/hdd01/ci/master-deploy/be/lib/doris_be
   23:54:03    9# doris::ThreadContext::consume_memory(long) const in 
/mnt/hdd01/ci/master-deploy/be/lib/doris_be
   23:54:03   10# Allocator<false, false, false>::release_memory(unsigned long) 
const at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/common/allocator.cpp:177
   23:54:03   11# Allocator<false, false, false>::free(void*, unsigned long) at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/common/allocator.h:154
   23:54:03   12# doris::vectorized::Arena::Chunk::~Chunk() at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/common/arena.h:77
   23:54:03   13# doris::vectorized::Arena::~Arena() at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/common/arena.h:142
   23:54:03   14# void 
std::destroy_at<doris::vectorized::Arena>(doris::vectorized::Arena*) at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_construct.h:89
   23:54:03   15# void 
std::allocator_traits<std::allocator<doris::vectorized::Arena> 
>::destroy<doris::vectorized::Arena>(std::allocator<doris::vectorized::Arena>&, 
doris::vectorized::Arena*) at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/alloc_traits.h:533
   23:54:03   16# std::_Sp_counted_ptr_inplace<doris::vectorized::Arena, 
std::allocator<doris::vectorized::Arena>, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose() at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:529
   23:54:03   17# 
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:168
   23:54:03   18# 
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:703
   23:54:03   19# std::__shared_ptr<doris::vectorized::Arena, 
(__gnu_cxx::_Lock_policy)2>::~__shared_ptr() at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:1149
   23:54:03   20# std::__shared_ptr<doris::vectorized::Arena, 
(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<doris::vectorized::Arena,
 (__gnu_cxx::_Lock_policy)2>&&) at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:1245
   23:54:03   21# 
std::shared_ptr<doris::vectorized::Arena>::operator=(std::shared_ptr<doris::vectorized::Arena>&&)
 at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr.h:385
   23:54:03   22# doris::vectorized::HashJoinNode::_release_mem() at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/exec/join/vhash_join_node.cpp:1111
   23:54:03   23# 
doris::vectorized::HashJoinNode::release_resource(doris::RuntimeState*) at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/exec/join/vhash_join_node.cpp:685
   23:54:03   24# doris::ExecNode::close(doris::RuntimeState*) at 
/home/zcp/repo_center/doris_master/doris/be/src/exec/exec_node.cpp:236
   23:54:03   25# doris::vectorized::VJoinNodeBase::close(doris::RuntimeState*) 
at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/exec/join/vjoin_node_base.cpp:153
   23:54:03   26# doris::vectorized::HashJoinNode::close(doris::RuntimeState*) 
in /mnt/hdd01/ci/master-deploy/be/lib/doris_be
   23:54:03   27# 
doris::pipeline::PipelineFragmentContext::close_if_prepare_failed(doris::Status)
 at 
/home/zcp/repo_center/doris_master/doris/be/src/pipeline/pipeline_fragment_context.cpp:796
   23:54:03   28# 
doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams const&, 
std::function<void (doris::RuntimeState*, doris::Status*)> 
const&)::$_1::operator()(int) const at 
/home/zcp/repo_center/doris_master/doris/be/src/runtime/fragment_mgr.cpp:934
   23:54:03   29# 
doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams const&, 
std::function<void (doris::RuntimeState*, doris::Status*)> 
const&)::$_0::operator()() const at 
/home/zcp/repo_center/doris_master/doris/be/src/runtime/fragment_mgr.cpp:984
   ```
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to