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

hpx::thread::detach suspends while holding locks, leads to hang in debug #516

Closed
brycelelbach opened this issue Sep 6, 2012 · 0 comments
Milestone

Comments

@brycelelbach
Copy link
Member

I get the following message right before a hang in barrier_test in debug mode.

To reproduce, run barrier_test on a single locality with a single thread.

(T00000000/0000000001dc3038.05/----------------) P00000000/0000000001dc3000.07 02:24.49.558 [000000000000039a]   <debug> [ERR] suspending thread while at least one lock is being held, stack backtrace: 30 frames:
0x7fb56bde237e  : boost::backtrace::backtrace(unsigned long) + 0x80 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56bde24e2  : boost::trace() + 0x1e in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56bdd7883  : hpx::detail::backtrace() + 0x18 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c36629b  : hpx::util::verify_no_locks() + 0x6f in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c06c7cd  : hpx::this_thread::suspend(hpx::threads::thread_state_enum, char const*, hpx::error_code&) + 0x4a in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x85017f        : hpx::lcos::local::spinlock::yield(unsigned long) + 0x4f in bin/barrier_test
0x85026c        : hpx::lcos::local::spinlock::lock() + 0x2e in bin/barrier_test
0x85e254        : boost::unique_lock<hpx::lcos::local::spinlock>::lock() + 0x44 in bin/barrier_test
0x855d9b        : boost::unique_lock<hpx::lcos::local::spinlock>::unique_lock(hpx::lcos::local::spinlock&) + 0x2f in bin/barrier_test
0x8528b5        : hpx::thread::detach() + 0x1f in bin/barrier_test
0x7fb56c0760b1  : hpx::util::detail::bound_member_function1<void, hpx::thread, hpx::thread* const>::operator()() + 0x77 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c075f15  : hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_member_function1<void, hpx::thread, hpx::thread* const>, void (), void, void>::invoke_(void**, mpl_::bool_<false>) + 0x1b in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c075c64  : hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_member_function1<void, hpx::thread, hpx::thread* const>, void (), void, void>::invoke(void**) + 0x1b in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56beaed3b  : hpx::util::function_base<void (), void, void>::operator()() + 0x53 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c076615  : hpx::threads::detail::thread_data::run_thread_exit_callbacks() + 0x5d in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c08072d  : hpx::threads::thread_data::run_thread_exit_callbacks() + 0x2f in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c088165  : hpx::threads::threadmanager_impl<hpx::threads::policies::local_priority_queue_scheduler, hpx::threads::policies::callback_notifier>::run_thread_exit_callbacks(void*, hpx::error_code&) + 0x20b in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c06b35e  : hpx::threads::run_thread_exit_callbacks(void*, hpx::error_code&) + 0x1c6 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c07034b  : ??? + 0x7fb56c07034b in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c0703bd  : hpx::thread::thread_function_nullary(hpx::util::function_nonser<void ()> const&) + 0x23 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56bf17174  : hpx::threads::thread_state_enum hpx::util::detail::bound_function1<hpx::threads::thread_state_enum, hpx::util::function_nonser<void ()> const&, hpx::util::function_nonser<void ()> >::operator()<hpx::threads::thread_state_ex_enum&>(hpx::threads::thread_state_ex_enum&) + 0x66 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56bf16e50  : hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_function1<hpx::threads::thread_state_enum, hpx::util::function_nonser<void ()> const&, hpx::util::function_nonser<void ()> >, hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), void, void>::invoke_(void**, hpx::threads::thread_state_ex_enum, mpl_::bool_<false>) + 0x25 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56bf169df  : hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_function1<hpx::threads::thread_state_enum, hpx::util::function_nonser<void ()> const&, hpx::util::function_nonser<void ()> >, hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), void, void>::invoke(void**, hpx::threads::thread_state_ex_enum) + 0x23 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c0a616b  : hpx::util::function_base<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), void, void>::operator()(hpx::threads::thread_state_ex_enum) const + 0x5b in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c0a549a  : hpx::util::coroutines::detail::unpacker_n<hpx::util::coroutines::tuple_traits<hpx::threads::thread_state_ex_enum, boost::tuples::null_type>, 1>::result<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)> const, boost::tuples::tuple<hpx::threads::thread_state_ex_enum, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::type hpx::util::coroutines::detail::unpacker_n<hpx::util::coroutines::tuple_traits<hpx::threads::thread_state_ex_enum, boost::tuples::null_type>, 1>::operator()<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)> const, boost::tuples::tuple<hpx::threads::thread_state_ex_enum, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >(hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)> const&, boost::tuples::tuple<hpx::threads::thread_state_ex_enum, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>&) + 0x30 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c0a4463  : hpx::util::coroutines::detail::unpacker_n<hpx::util::coroutines::tuple_traits<hpx::threads::thread_state_ex_enum, boost::tuples::null_type>, hpx::util::coroutines::tuple_traits<hpx::threads::thread_state_ex_enum, boost::tuples::null_type>::length>::result<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)>, boost::tuples::tuple<hpx::threads::thread_state_ex_enum, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::type hpx::util::coroutines::detail::unpack<hpx::util::coroutines::tuple_traits<hpx::threads::thread_state_ex_enum, boost::tuples::null_type>, hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)>, boost::tuples::tuple<hpx::threads::thread_state_ex_enum, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >(hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)> const&, boost::tuples::tuple<hpx::threads::thread_state_ex_enum, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>&, hpx::util::coroutines::detail::trait_tag<hpx::util::coroutines::tuple_traits<hpx::threads::thread_state_ex_enum, boost::tuples::null_type> >) + 0x27 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c0a32af  : boost::disable_if<boost::is_void<hpx::threads::thread_state_enum>, void>::type hpx::util::coroutines::detail::coroutine_impl_wrapper<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)>, hpx::util::coroutines::coroutine<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), hpx::threads::detail::coroutine_allocator, hpx::util::coroutines::detail::lx::x86_linux_context_impl>, hpx::util::coroutines::detail::lx::x86_linux_context_impl, hpx::threads::detail::coroutine_allocator>::do_call<hpx::threads::thread_state_enum>(hpx::util::coroutines::detail::coroutine_impl_wrapper<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)>, hpx::util::coroutines::coroutine<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), hpx::threads::detail::coroutine_allocator, hpx::util::coroutines::detail::lx::x86_linux_context_impl>, hpx::util::coroutines::detail::lx::x86_linux_context_impl, hpx::threads::detail::coroutine_allocator>::dummy<1>) + 0x85 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c0a188b  : hpx::util::coroutines::detail::coroutine_impl_wrapper<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)>, hpx::util::coroutines::coroutine<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), hpx::threads::detail::coroutine_allocator, hpx::util::coroutines::detail::lx::x86_linux_context_impl>, hpx::util::coroutines::detail::lx::x86_linux_context_impl, hpx::threads::detail::coroutine_allocator>::operator()() + 0x5b in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
0x7fb56c0a01e4  : void hpx::util::coroutines::detail::lx::trampoline<hpx::util::coroutines::detail::coroutine_impl_wrapper<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)>, hpx::util::coroutines::coroutine<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), hpx::threads::detail::coroutine_allocator, hpx::util::coroutines::detail::lx::x86_linux_context_impl>, hpx::util::coroutines::detail::lx::x86_linux_context_impl, hpx::threads::detail::coroutine_allocator> >(hpx::util::coroutines::detail::coroutine_impl_wrapper<hpx::util::function_nonser<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum)>, hpx::util::coroutines::coroutine<hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), hpx::threads::detail::coroutine_allocator, hpx::util::coroutines::detail::lx::x86_linux_context_impl>, hpx::util::coroutines::detail::lx::x86_linux_context_impl, hpx::threads::detail::coroutine_allocator>*) + 0x18 in /home/wash/hpx/gcc-4.6.2-debug/lib/hpx/libhpxd.so.1
@hkaiser hkaiser closed this as completed in 8d72e85 Sep 6, 2012
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

2 participants