boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
203 stars 162 forks source link

VS 2017.4 Preview test_scheduled_tp_p.exe deadlock #135

Closed garyfurnish closed 7 years ago

garyfurnish commented 7 years ago

Deadlock requires end-task to continue tests. Produced in 3222938 with 2017.4 preview, suspect also occurs in 2017.3. Tested in debug, address-model=64. Maybe related to #134 All Threads appear to be stuck on thread.cpp line 741. Main thread call stack:

>   boost_thread-vc141-mt-gd-1_65.dll!boost::this_thread::interruptible_wait(void * handle_to_wait_for, boost::detail::timeout target_time) Line 741    C++ Symbols loaded.
    boost_thread-vc141-mt-gd-1_65.dll!boost::thread::join_noexcept() Line 453   C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::thread::join() Line 775  C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::thread_group::join_all() Line 120    C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::executors::scheduled_thread_pool::~scheduled_thread_pool() Line 35   C++ Symbols loaded.
    test_scheduled_tp_p.exe!test_deque_multi(const int n) Line 84   C++ Symbols loaded.
    test_scheduled_tp_p.exe!main() Line 94  C++ Symbols loaded.

Worker thread call stack:

>   boost_thread-vc141-mt-gd-1_65.dll!boost::this_thread::interruptible_wait(void * handle_to_wait_for, boost::detail::timeout target_time) Line 741    C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::detail::basic_cv_list_entry::wait(boost::detail::timeout abs_time) Line 95   C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::detail::basic_condition_variable::do_wait<boost::unique_lock<boost::mutex> >(boost::unique_lock<boost::mutex> & lock, boost::detail::timeout abs_time) Line 245  C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::condition_variable::wait(boost::unique_lock<boost::mutex> & m) Line 339  C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock>::wait_until_not_empty_time_reached_or_closed(boost::unique_lock<boost::mutex> & lk) Line 238   C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock>::wait_pull(boost::unique_lock<boost::mutex> & lk, boost::detail::nullary_function<void __cdecl(void)> & elem) Line 419 C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock>::wait_pull(boost::detail::nullary_function<void __cdecl(void)> & elem) Line 429    C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> >::loop() Line 61 C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >::call<boost::executors::scheduled_thread_pool * __ptr64>(boost::executors::scheduled_thread_pool * & u, const void * __formal) Line 41  C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >::operator()<boost::executors::scheduled_thread_pool * __ptr64>(boost::executors::scheduled_thread_pool * & u) Line 56   C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::_bi::list1<boost::_bi::value<boost::executors::scheduled_thread_pool * __ptr64> >::operator()<boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >,boost::_bi::list0>(boost::_bi::type<void> __formal, boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > > & f, boost::_bi::list0 & a, int __formal) Line 260 C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::_bi::bind_t<void,boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >,boost::_bi::list1<boost::_bi::value<boost::executors::scheduled_thread_pool * __ptr64> > >::operator()() Line 1295  C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::detail::invoke<boost::_bi::bind_t<void,boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >,boost::_bi::list1<boost::_bi::value<boost::executors::scheduled_thread_pool * __ptr64> > > >(boost::_bi::bind_t<void,boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >,boost::_bi::list1<boost::_bi::value<boost::executors::scheduled_thread_pool *> > > && f) Line 135    C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::detail::thread_data<boost::_bi::bind_t<void,boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >,boost::_bi::list1<boost::_bi::value<boost::executors::scheduled_thread_pool * __ptr64> > > >::run2<>(boost::detail::tuple_indices<> __formal) Line 76    C++ Symbols loaded.
    test_scheduled_tp_p.exe!boost::detail::thread_data<boost::_bi::bind_t<void,boost::_mfi::mf0<void,boost::executors::detail::priority_executor_base<boost::concurrent::sync_timed_queue<boost::detail::nullary_function<void __cdecl(void)>,boost::chrono::steady_clock> > >,boost::_bi::list1<boost::_bi::value<boost::executors::scheduled_thread_pool * __ptr64> > > >::run() Line 82  C++ Symbols loaded.
    boost_thread-vc141-mt-gd-1_65.dll!boost::`anonymous namespace'::thread_start_function(void * param) Line 296    C++ Symbols loaded.
    [External Code]     Annotated Frame

Dump/pdb/etc available, email me.

garyfurnish commented 7 years ago

Tests clean and closing as fixed by 39c23dd.