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

Segfault with a3382fb #956

Closed
eschnett opened this issue Oct 17, 2013 · 2 comments
Closed

Segfault with a3382fb #956

eschnett opened this issue Oct 17, 2013 · 2 comments

Comments

@eschnett
Copy link
Contributor

My application https://bitbucket.org/eschnett/block-matrix encounters a segfault with HPX a3382fb and some of its predecessors.

I start with

./bin/block_matrix --hpx:debug-hpx-log=block_matrix.log --nsize=200 --nblocks=8

This is my backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe7fff700 (LWP 8865)]
0x0000555555dff0ae in boost::detail::atomic_increment (pw=0x756265643c202028)
    at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:66
66      );
(gdb) bt
#0  0x0000555555dff0ae in boost::detail::atomic_increment (
    pw=0x756265643c202028)
    at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:66
#1  0x0000555555dff18c in boost::detail::sp_counted_base::add_ref_copy (
    this=0x756265643c202020)
    at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:133
#2  0x0000555555dff2cf in boost::detail::shared_count::shared_count (
    this=0x7fffe542fc18, r=...)
    at /usr/include/boost/smart_ptr/detail/shared_count.hpp:316
#3  0x0000555555e09d21 in boost::shared_ptr<vector_t const>::shared_ptr<vector_t> (this=0x7fffe542fc10, r=...)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:244
#4  0x000055555603ff0e in vector_t_component::faxpy (this=0x7fffc804f160, 
    alpha=-1, xi=...) at matrix_hpx.cc:20
#5  0x0000555555e3a5f8 in operator()<vector_t_component, double&, hpx::naming::id_type&, double, const hpx::naming::id_type&> (arg1=..., 
    arg0=@0x7fffc804fdf0: -1, obj=0x7fffc804f160, func=
    (hpx::naming::id_type (vector_t_component::*)(const vector_t_component * const, double, const hpx::naming::id_type &)) 0x55555603fe8e <vector_t_component::faxpy(double, hpx::naming::id_type const&) const>, cont=..., 
    this=0x7fffc804fdc0)
    at /xfs1/eschnetter/compute/hpx/include/hpx/runtime/actions/preprocessed/construct_continuation_functions_10.hpp:485
#6  invoke_r<hpx::threads::thread_state_enum, hpx::actions::action<vector_t_component const, hpx::naming::id_type, hpx::util::tuple<double, hpx::naming::id_type, void, void, void, void, void, void, void, void, void, void, void>, hpx::actions::result_action2<hpx::naming::id_type (vector_t_component::*)(double, hpx::naming::id_type const&) const, &vector_t_component::faxpy, hpx::actions::detail::this_type> >::continuation_thread_object_function_2&, boost::shared_ptr<hpx::actions::continuation>&, hpx::naming::id_type (vector_t_component::*&)(double, hpx::naming::id_type const&) const, vector_t_component const*&, double&, hpx::naming::id_type&> (arg4=..., arg3=@0x7fffc804fdf0: -1, 
    arg2=@0x7fffc804fde8: 0x7fffc804f160, arg1=
    @0x7fffc804fdd8: (hpx::naming::id_type (vector_t_component::*)(const vector_t_component * const, double, const hpx::naming::id_type &)) 0x55555603fe8e <vector_t_component::faxpy(double, hpx::naming::id_type const&) const>, arg0=..., 
    f=...)
    at /xfs1/eschnetter/compute/hpx/include/hpx/util/preprocessed/invoke_10.hpp:786
