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

Bug in 9592f5c0bc29806fce0dbe73f35b6ca7e027edcb causes immediate crash in Octo-tiger #2426

Closed
dmarce1 opened this issue Dec 13, 2016 · 5 comments

Comments

@dmarce1
Copy link
Member

dmarce1 commented Dec 13, 2016

When I use 9592f5c on the main branch - or the commit immediately following it, I get "terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorhpx::exception >'
what(): the runtime system has not been initialized yet: HPX(invalid_status)"

This is with Octo-Tiger HPX running on my x86 laptop.

The stack trace from gdb is:

#0  0x00007ffff53a2428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff53a402a in __GI_abort () at abort.c:89
#2  0x00007ffff5ce484d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff5ce26b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff5ce2701 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff5ce2919 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff7184447 in boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<hpx::exception> >::rethrow() const () from /usr/local/packages/hpx/lib/libhpx.so.1
#7  0x00007ffff70efbfd in boost::rethrow_exception(boost::exception_ptr const&) () from /usr/local/packages/hpx/lib/libhpx.so.1
#8  0x00007ffff71b081c in void hpx::detail::throw_exception<hpx::exception>(hpx::exception const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long) () from /usr/local/packages/hpx/lib/libhpx.so.1
#9  0x00007ffff717acee in hpx::detail::throw_exception(hpx::error, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long) () from /usr/local/packages/hpx/lib/libhpx.so.1
#10 0x00007ffff716d6ef in hpx::get_os_thread_count() () from /usr/local/packages/hpx/lib/libhpx.so.1
#11 0x000000000084fbd6 in hpx::parallel::v1::parallel_execution_policy::parallel_execution_policy (this=0xe54da0 <hpx::parallel::v1::par>)
    at /usr/local/packages/hpx/include/hpx/parallel/executors/parallel_executor.hpp:51
#12 __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /usr/local/packages/hpx/include/hpx/parallel/execution_policy.hpp:1012
#13 _GLOBAL__sub_I__Z17find_eigenvectorsPA3_dS0_Pd () at /home/dminacore/workspace/octotiger/src/grid_fmm.cpp:1330
#14 0x0000000000b47e0d in __libc_csu_init ()
#15 0x00007ffff538d7bf in __libc_start_main (main=0x854a40 <main>, argc=7, argv=0x7fffffffdd88, init=0xb47dc0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd78)
    at ../csu/libc-start.c:247
#16 0x0000000000854f29 in _start ()
@chinz07
Copy link
Contributor

chinz07 commented Dec 13, 2016

I am observing the same issue with my code.

9592f5c adds a call of hpx::get_os_thread_count to the constructor of parallel_executor which is executed to initialize the default parallel execution policy object par in execution_policy.hpp. Since the initialization of par is run during static initialization, the runtime is not up at this point and the call fails.

As a quick workaround, you could revert the default argument for the tasks parameter to 128.

@hkaiser
Copy link
Member

hkaiser commented Dec 13, 2016

@gentryx this is exactly the problem you were reporting today.

@dmarce1, @chinz07: I think it should be fixed now.

@gentryx
Copy link
Member

gentryx commented Dec 14, 2016

@hkaiser: correct, but there's something else that is broken. I'm still investigating that.

@gentryx
Copy link
Member

gentryx commented Dec 14, 2016

@hkaiser: Nevermind, mistake on my side. It's all green for me again. Thanks!

@hkaiser hkaiser closed this as completed Dec 14, 2016
@chinz07
Copy link
Contributor

chinz07 commented Dec 14, 2016

@hkaiser: Thanks for the quick fix.

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

4 participants