STEllAR-GROUP / hpx

The C++ Standard Library for Parallelism and Concurrency
https://hpx.stellar-group.org
Boost Software License 1.0
2.53k stars 432 forks source link

thread_id_test and thread_launcher_test failing #690

Closed sithhell closed 11 years ago

sithhell commented 11 years ago

thread_id_test and thread_launcher_test are currently failing on rare occasions with a segfault.

reproduced backtrace follow:

[08:11:33]:heller@deneb:/home/heller/build/hpx/release:0:$ ./bin/thread_id_test -t12
{stack-trace}: 9 frames:
0x7fe926f2dc91  : hpx::termination_handler(int) + 0x81 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7fe923f43310  : ??? + 0x7fe923f43310 in /lib/x86_64-linux-gnu/libpthread.so.0
0x7fe92799bfff  : test_different_threads_have_different_ids() + 0x8f in ./bin/thread_id_test
0x7fe92799d05c  : hpx_main(boost::program_options::variables_map&) + 0x2c in ./bin/thread_id_test
0x7fe926f48b9f  : hpx::runtime_impl<hpx::threads::policies::local_priority_queue_scheduler, hpx::threads::policies::callback_notifier>::run_helper(hpx::util::function_nonser<int ()>, int&) + 0x13f in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7fe926f3e512  : hpx::util::detail::vtable<false>::type<boost::_bi::bind_t<hpx::threads::detail::tagged_thread_state<hpx::threads::thread_state_enum>, boost::_mfi::mf2<hpx::threads::detail::tagged_thread_state<hpx::threads::thread_state_enum>, hpx::runtime_impl<hpx::threads::policies::local_priority_queue_scheduler, hpx::threads::policies::callback_notifier>, hpx::util::function_nonser<int ()>, int&>, boost::_bi::list3<boost::_bi::value<hpx::runtime_impl<hpx::threads::policies::local_priority_queue_scheduler, hpx::threads::policies::callback_notifier>*>, boost::_bi::value<hpx::util::function_nonser<int ()> >, boost::reference_wrapper<int> > >, hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), void, void>::invoke(void**, hpx::threads::thread_state_ex_enum) + 0xc2 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7fe9271fb6f7  : 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()() + 0x167 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7fe9271e93a9  : 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>*) + 0x9 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
{what}: Segmentation fault
{version}: V1.0.0-trunk (AGAS: V2.1), Git: unknown
{boost}: V1.53.0
{build-type}: release
{date}: Jan 31 2013 04:50:05
{platform}: linux
{compiler}: GNU C++ version 4.6.2
{stdlib}: GNU libstdc++ version 20120120
Aborted
[08:11:14]:heller@deneb:/home/heller/build/hpx/release:0:$ ./bin/thread_launching_test -t12
{stack-trace}: 9 frames:
0x7f5396bd5c91  : hpx::termination_handler(int) + 0x81 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7f5393beb310  : ??? + 0x7f5393beb310 in /lib/x86_64-linux-gnu/libpthread.so.0
0x7f539764a29b  : test_thread_function_one_argument() + 0x8b in ./bin/thread_launching_test
0x7f539764bc37  : hpx_main(boost::program_options::variables_map&) + 0x27 in ./bin/thread_launching_test
0x7f5396bf0b9f  : hpx::runtime_impl<hpx::threads::policies::local_priority_queue_scheduler, hpx::threads::policies::callback_notifier>::run_helper(hpx::util::function_nonser<int ()>, int&) + 0x13f in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7f5396be6512  : hpx::util::detail::vtable<false>::type<boost::_bi::bind_t<hpx::threads::detail::tagged_thread_state<hpx::threads::thread_state_enum>, boost::_mfi::mf2<hpx::threads::detail::tagged_thread_state<hpx::threads::thread_state_enum>, hpx::runtime_impl<hpx::threads::policies::local_priority_queue_scheduler, hpx::threads::policies::callback_notifier>, hpx::util::function_nonser<int ()>, int&>, boost::_bi::list3<boost::_bi::value<hpx::runtime_impl<hpx::threads::policies::local_priority_queue_scheduler, hpx::threads::policies::callback_notifier>*>, boost::_bi::value<hpx::util::function_nonser<int ()> >, boost::reference_wrapper<int> > >, hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), void, void>::invoke(void**, hpx::threads::thread_state_ex_enum) + 0xc2 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7f5396ea36f7  : 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()() + 0x167 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7f5396e913a9  : 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>*) + 0x9 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
{what}: Segmentation fault
{version}: V1.0.0-trunk (AGAS: V2.1), Git: unknown
{boost}: V1.53.0
{build-type}: release
{date}: Jan 31 2013 04:50:05
{platform}: linux
{compiler}: GNU C++ version 4.6.2
{stdlib}: GNU libstdc++ version 20120120
Aborted
0x7f1a850ffc91  : hpx::termination_handler(int) + 0x81 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7f1a82115310  : ??? + 0x7f1a82115310 in /lib/x86_64-linux-gnu/libpthread.so.0
0x7f1a853aeb0b  : hpx::thread::thread_function_nullary(hpx::util::function_nonser<void ()> const&) + 0xb in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7f1a853cd6f7  : 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()() + 0x167 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
0x7f1a853bb3a9  : 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>*) + 0x9 in /home/heller/build/hpx/release/lib/hpx/libhpx.so.1
{what}: Segmentation fault
{version}: V1.0.0-trunk (AGAS: V2.1), Git: unknown
{boost}: V1.53.0
{build-type}: release
{date}: Jan 31 2013 04:50:05
{platform}: linux
{compiler}: GNU C++ version 4.6.2
{stdlib}: GNU libstdc++ version 20120120
Aborted
[08:11:03]:heller@deneb:/home/heller/build/hpx/release:0:$ ./bin/thread_launching_test -t12
/home/heller/programming/hpx/tests/unit/threads/thread_launching.cpp(121): test 'callable_one_arg::called' failed in function 'void test_thread_callable_object_one_argument()'
0 sanity checks and 1 test failed.
hkaiser commented 11 years ago

I have no idea what could cause this problem. Does it happen in debug mode as well?

hkaiser commented 11 years ago

This has been fixed