-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
spdlog segfault #1333
Comments
Do you call spdlog::shutdown(), when your application dead?
| |
兰剑
|
|
邮箱:lan_0032@163.com
|
On 11/28/2019 20:01, Matteo Cerutti wrote:
I recently upgraded from spdlog 1.3.1 to 1.4.2. It seems that since then my applications crashes on shutdown leaving a core file. It seems it's trying to log but the sink is gone?
Would anyone know why this happens?
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f09fb77d837 in spdlog::async_logger::backend_sink_it_ (this=0x2799410, msg=...) at /usr/local/include/spdlog/async_logger-inl.h:63
63 sink->log(msg);
[Current thread is 1 (Thread 0x7f09d1a07700 (LWP 58))]
(gdb)
(gdb) bt
#0 0x00007f09fb77d837 in spdlog::async_logger::backend_sink_it_ (this=0x2799410, msg=...) at /usr/local/include/spdlog/async_logger-inl.h:63
#1 0x00007f09fb77d6b9 in spdlog::details::thread_pool::process_next_msg_ (this=0x230d9d0) at /usr/local/include/spdlog/details/thread_pool-inl.h:103
#2 0x00007f09fb77d57a in spdlog::details::thread_pool::worker_loop_ (this=0x230d9d0) at /usr/local/include/spdlog/details/thread_pool-inl.h:84
#3 0x00007f09fb77d245 in spdlog::details::thread_pool::thread_pool(unsigned long, unsigned long, std::function<void ()>)::{lambda()#1}::operator()() const (__closure=0x2a026b8) at /usr/local/include/spdlog/details/thread_pool-inl.h:27
#4 0x00007f09fb7857c3 in std::__invoke_impl<void, spdlog::details::thread_pool::thread_pool(unsigned long, unsigned long, std::function<void ()>)::{lambda()#1}>(std::__invoke_other, spdlog::details::thread_pool::thread_pool(unsigned long, unsigned long, std::function<voi
d ()>)::{lambda()#1}&&) (__f=...) at /usr/local/include/c++/8.3.0/bits/invoke.h:60
#5 0x00007f09fb78416d in std::__invoke<spdlog::details::thread_pool::thread_pool(unsigned long, unsigned long, std::function<void ()>)::{lambda()#1}>(std::__invoke_result&&, (spdlog::details::thread_pool::thread_pool(unsigned long, unsigned long, std::function<void ()>):
:{lambda()#1}&&)...) (__fn=...) at /usr/local/include/c++/8.3.0/bits/invoke.h:95
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
No - I don't do that. Should I? I see it's only an issue on windows (https://github.com/gabime/spdlog/wiki/6.-Asynchronous-logging) that leads to a deadlock. But here it's really a segfault.. |
Sorry, I didn't notice gcc compiler. |
Can you provide your test code? |
@zh1an, eventually I found the issue. It has nothing to do with spdlog. I was clearing a buffer on shutdown but boost asio was still holding on to that and moving it. The thing is that the error was too generic and misleading. At some point, I even got errors like:
or
So that led me to think that it wasn't a spdlog issue.. |
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
I recently upgraded from spdlog 1.3.1 to 1.4.2. It seems that since then my applications crash on shutdown leaving a core file. It seems it's trying to log but the sink is gone?
Would anyone know why this happens?
The text was updated successfully, but these errors were encountered: