TarsCloud / TarsCpp

C++ language framework rpc source code implementation
BSD 3-Clause "New" or "Revised" License
520 stars 254 forks source link

写日志崩溃 #302

Open duansumin2022 opened 8 months ago

duansumin2022 commented 8 months ago

客户端程序写第一条日志TLOGINFO崩溃,tars版本v3.0.16

以下是堆栈信息

Program terminated with signal 6, Aborted.
#0  0x00007f4e5175a207 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
55    return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0  0x00007f4e5175a207 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007f4e5175b8f8 in __GI_abort () at abort.c:90
#2  0x00007f4e52069a95 in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007f4e52067a06 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:38
#4  0x00007f4e52067a33 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
#5  0x00007f4e52067c53 in __cxxabiv1::__cxa_throw (obj=0x6ae080, tinfo=0x7f4e532416e0 <typeinfo for tars::TC_ThreadThreadControl_Exception>, 
    dest=0x7f4e52c54968 <tars::TC_ThreadThreadControl_Exception::~TC_ThreadThreadControl_Exception()>) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:87
#6  0x00007f4e52c53e34 in tars::TC_Thread::start (this=0x6adb30) at /home/duansumin/workspace/project/tarCompile/TarsCppv3.0.16/util/src/tc_thread.cpp:150
#7  0x00007f4e52c5d02c in tars::TC_TimeProvider::__lambda7::operator() (__closure=0x7ffd7781408b)
    at /home/duansumin/workspace/project/tarCompile/TarsCppv3.0.16/util/src/tc_timeprovider.cpp:32
#8  0x00007f4e52c5d872 in std::_Bind_simple<tars::TC_TimeProvider::getInstance()::__lambda7()>::_M_invoke<>(std::_Index_tuple<>) (this=0x7ffd7781408b)
    at /usr/include/c++/4.8.2/functional:1732
#9  0x00007f4e52c5d813 in std::_Bind_simple<tars::TC_TimeProvider::getInstance()::__lambda7()>::operator()(void) (this=0x7ffd7781408b)
    at /usr/include/c++/4.8.2/functional:1720
#10 0x00007f4e52c5d73d in std::__once_call_impl<std::_Bind_simple<tars::TC_TimeProvider::getInstance()::__lambda7()> >(void) () at /usr/include/c++/4.8.2/mutex:754
#11 0x00007f4e5231de40 in pthread_once () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S:103
#12 0x00007f4e52c5cfe3 in __gthread_once (__once=0x7f4e5328076c <tars::TC_TimeProvider::getInstance()::flag>, __func=0x7f4e520bd8c0 <std::__once_proxy()>)
    at /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:699
#13 0x00007f4e52c5d6cd in std::call_once<tars::TC_TimeProvider::getInstance()::__lambda7>(std::once_flag &, <unknown type in /home/duansumin/workspace/project/yunxingyu/sr195bak/traffic_lane_2/kmsClientDemo/lib/libsdkClient.so, CU 0x126beab, DIE 0x1270e4c>) (__once=..., 
    __f=<unknown type in /home/duansumin/workspace/project/yunxingyu/sr195bak/traffic_lane_2/kmsClientDemo/lib/libsdkClient.so, CU 0x126beab, DIE 0x1270e4c>)
    at /usr/include/c++/4.8.2/mutex:786
#14 0x00007f4e52c5d069 in tars::TC_TimeProvider::getInstance () at /home/duansumin/workspace/project/tarCompile/TarsCppv3.0.16/util/src/tc_timeprovider.cpp:33
#15 0x00007f4e52a5f7a7 in tars::TC_Logger<tars::RollWriteT, tars::TC_RollBySize>::head (this=0x6acd08, c=0x7ffd778141b0 "", len=127, level=4)
    at /usr/local/tars/cpp/include/util/tc_logger.h:931
#16 0x00007f4e52a5de59 in tars::TC_Logger<tars::RollWriteT, tars::TC_RollBySize>::stream (this=0x6acd08, level=4) at /usr/local/tars/cpp/include/util/tc_logger.h:963
#17 0x00007f4e52a5ca5f in tars::TC_Logger<tars::RollWriteT, tars::TC_RollBySize>::log (this=0x6acd08, level=4) at /usr/local/tars/cpp/include/util/tc_logger.h:895
#18 0x00007f4e52a88166 in SR_InitAgentCommEnv (deviceType=3, SN=0x7ffd77816770 '0' <repeats 25 times>, "641", nSNLen=28, pCfgFile=0x6a79a8 "/etc/srconfig/etcsdk.conf")
    at /home/duansumin/workspace/project/yunxingyu/kmsClient/client/sdk_api.cpp:101
#19 0x0000000000405f27 in SR_Storage_Encrypt_Decrypt(void*) ()
#20 0x0000000000404ba6 in main ()
ruanshudong commented 8 months ago

你这是啥系统啊?

duansumin2022 commented 7 months ago

你这是啥系统啊? CentOS Linux release 7.6.1810 (Core)