#7  invoke<hpx::actions::action<vector_t_component const, hpx::naming::id_type, hpx::util::tuple<double, hpx::naming::id_type, void, void, void, void, void, void, void, void, void, void, void>, hpx::actions::result_action2<hpx::naming::id_type (vector_t_component::*)(double, hpx::naming::id_type const&) const, &vector_t_component::faxpy, hpx::actions::detail::this_type> >::continuation_thread_object_function_2&, boost::shared_ptr<hpx::actions::continuation>&, hpx::naming::id_type (vector_t_component::*&)(double, hpx::naming::id_type const&) const, vector_t_component const*&, double&, hpx::naming::id_type&> (arg4=..., 
    arg3=@0x7fffc804fdf0: -1, arg2=@0x7fffc804fde8: 0x7fffc804f160, arg1=
    @0x7fffc804fdd8: (hpx::naming::id_type (vector_t_component::*)(const vector_t_component * const, double, const hpx::naming::id_type &)) 0x55555603fe8e <vector_t_component::faxpy(double, hpx::naming::id_type const&) const>, arg0=..., 
    f=...)
    at /xfs1/eschnetter/compute/hpx/include/hpx/util/preprocessed/invoke_10.hpp:848
#8  operator()<hpx::threads::thread_state_ex_enum> (
    a0=@0x7fffe542ff20: hpx::threads::wait_signaled, this=0x7fffc804fdc0)
    at /xfs1/eschnetter/compute/hpx/include/hpx/util/preprocessed/bind_10.hpp:1569
#9  invoke_r<hpx::threads::thread_state_enum, hpx::util::detail::bound_functor5<hpx::actions::action<vector_t_component const, hpx::naming::id_type, hpx::util::tuple<double, hpx::naming::id_type, void, void, void, void, void, void, void, void, void, void, void>, hpx::actions::result_action2<hpx::naming::id_type (vector_t_component::*)(double, hpx::naming::id_type const&) const, &vector_t_component::faxpy, hpx::actions::detail::this_type> >::continuation_thread_object_function_2, boost::shared_ptr<hpx::actions::continuation>, hpx::naming::id_type (vector_t_component::* const)(double, hpx::naming::id_type const&) const, vector_t_component const*, double, hpx::naming::id_type>&, hpx::threads::thread_state_ex_enum> (arg0=@0x7fffe542ff20: hpx::threads::wait_signaled, f=...)
    at /xfs1/eschnetter/compute/hpx/include/hpx/util/preprocessed/invoke_10.hpp:114
#10 hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_functor5<hpx::actions::action<vector_t_component const, hpx::naming::id_type, hpx::util::tuple<double, hpx::naming::id_type, void, void, void, void, void, void, void, void, void, void, void>, hpx::actions::result_action2<hpx::naming::id_type (vector_t_component::*)(double, hpx::naming::id_type const&) const, &(vector_t_component::faxpy(double, hpx::naming::id_type const&) const), hpx::actions::detail::this_type> >::continuation_thread_object_function_2, boost::shared_ptr<hpx::actions::continuation>, hpx::naming::id_type (vector_t_component::* const)(double, hpx::naming::id_type const&) const, vector_t_component const*, double, hpx::naming::id_type>, hpx::threads::thread_state_enum (hpx::threads::thread_state_ex_enum), void, void>::invoke(void**, hpx::threads::thread_state_ex_enum&&) (
    f=0x7fffc804e950, a0=@0x7fffe542ff20: hpx::threads::wait_signaled)
    at /xfs1/eschnetter/compute/hpx/include/hpx/util/detail/preprocessed/vtable2_10.hpp:78
#11 0x00007ffff69dd72c in operator() (a0=hpx::threads::wait_signaled, 
---Type <return> to continue, or q <return> to quit---
    this=0x7fffc804e948)
    at /xfs1/eschnetter/compute/src/hpx/hpx/util/detail/preprocessed/function_template_10.hpp:476
#12 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()() (
    this=0x7fffc804e8c0)
    at /xfs1/eschnetter/compute/src/hpx/hpx/util/coroutine/detail/coroutine_impl.hpp:298
#13 0x00007ffff69da081 in 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>*) (fun=0x7fffc804e8c0)
    at /xfs1/eschnetter/compute/src/hpx/hpx/util/coroutine/detail/context_linux_x86.hpp:88
#14 0x0000000000000000 in ?? ()

The last lines of the HPX log are

(T00000000/000055555640c9c0.0004/----------------) P00000000/000055555640caa0.0005 22:09.27.237 [0000000000000867]   <debug>  [TM] base_action1::execute_function name(N3hpx7actions14direct_action1IMNS_4lcos19base_lco_with_valueIN5boost10shared_ptrIK8vector_tEES8_EEFvOS8_EXadL_ZNS9_17set_value_nonvirtESA_EENS0_6detail9this_typeEEE) lva(0x7fffc804da30)
(T00000000/000055555640c9c0.0004/----------------) P00000000/000055555640caa0.0005 22:09.27.237 [0000000000000868]    <info>  [TM] set_thread_state: thread(0x55555640caa0), description(N3hpx7actions14result_action2IM18vector_t_componentKFNS_6naming7id_typeEdRKS4_EXadL_ZNKS2_5faxpyEdS6_EENS0_6detail9this_typeEEE), new state(pending), old state(suspended)
(T00000000/----------------.----/----------------) P--------/----------------.---- 22:09.27.237 [0000000000000869]   <debug>  [TM] tfunc(0): thread(0x55555640c9c0), description(N3hpx7actions14result_action0IM18vector_t_componentKFN5boost10shared_ptrIK8vector_tEEvEXadL_ZNKS2_8get_dataEvEENS0_6detail9this_typeEEE), new state(terminated), normal
(T00000000/----------------.----/----------------) P--------/----------------.---- 22:09.27.237 [000000000000086a]   <debug>  [TM] tfunc(0): thread(0x55555640ccd0), description(N3hpx7actions14result_action0IM18vector_t_componentKFN5boost10shared_ptrIK8vector_tEEvEXadL_ZNKS2_8get_dataEvEENS0_6detail9this_typeEEE), old state(pending)
(T00000000/000055555640ccd0.0003/----------------) P00000000/000055555640cb10.0004 22:09.27.237 [000000000000086b]   <debug>  [TM] Executing action(N3hpx7actions14result_action0IM18vector_t_componentKFN5boost10shared_ptrIK8vector_tEEvEXadL_ZNKS2_8get_dataEvEENS0_6detail9this_typeEEE) with continuation({0000000100000001, 000000000091100f})
(T00000000/000055555640ccd0.0003/----------------) P00000000/000055555640cb10.0004 22:09.27.237 [000000000000086c]    <info> [LCO] typed_continuation<Result>::trigger_value({0000000100000001, 000000000091100f})
(T00000000/000055555640ccd0.0003/----------------) P00000000/000055555640cb10.0004 22:09.27.237 [000000000000086d]   <debug>  [AS] cache hit for address {0000000100000001, 000000000091100f}, lva 0x7fffe55ba088 (base {0000000100000001, 0000000000911000}, lva 0x7fffe55ba010)
(T00000000/000055555640ccd0.0003/----------------) P00000000/000055555640cb10.0004 22:09.27.237 [000000000000086e]   <debug>  [TM] base_action1::execute_function name(N3hpx7actions14direct_action1IMNS_4lcos19base_lco_with_valueIN5boost10shared_ptrIK8vector_tEES8_EEFvOS8_EXadL_ZNS9_17set_value_nonvirtESA_EENS0_6detail9this_typeEEE) lva(0x7fffc804e230)
(T00000000/000055555640ccd0.0003/----------------) P00000000/000055555640cb10.0004 22:09.27.237 [000000000000086f]    <info>  [TM] set_thread_state: thread(0x55555640cb10), description(N3hpx7actions14result_action2IM18vector_t_componentKFNS_6naming7id_typeEdRKS4_EXadL_ZNKS2_5faxpyEdS6_EENS0_6detail9this_typeEEE), new state(pending), old state(suspended)
(T00000000/----------------.----/----------------) P--------/----------------.---- 22:09.27.238 [0000000000000870]   <debug>  [TM] tfunc(0): thread(0x55555640ccd0), description(N3hpx7actions14result_action0IM18vector_t_componentKFN5boost10shared_ptrIK8vector_tEEvEXadL_ZNKS2_8get_dataEvEENS0_6detail9this_typeEEE), new state(terminated), normal
(T00000000/----------------.----/----------------) P--------/----------------.---- 22:09.27.238 [0000000000000871]   <debug>  [TM] tfunc(0): thread(0x55555640cc60), description(N3hpx7actions14result_action0IM18vector_t_componentKFN5boost10shared_ptrIK8vector_tEEvEXadL_ZNKS2_8get_dataEvEENS0_6detail9this_typeEEE), old state(pending)
(T00000000/000055555640cc60.0003/----------------) P00000000/000055555640cb80.0004 22:09.27.238 [0000000000000872]   <debug>  [TM] Executing action(N3hpx7actions14result_action0IM18vector_t_componentKFN5boost10shared_ptrIK8vector_tEEvEXadL_ZNKS2_8get_dataEvEENS0_6detail9this_typeEEE) with continuation({0000000100000001, 0000000000911010})
(T00000000/000055555640cc60.0003/----------------) P00000000/000055555640cb80.0004 22:09.27.238 [0000000000000873]    <info> [LCO] typed_continuation<Result>::trigger_value({0000000100000001, 0000000000911010})
(T00000000/000055555640cc60.0003/----------------) P00000000/000055555640cb80.0004 22:09.27.238 [0000000000000874]   <debug>  [AS] cache hit for address {0000000100000001, 0000000000911010}, lva 0x7fffe55ba090 (base {0000000100000001, 0000000000911000}, lva 0x7fffe55ba010)
(T00000000/000055555640cc60.0003/----------------) P00000000/000055555640cb80.0004 22:09.27.238 [0000000000000875]   <debug>  [TM] base_action1::execute_function name(N3hpx7actions14direct_action1IMNS_4lcos19base_lco_with_valueIN5boost10shared_ptrIK8vector_tEES8_EEFvOS8_EXadL_ZNS9_17set_value_nonvirtESA_EENS0_6detail9this_typeEEE) lva(0x7fffc804ff90)
(T00000000/000055555640cc60.0003/----------------) P00000000/000055555640cb80.0004 22:09.27.238 [0000000000000876]    <info>  [TM] set_thread_state: thread(0x55555640cb80), description(N3hpx7actions14result_action2IM18vector_t_componentKFNS_6naming7id_typeEdRKS4_EXadL_ZNKS2_5faxpyEdS6_EENS0_6detail9this_typeEEE), new state(pending), old state(suspended)
(T00000000/----------------.----/----------------) P--------/----------------.---- 22:09.27.238 [0000000000000877]   <debug>  [TM] tfunc(0): thread(0x55555640cc60), description(N3hpx7actions14result_action0IM18vector_t_componentKFN5boost10shared_ptrIK8vector_tEEvEXadL_ZNKS2_8get_dataEvEENS0_6detail9this_typeEEE), new state(terminated), normal
(T00000000/----------------.----/----------------) P--------/----------------.---- 22:09.27.238 [0000000000000878]   <debug>  [TM] tfunc(0): thread(0x55555640caa0), description(N3hpx7actions14result_action2IM18vector_t_componentKFNS_6naming7id_typeEdRKS4_EXadL_ZNKS2_5faxpyEdS6_EENS0_6detail9this_typeEEE), old state(pending)
@hkaiser
Copy link
Member

hkaiser commented Oct 17, 2013

I'm pretty sure this is yet another case related to #588. Does it happen on the fixing_588 branch as well?

@ghost ghost assigned hkaiser Oct 17, 2013
@eschnett
Copy link
Contributor Author

Yes, you are right. It does not happen on the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants