abumq / easyloggingpp

C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k stars 918 forks source link

Got segment fault with multiple threads #807

Open kouhinn opened 2 years ago

kouhinn commented 2 years ago

Used the latest version.

(gdb) bt

0 el::Logger::isFlushNeeded (level=-1224753952, this=0x55c0b5e24d00) at /usr/include/c++/8/bits/hashtable_policy.h:341

1 el::base::DefaultLogDispatchCallback::dispatch (this=0x55c0b5e1e450, logLine=...)

at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/easylogging++.cc:2233

2 0x000055c0a9b40950 in el::base::DefaultLogDispatchCallback::handle(el::LogDispatchData const*) ()

at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/easylogging++.h:2167

3 0x000055c0a9b40a85 in el::base::LogDispatcher::dispatch() ()

at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/easylogging++.cc:2502

4 0x000055c0a9b4552b in el::base::Writer::triggerDispatch() () at /usr/include/c++/8/bits/move.h:99

5 0x000055c0a9b458a5 in el::base::Writer::processDispatch() ()

at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/easylogging++.cc:2616

6 0x000055c0a4b3707d in el::base::Writer::~Writer (this=0x7f3100e115c0, __in_chrg=)

usage: LOG(INFO) << "xxxxxxxxxxxxxxxx" <<"yyy:"<<yyy<< std::endl;

benoiticeye commented 2 years ago

Are you using -DELPP_THREAD_SAFE to build ?