remove_sink for a text_file_backend backed frontend crashed in ~locale

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

remove_sink for a text_file_backend backed frontend crashed in ~locale

Boost - Users mailing list
I am running on boost_1_54 (don't ask why but cpprestsdk only compiles
on SLES12 with that boost version).

I have a mysterious SIGABORT similar to what's reported here:
https://www.boost.org/doc/libs/1_66_0/libs/log/doc/html/log/rationale/why_crash_on_term.html

However even after I put the lines below in my application it still crashes:

    boost::filesystem::path::imbue(std::locale("C"));
    boost::filesystem::path::codecvt()

I've realized that in all example code except for
text_ostream_backend, the "remove_sink" call was not being used for
unknown reason. So do I need to call
"logging::core::get()->remove_all_sinks(); or remove_sink(sink)"?
when I call my destructor for my logging module?

The stack trace for the SIGABORT is shown below:
(gdb) bt
#0  0x00007fffea552d88 in abort () from /lib64/libc.so.6
#1  0x00007fffea58f1b4 in __libc_message () from /lib64/libc.so.6
#2  0x00007fffea594706 in malloc_printerr () from /lib64/libc.so.6
#3  0x00007fffea595453 in _int_free () from /lib64/libc.so.6
#4  0x00007fffefaeca66 in
__gnu_cxx::new_allocator<std::string>::deallocate
(this=0x7fff240aab88, __p=0x7fffb67fe228)
    at ../../../../suselinux-x8664/usr/include/C++/ext/new_allocator.h:110
#5  0x00007fffefaebac2 in std::_Vector_base<std::string,
std::allocator<std::string> >::_M_deallocate (this=0x7fff240aab88,
    __p=0x7fffb67fe228, __n=3) at
../../../../suselinux-x8664/usr/include/C++/bits/stl_vector.h:174
#6  0x00007fffefaeafae in std::_Vector_base<std::string,
std::allocator<std::string> >::~_Vector_base (this=0x7fff240aab88,
    __in_chrg=<optimized out>) at
../../../../suselinux-x8664/usr/include/C++/bits/stl_vector.h:160
#7  0x00007fffefaeaa26 in std::vector<std::string,
std::allocator<std::string> >::~vector (this=0x7fff240aab88,
    __in_chrg=<optimized out>) at
../../../../suselinux-x8664/usr/include/C++/bits/stl_vector.h:416
#8  0x00007ffe900b9806 in
boost::date_time::date_facet<boost::gregorian::date, char,
std::ostreambuf_iterator<char, std::char_traits<char> >
>::~date_facet() () from
/opt/mycomp/tdobject/lib/libboost_log.so.1.54.0
#9  0x00007ffe900b9943 in
boost::date_time::time_facet<boost::posix_time::ptime, char,
std::ostreambuf_iterator<char, std::char_traits<char> >
>::~time_facet() () from
/opt/mycomp/tdobject/lib/libboost_log.so.1.54.0
#10 0x00007fffea23c4b4 in std::locale::_Impl::~_Impl() () from
/usr/lib64/libstdc++.so.6
#11 0x00007fffea23c674 in std::locale::~locale() () from
/usr/lib64/libstdc++.so.6
#12 0x00007ffe900b078c in
boost::log::v2_mt_posix::aux::light_function<std::string (unsigned
int)>::impl<boost::_bi::bind_t<boost::_bi::unspecified,
boost::log::v2_mt_posix::sinks::(anonymous
namespace)::date_and_time_formatter,
boost::_bi::list2<boost::_bi::value<std::string>, boost::arg<1> > >
>::destroy_impl(boost::log::v2_mt_posix::aux::light_function<std::string
(unsigned int)>::impl_base*) () from
/opt/mycomp/tdobject/lib/libboost_log.so.1.54.0
#13 0x00007ffe900b163a in
boost::log::v2_mt_posix::sinks::text_file_backend::~text_file_backend()
()
   from /opt/mycomp/tdobject/lib/libboost_log.so.1.54.0
#14 0x00007fffb3667607 in
boost::detail::sp_ms_deleter<boost::log::v2_mt_posix::sinks::text_file_backend>::destroy
(
    this=0x7fff240a5628) at
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:57
#15 0x00007fffb366d916 in
boost::detail::sp_ms_deleter<boost::log::v2_mt_posix::sinks::text_file_backend>::operator()
(
    this=0x7fff240a5628) at
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:87
#16 0x00007fffb366d0e3 in
boost::detail::sp_counted_impl_pd<boost::log::v2_mt_posix::sinks::text_file_backend*,
boost::detail::sp_ms_deleter<boost::log::v2_mt_posix::sinks::text_file_backend>
>::dispose (this=0x7fff240a5610)
    at /usr/local/include/boost/smart_ptr/detail/sp_counted_impl.hpp:153
#17 0x00007fffb36568aa in boost::detail::sp_counted_base::release
(this=0x7fff240a5610)
    at /usr/local/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
#18 0x00007fffb365696d in boost::detail::shared_count::~shared_count
(this=0x7fff240a2870, __in_chrg=<optimized out>)
    at /usr/local/include/boost/smart_ptr/detail/shared_count.hpp:371
#19 0x00007fffb365a55e in
boost::shared_ptr<boost::log::v2_mt_posix::sinks::text_file_backend>::~shared_ptr
(this=0x7fff240a2868,
    __in_chrg=<optimized out>) at
/usr/local/include/boost/smart_ptr/shared_ptr.hpp:328
---Type <return> to continue, or q <return> to quit---
#20 0x00007fffb36516f5 in AZSDKInterface::~AZSDKInterface
(this=0x7fff240a2620, __in_chrg=<optimized out>)
    at AZSDKInterface.cpp:471
#21 0x00007fffb3651790 in AZSDKInterface::~AZSDKInterface
(this=0x7fff240a2620, __in_chrg=<optimized out>)
    at AZSDKInterface.cpp:512
#22 0x00007fffabdfd06a in DeleteTdObjectInterface (obj=0x7fff240a2620)
at TdObjectInterface.cpp:267
#23 0x00007ffff28ae250 in S3Connector::~S3Connector
(this=0x7fffb67fc160, __in_chrg=<optimized out>)
    at ../../lib/test/testconnector.cpp:190
#24 0x00007ffff28ae2ee in S3Connector::~S3Connector
(this=0x7fffb67fc160, __in_chrg=<optimized out>)
    at ../../lib/test/testconnector.cpp:197
#25 0x00007ffff28ba27a in testclose_int (ErrInfo_p=0x7fff6abc3880,
Cfg_p=0x7fff6abc2500) at ../../lib/test/testutils.cpp:599
#26 0x00007ffff28b31b8 in testvalidatelocation
(ErrInfo_p=0x7fff6abc3880, strLocation_p=0x7fff6abc3b90 "/",
strLocationLen=140,
    IsManifestFile=0 '\000') at ../../lib/test/testinterface.cpp:392
#27 0x00007ffff589e029 in UsingClauseNameErrCheck
(NameValListPtr=0x7fffb67ff1d0, DescListPtr=0x7fffb67ff810,
    TVMFlavor=0x7fff6abd34e9 "\002") at ../../par/res/rescommon.c:3284
#28 0x00007ffff571515b in Do_CT (T=0x7fffb67ff9d0,
LINK=0x7fff6abde280) at ../../par/res/resnamtb.c:14524
#29 0x00007ffff572d561 in SCAN (Tree=0x7fff6abde408,
LINK=0x7fff6abde640) at ../../par/res/resnamtb.c:24988
#30 0x00007ffff57329dc in resnamtb (Tree=0x7fffb67ff9d0,
ResGlobal=0x7fff6abefcf0, AccessRight=0 '\000',
    In_Create_Macro=0x7fff6abe2b61 "", ViewFo=0x7fff6abf4490,
ResData=..., NextIId=0x7fff6abe2d98, TVMFound=...)
    at ../../par/res/resnamtb.c:26902
#31 0x00007ffff5855752 in SCAN (Tree=0x7fffb67fee63,
LINK=0x7fff6abe2b50) at ../../par/res/resname.c:62197
#32 0x00007ffff5834c60 in Do_Stmt (T=0x7fffb67fee48,
LINK=0x7fff6abe0db0) at ../../par/res/resname.c:48525
#33 0x00007ffff585065d in SCAN (Tree=0x7fff6abf4510,
LINK=0x7fff6abe2b50) at ../../par/res/resname.c:59873
#34 0x00007ffff5860056 in resname (Tree_=0x7fff6abf4510,
ResGlobal_=0x7fff6abefcf0, AccessRight_=0 '\000',
    In_Create_Macro_=0 '\000', ViewFo_=0x7fff6abf4490, TablePtr_=0x0,
ColAccrFldLists=0x7fff6abefb90, ResData_=...,
    ThisStmtList_=0x7fffb67fede8, ReturnExpanded=0x0,
EffTIDReq_=ResIDMayExist) at ../../par/res/resname.c:66798
#35 0x00007ffff56f311f in resolve (TSeg=0x7fffb67c0000) at
../../par/res/resolve.c:6470
#36 0x00007ffff6a881a9 in pardrivr (DispParams=..., MscArg=...,
MsgLoc=140734984341520, TempReqSegLoc=140733395488768,
    TempUnityReqSegLoc=0, TskLoc=167784288, ReqCtx=0x7fffb5500000,
SesCtx=0x7fffbc8fde20, ValidateContextSegPtr=0x7fff6abfb900)
    at ../../par/par/pardrivr.c:19518
#37 0x00007ffff1535639 in disprreq (Global=0x7fffbcafa000,
TskCtx=0x7fffbcb1a8c8, SesCtx=0x7fffbc8fde20, Keep=0x7fff6abfd8c0,
    TskIndex=1, DumpMeCurrent=1 '\001', PrfGrp=0x7fff6abfdd14,
FromSP=0 '\000', FromIPE=0 '\000', AppCat=StandardApp,
    AppErrorRet=0x0, TopLevel=1 '\001') at ../../dis/dis/disdrivr.c:4721
#38 0x00007ffff1535bd7 in Process_Request (Global=0x7fffbcafa000,
TskCtx=0x7fffbcb1a8c8) at ../../dis/dis/disdrivr.c:5011
#39 0x00007ffff1535cc2 in sqldrivr_thread () at ../../dis/dis/disdrivr.c:5062
#40 0x00007ffff01b3c59 in tsknewthread (threadargp=<optimized out>) at
tsk/tskport.c:1129
#41 0x00007fffef1f2744 in start_thread () from /lib64/libpthread.so.0
#42 0x00007fffea606aad in clone () from /lib64/libc.so.6
(gdb)



Thanks for any hints or suggestions to work around this issue.

And where do you suggest I report this bug to?

Best regards,

Yang
new boost user
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users