Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I use like printf function to write log with high frequency, it will cause crash in easyloggingpp #851

Open
i0gan opened this issue Apr 8, 2024 · 2 comments

Comments

@i0gan
Copy link

i0gan commented Apr 8, 2024

When I use like printf function to write log with high frequency, it will cause crash in easyloggingpp, but log a few times, this no problem, my code as follows:

logger_->info("%v", mstrLocalStream.c_str());

Straceback:
Fatal Error: Crash Signal: 11
core.so(_ZN9Exception10StackTraceEi+0x113) [0x7f4ea962f31b]
core.so(_ZN9Exception12CrashHandlerEi+0x19) [0x7f4ea962f4c2]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f4ea9007520]
/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSo6sentryC1ERSo+0x10) [0x7f4ea9349f80]
/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x3c) [0x7f4ea934aa0c]
/lib/x86_64-linux-gnu/libstdc++.so.6(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x2b) [0x7f4ea934aebb]
./plugin/core/log.so(_ZN2el4base14MessageBuilderlsEPKc+0x36) [0x7f4ea8033162]
./plugin/core/log.so(ZN2el6Logger4log_IPKcJEEEvNS_5LevelEiS3_RKT_DpRKT0+0xaa) [0x7f4ea8061210]
./plugin/core/log.so(ZN2el6Logger3logIPKcJEEEvNS_5LevelES3_RKT_DpRKT0+0x49) [0x7f4ea8060b7f]
./plugin/core/log.so(ZN2el6Logger4infoIPKcJEEEvS3_RKT_DpRKT0+0x31) [0x7f4ea805fde7]
./plugin/core/log.so(_ZN9LogModule3LogEN10ILogModule16SQUICK_LOG_LEVELEPKcz+0x3ce) [0x7f4ea805b866]
./plugin/core/log.so(_ZN9LogModule7LogInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci+0xa9) [0x7f4ea805bda9]
./plugin/core/lua.so(_ZN15LuaScriptModule7LogInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x73) [0x7f4ea799c4e5]
./plugin/core/lua.so(ZN7LuaIntf22CppDispatchClassMethodI15LuaScriptModuleLb0EMS1_FvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvSt5tupleIJNS_12CppArgHolderIS7_EEEELm0EJLm0EEE4callEPS1_RKSB_RSF+0x88) [0x7f4ea79eb209]
./plugin/core/lua.so(_ZN7LuaIntf20CppInvokeClassMethodI15LuaScriptModuleLb0EMS1_FvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvJNS_12CppArgHolderIS7_EEEE4callEPS1_RKSB_RSt5tupleIJSD_EE+0x2f) [0x7f4ea79e103c]
./plugin/core/lua.so(_ZN7LuaIntf20CppInvokeClassMethodI15LuaScriptModuleLb0EMS1_FvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvJNS_12CppArgHolderIS7_EEEE4pushEP9lua_StatePS1_RKSB_RSt5tupleIJSD_EE+0x33) [0x7f4ea79d832c]
./squick.sh: line 16: 216160 Segmentation fault (core dumped) ./squick $@

@i0gan
Copy link
Author

i0gan commented Apr 8, 2024

Just happen on linux system. but Windows is ok!

@i0gan
Copy link
Author

i0gan commented Apr 8, 2024

I solve it, Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant