Subject: [Boost-bugs] [Boost C++ Libraries] #10387: Strange infinite wait in log\sinks\async_frontend.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-21 04:37:32
#10387: Strange infinite wait in log\sinks\async_frontend.hpp
--------------------------------------+---------------------
Reporter: apolukhin | Owner: andysem
Type: Bugs | Status: new
Milestone: To Be Determined | Component: log
Version: Boost 1.56.0 | Severity: Problem
Keywords: log async condition wait |
--------------------------------------+---------------------
`void asynchronous_sink::stop()` waits for eternity on
`m_BlockCond.wait(lock);` line. When the call `m_BlockCond.wait(lock);`
occurs according to VisualStudio debugger there is no others running
threads, so no one could send a signal.
I've failed to create a minimal test case, but here is what happens
according to debugger:
* main thread exits the main() and enters the internal
`__crtExitProcess(code);` function (line 639 in `Microsoft Visual Studio
11.0\VC\crt\src\crt0dat.c`)
* Somewhere in depths of `ExitProcess(status)` the
`m_DedicatedFeedingThread` silently disappears. Looks like this happens at
the point when `m_event.wait();` is called (line 115 in
`boost\log\sinks\unbounded_fifo_queue.hpp`)
* `void asynchronous_sink::stop()` is called from the main thread
* main thread waits on `m_BlockCond.wait(lock);` for eternity (according
to the debugger there's no more threads remain, only the main thread)
If boost::log::core::get()->remove_all_sinks(); is called before exiting
the main, application does not hang.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10387> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC