junction icon indicating copy to clipboard operation
junction copied to clipboard

Coredump in turf heap free when TURF_REPLACE_OPERATOR_NEW=1

Open brucejee opened this issue 2 years ago • 0 comments

@preshing I use junction and turf static lib, TURF_REPLACE_OPERATOR_NEW is open by default, but when integrate into application, the application coredump at operator delete. Does it's need recompile all the dependent libraries for this program?

Program terminated with signal 6, Aborted.
#0  0x00007f4c6e5971f7 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-196.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-8.el7.x86_64 libcom_err-1.42.9-10.el7.x86_64 libgcc-4.8.5-16.el7.x86_64 libselinux-2.5-11.el7.x86_64 libstdc++-4.8.5-16.el7.x86_64 pcre-8.32-17.el7.x86_64
(gdb) bt
#0  0x00007f4c6e5971f7 in raise () from /lib64/libc.so.6
#1  0x00007f4c6e5988e8 in abort () from /lib64/libc.so.6
#2  0x00007f4c6e5d6f47 in __libc_message () from /lib64/libc.so.6
#3  0x00007f4c6e5dcb54 in malloc_printerr () from /lib64/libc.so.6
#4  0x00007f4c6e5de7aa in _int_free () from /lib64/libc.so.6
#5  0x0000000000b0d138 in turf::Heap_CRT::Operator::free (this=0x7f4c4f7fcbff, ptr=0x7f4c1000e670)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/turf/impl/Heap_CRT.h:34
#6  0x000000000115bc79 in operator delete (ptr=0x7f4c1000e670) at /home/jlh/opensource/turf/turf/Heap.cpp:33
#7  0x0000000000d08014 in biz_common::FixParam::~FixParam (this=0x7f4c1000e670, __in_chrg=<optimized out>)
    at /home/jlh/oin/proto/biz_common.pb.cc:6361
#8  0x0000000000e7c652 in biz_adapter::QueryFundMaxWithdrawRequest::SharedDtor (this=0x7f4c1000ff30)
    at /home/jlh/oin/proto/biz_adapter.pb.cc:202661
#9  0x0000000000e7c581 in biz_adapter::QueryFundMaxWithdrawRequest::~QueryFundMaxWithdrawRequest (this=0x7f4c1000ff30,
    __in_chrg=<optimized out>) at /home/jlh/oin/proto/biz_adapter.pb.cc:202654
#10 0x0000000000e7c5cc in biz_adapter::QueryFundMaxWithdrawRequest::~QueryFundMaxWithdrawRequest (this=0x7f4c1000ff30,
    __in_chrg=<optimized out>) at /home/jlh/oin/proto/biz_adapter.pb.cc:202655
#11 0x0000000000aec4ea in std::_Sp_counted_ptr<google::protobuf::Message*, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x7f4c1000f170)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:290
#12 0x0000000000aa3532 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f4c1000f170)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#13 0x0000000000a86f93 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7f4c4f7fcd28,
    __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:546
#14 0x0000000000a804fc in std::__shared_ptr<google::protobuf::Message, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7f4c4f7fcd20,
    __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:781
#15 0x0000000000a899b3 in std::__shared_ptr<google::protobuf::Message, (__gnu_cxx::_Lock_policy)2>::reset (this=0x7f4c1000ffb0)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:882
#16 0x0000000000a80955 in MsgCommBase::DeInit (this=0x7f4c1000ff70)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/adapter_common/adapter_bizcomm_msg.h:75
#17 0x0000000000a81eb6 in Msg::DeInit (this=0x7f4c1000ff70) at /home/jlh/oin/src/apex_adapter_3rd/src/apex_adapter_msg.h:59
#18 0x0000000000a82042 in PoolableMsgFactory::passivate_object (this=0x2ddf5b8, msg=0x7f4c1000ff70)
    at /home/jlh/oin/src/apex_adapter_3rd/src/apex_adapter_msg.h:188
#19 0x0000000000adedca in GenericObjectPool<Msg>::return_object (this=0x2dd7f48, obj=0x7f4c1000ff70)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/adapter_common/object_pool.h:133
#20 0x0000000000adb8ed in GenericObjectPool<Msg>::Deleter::operator() (this=0x7f4c10011718, obj=0x7f4c1000ff70)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/adapter_common/object_pool.h:66
#21 0x0000000000aec015 in std::_Sp_counted_deleter<Msg*, GenericObjectPool<Msg>::Deleter, std::allocator<int>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x7f4c10011700) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:347
#22 0x0000000000aa3532 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f4c10011700)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#23 0x0000000000a86f93 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x46aca50, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:546
---Type <return> to continue, or q <return> to quit---
#24 0x0000000000a83c92 in std::__shared_ptr<Msg, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x46aca48, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:781

#25 0x0000000000a83cac in std::shared_ptr<Msg>::~shared_ptr (this=0x46aca48, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8.2/bits/shared_ptr.h:93
#26 0x0000000000cd5b30 in std::pair<long, std::shared_ptr<Msg> >::~pair (this=0x46aca40, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8.2/bits/stl_pair.h:96
#27 0x0000000000cd5b4e in __gnu_cxx::new_allocator<std::pair<long const, std::shared_ptr<Msg> > >::destroy<std::pair<long, std::shared_ptr<Msg> > > (this=0x4606470, __p=0x46aca40) at /usr/include/c++/4.8.2/ext/new_allocator.h:124
#28 0x0000000000cd061d in std::allocator_traits<std::allocator<std::pair<long const, std::shared_ptr<Msg> > > >::_S_destroy<std::pair<long, std::shared_ptr<Msg> > > (__a=..., __p=0x46aca40) at /usr/include/c++/4.8.2/bits/alloc_traits.h:281
#29 0x0000000000ccb4fa in std::allocator_traits<std::allocator<std::pair<long const, std::shared_ptr<Msg> > > >::destroy<std::pair<long, std::shared_ptr<Msg> > > (__a=..., __p=0x46aca40) at /usr/include/c++/4.8.2/bits/alloc_traits.h:405
#30 0x0000000000cc4b8f in libcuckoo::bucket_container<long, std::shared_ptr<Msg>, std::allocator<std::pair<long const, std::shared_ptr<Msg> > >, unsigned char, 4ul>::eraseKV (this=0x4606470, ind=192, slot=2)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/libcuckoo/bucket_container.hh:219
#31 0x0000000000cb7b36 in libcuckoo::cuckoohash_map<long, std::shared_ptr<Msg>, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, std::shared_ptr<Msg> > >, 4ul>::del_from_bucket (this=0x4606468, bucket_ind=192, slot=2)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/libcuckoo/cuckoohash_map.hh:1963
#32 0x0000000000c9f496 in libcuckoo::cuckoohash_map<long, std::shared_ptr<Msg>, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, std::shared_ptr<Msg> > >, 4ul>::erase_fn<long, bool libcuckoo::cuckoohash_map<long, std::shared_ptr<Msg>, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, std::shared_ptr<Msg> > >, 4ul>::erase<long>(long const&)::{lambda(std::shared_ptr<Msg>&)#1}>(long const&, bool libcuckoo::cuckoohash_map<long, std::shared_ptr<Msg>, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, std::shared_ptr<Msg> > >, 4ul>::erase<long>(long const&)::{lambda(std::shared_ptr<Msg>&)#1}) (
    this=0x4606468, key=@0x7f4c4f7fd090: 139964327177408, fn=...)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/libcuckoo/cuckoohash_map.hh:518
#33 0x0000000000c553ee in libcuckoo::cuckoohash_map<long, std::shared_ptr<Msg>, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, std::shared_ptr<Msg> > >, 4ul>::erase<long> (this=0x4606468, key=@0x7f4c4f7fd090: 139964327177408)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/libcuckoo/cuckoohash_map.hh:650
#34 0x0000000000c1a637 in CuckooMap<long, std::shared_ptr<Msg> >::Delete (this=0x4606468, key=@0x7f4c4f7fd090: 139964327177408)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/libcuckoo/cuckoo_map.h:30
#35 0x0000000000c16aeb in ApexAdapterWorker::ReleaseMsg (this=0x4606418, session=139964327177408)
    at /home/jlh/oin/src/apex_adapter_3rd/src/apex_adapter_worker.h:92
#36 0x0000000000c01798 in RspMsgWorker::dojob (this=0x4642938) at /home/jlh/oin/src/apex_adapter_3rd/src/apex_adapter_worker.cpp:6012
#37 0x0000000000b0bab9 in ec::cThread::mainloop (this=0x4642938) at /home/jlh/oin/src/apex_adapter_3rd/../../include/ec/c11_thread.h:93
#38 0x0000000000b0b9f6 in ec::cThread::ThreadProcess (pargs=0x4642938)
    at /home/jlh/oin/src/apex_adapter_3rd/../../include/ec/c11_thread.h:81
#39 0x0000000000b48202 in std::_Bind_simple<void (*(ec::cThread*))(void*)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x4642a50)
    at /usr/include/c++/4.8.2/functional:1732
#40 0x0000000000b47e0b in std::_Bind_simple<void (*(ec::cThread*))(void*)>::operator()() (this=0x4642a50)
    at /usr/include/c++/4.8.2/functional:1720
#41 0x0000000000b4799a in std::thread::_Impl<std::_Bind_simple<void (*(ec::cThread*))(void*)> >::_M_run() (this=0x4642a38)
---Type <return> to continue, or q <return> to quit---
    at /usr/include/c++/4.8.2/thread:115
#42 0x00007f4c6eef22b0 in ?? () from /lib64/libstdc++.so.6
#43 0x00007f4c72ce9e25 in start_thread () from /lib64/libpthread.so.0
#44 0x00007f4c6e65a34d in clone () from /lib64/libc.so.6

brucejee avatar Nov 18 '22 02:11 brucejee