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

Fixed run_as_hpx_thread #2229

Merged
merged 1 commit into from Jun 28, 2016

Conversation

Projects
None yet
2 participants
@hkaiser
Copy link
Member

commented Jun 27, 2016

No description provided.

@hkaiser

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2016

@biddisco This should solve the hangs you're seeing when using this function.

@biddisco

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2016

This does not work for me...

AFAICT condition_variable_any just creates a condition_variable and uses that. Same assertion gets thrown about not an HPX thread. I must be missing something. (I tried commenting out the assertion, but then it just throws in this_thread::suspend because the hpx thread ptr is null

#0  __cxxabiv1::__cxa_throw (obj=0x2aaab2a34ac0, tinfo=0x2aaaad317c90 <typeinfo for hpx::exception>, dest=0x2aaaac0336d0 <hpx::exception::~exception()>)
    at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:62
#1  0x00002aaaac036e4e in hpx::get_exception_ptr (e=...) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:1235
#2  0x00002aaaac030118 in hpx::error_code::error_code (this=0x2aaab27fc5d0, err=25, e=...) at /users/biddisco/src/hvtkm/hpx/src/error_code.cpp:156
#3  0x00002aaaac03379f in hpx::exception::get_error_code (this=0x2aaab27fccc0, mode=hpx::plain) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:153
#4  0x00002aaaac03b03d in hpx::detail::is_of_lightweight_hpx_category (e=...) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:314
#5  0x00002aaaac03b0b0 in hpx::detail::get_exception<hpx::exception> (e=..., func=..., file=..., line=178, auxinfo=...) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:322
#6  0x00002aaaac03b7b3 in hpx::detail::throw_exception<hpx::exception> (e=..., func=..., file=..., line=178) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:383
#7  0x00002aaaac033f2f in hpx::detail::assertion_failed_msg (msg=0x2aaaacd01e58 "threads::get_self_ptr() != nullptr", expr=0x2aaaacd01e58 "threads::get_self_ptr() != nullptr",
    function=0x2aaaacd02420 <hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, char const*, hpx::error_code&)::__PRETTY_FUNCTION__> "hpx::threads::thread_state_ex_enum hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, const char*, hpx::error_code&)",
    file=0x2aaaacd01d98 "/users/biddisco/src/hvtkm/hpx/src/lcos/local/detail/condition_variable.cpp", line=178) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:468
#8  0x00002aaaac033ab3 in hpx::detail::assertion_failed (expr=0x2aaaacd01e58 "threads::get_self_ptr() != nullptr",
    function=0x2aaaacd02420 <hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, char const*, hpx::error_code&)::__PRETTY_FUNCTION__> "hpx::threads::thread_state_ex_enum hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, const char*, hpx::error_code&)",
    file=0x2aaaacd01d98 "/users/biddisco/src/hvtkm/hpx/src/lcos/local/detail/condition_variable.cpp", line=178) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:446
#9  0x00002aaaac036eca in hpx::assertion_failed (expr=0x2aaaacd01e58 "threads::get_self_ptr() != nullptr",
    function=0x2aaaacd02420 <hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, char const*, hpx::error_code&)::__PRETTY_FUNCTION__> "hpx::threads::thread_state_ex_enum hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, const char*, hpx::error_code&)",
    file=0x2aaaacd01d98 "/users/biddisco/src/hvtkm/hpx/src/lcos/local/detail/condition_variable.cpp", line=178) at /users/biddisco/src/hvtkm/hpx/src/exception.cpp:1245
#10 0x00002aaaac970dc0 in hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, char const*, hpx::error_code&) (this=0x2aaab27fcfa8,
    lock=<unknown type in /users/biddisco/build/hvtkm/lib/libhpxd.so.0, CU 0x5848932, DIE 0x586d97b>, description=0x2aaaacb1d0c5 "condition_variable::wait", ec=...)
    at /users/biddisco/src/hvtkm/hpx/src/lcos/local/detail/condition_variable.cpp:178
#11 0x00002aaaac3991ad in hpx::lcos::local::detail::condition_variable::wait(std::unique_lock<hpx::lcos::local::spinlock>&&, hpx::error_code&) (this=0x2aaab27fcfa8,
    lock=<unknown type in /users/biddisco/build/hvtkm/lib/libhpxd.so.0, CU 0x1600ef6, DIE 0x16ddddc>, ec=...)
    at /users/biddisco/src/hvtkm/hpx/hpx/lcos/local/detail/condition_variable.hpp:137
#12 0x00002aaaac39a4d2 in hpx::lcos::local::condition_variable_any::wait<std::unique_lock<hpx::lcos::local::spinlock> > (this=0x2aaab27fcfa0, lock=..., ec=...)
    at /users/biddisco/src/hvtkm/hpx/hpx/lcos/local/condition_variable.hpp:158
#13 0x00002aaaaca0680c in hpx::threads::detail::run_as_hpx_thread<void (*)(hpx::parcelset::policies::verbs::parcelport&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, unsigned long, std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> >&, unsigned long), std::reference_wrapper<hpx::parcelset::policies::verbs::parcelport>, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, int, std::reference_wrapper<std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> > >, int>(std::integral_constant<bool, true>, void (* const&)(hpx::parcelset::policies::verbs::parcelport&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, unsigned long, std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> >&, unsigned long), std::reference_wrapper<hpx::parcelset::policies::verbs::parcelport>&&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >&&, int&&, std::reference_wrapper<std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> > >&&, int&&) (
    f=@0x2aaab27fd858: 0x2aaaaca01a9b <hpx::parcelset::decode_message_with_chunks<hpx::parcelset::policies::verbs::parcelport, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > > >(hpx::parcelset::policies::verbs::parcelport&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, unsigned long, std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> >&, unsigned long)>) at /users/biddisco/src/hvtkm/hpx/hpx/runtime/threads/run_as_hpx_thread.hpp:121
#14 0x00002aaaaca028b8 in hpx::threads::run_as_hpx_thread<void (*)(hpx::parcelset::policies::verbs::parcelport&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, unsigned long, std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> >&, unsigned long), std::reference_wrapper<hpx::parcelset::policies::verbs::parcelport>, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, int, std::reference_wrapper<std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> > >, int>(void (* const&)(hpx::parcelset::policies::verbs::parcelport&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, unsigned long, std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> >&, unsigned long), std::reference_wrapper<hpx::parcelset::policies::verbs::parcelport>&&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >&&, int&&, std::reference_wrapper<std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> > >&&, int&&) (
    f=@0x2aaab27fd858: 0x2aaaaca01a9b <hpx::parcelset::decode_message_with_chunks<hpx::parcelset::policies::verbs::parcelport, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > > >(hpx::parcelset::policies::verbs::parcelport&, hpx::parcelset::parcel_buffer<hpx::util::detail::pinned_memory_vector<char, RdmaMemoryPool>, std::vector<char, std::allocator<char> > >, unsigned long, std::vector<hpx::serialization::serialization_chunk, std::allocator<hpx::serialization::serialization_chunk> >&, unsigned long)>) at /users/biddisco/src/hvtkm/hpx/hpx/runtime/threads/run_as_hpx_thread.hpp:135
#15 0x00002aaaac9f66b8 in hpx::parcelset::policies::verbs::parcelport::handle_recv_completion (this=0x2aaaaf61f800, wr_id=46912576406576, client=0x2aaab2aff0d0)
at /users/biddisco/src/hvtkm/hpx/plugins/parcelport/verbs/parcelport_verbs.cpp:625

@hkaiser hkaiser force-pushed the fixing_run_as_hpx_thread branch from 542d5b3 to 7afd68e Jun 27, 2016

@hkaiser hkaiser force-pushed the fixing_run_as_hpx_thread branch from 7afd68e to 796931e Jun 27, 2016

@hkaiser hkaiser merged commit 73c6b8a into master Jun 28, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@hkaiser hkaiser deleted the fixing_run_as_hpx_thread branch Jun 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.