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

seastar segfaults on Ubuntu 15.10 #81

Closed
shivshankardayal opened this issue Nov 29, 2015 · 5 comments
Closed

seastar segfaults on Ubuntu 15.10 #81

shivshankardayal opened this issue Nov 29, 2015 · 5 comments

Comments

@shivshankardayal
Copy link

I built seastar on Ubuntu 15.10 with DPDK. While the httpd works seastar segfaults when run. I tried both the debug and release builds.

@avikivity
Copy link
Member

Please post a backtrace here.

@shivshankardayal
Copy link
Author

Following is what I get when I use gdb:

(gdb) r
Starting program: /home/shiv/Downloads/seastar/build/debug/apps/seastar/seastar 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee5ff700 (LWP 21564)]
core/reactor.hh:949:13: runtime error: reference binding to null pointer of type 'struct reactor'

Program received signal SIGSEGV, Segmentation fault.
0x0000000000671a81 in std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_bucket_index (this=0xe80, __k=@0x60400000df18: 10, __c=10)
    at /usr/include/c++/5/bits/hashtable.h:621
621           { return __hash_code_base::_M_bucket_index(__k, __c, _M_bucket_count); }
(gdb) bt
#0  0x0000000000671a81 in std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_bucket_index (this=0xe80, __k=@0x60400000df18: 10, __c=10)
    at /usr/include/c++/5/bits/hashtable.h:621
#1  0x0000000000671767 in std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_emplace<std::piecewise_construct_t const&, std::tuple<int>, std::tuple<int, std::function<void ()> > >(std::integral_constant<bool, true>, std::piecewise_construct_t const&, std::tuple<int>&&, std::tuple<int, std::function<void ()> >&&) (this=0xe80) at /usr/include/c++/5/bits/hashtable.h:1539
#2  0x000000000062e1a3 in std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::emplace<std::piecewise_construct_t const&, std::tuple<int>, std::tuple<int, std::function<void ()> > >(std::piecewise_construct_t const&, std::tuple<int>&&, std::tuple<int, std::function<void ()> >&&) (this=0xe80)
    at /usr/include/c++/5/bits/hashtable.h:726
#3  0x0000000000600c0b in std::unordered_map<int, reactor::signals::signal_handler, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, reactor::signals::signal_handler> > >::emplace<std::piecewise_construct_t const&, std::tuple<int>, std::tuple<int, std::function<void ()> > >(std::piecewise_construct_t const&, std::tuple<int>&&, std::tuple<int, std::function<void ()> >&&) (this=0xe80) at /usr/include/c++/5/bits/unordered_map.h:380
#4  0x00000000004198b6 in reactor::signals::handle_signal(int, std::function<void ()>&&) (this=0xe78, signo=10, 
    handler=<unknown type in /home/shiv/Downloads/seastar/build/debug/apps/seastar/seastar, CU 0x3d692, DIE 0x1839c0>) at core/reactor.cc:168
#5  0x00000000004443f2 in thread_pool::thread_pool (this=0x7fffffffd538) at core/reactor.cc:1673
#6  0x000000000041b034 in reactor::reactor (this=0x7fffffffc680) at core/reactor.cc:218
#7  0x0000000000417b54 in main (ac=1, av=0x7fffffffdf98) at apps/seastar/main.cc:27


And if I run debug build then it gives following output:

shiv@freedom:~/Downloads/seastar/build/debug/apps/seastar$ ./seastar 
core/reactor.hh:949:13: runtime error: reference binding to null pointer of type 'struct reactor'
ASAN:SIGSEGV
=================================================================
==21569==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000e88 (pc 0x000000671a81 bp 0x7ffda1df17b0 sp 0x7ffda1df1780 T0)
    #0 0x671a80 in std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_bucket_index(int const&, unsigned long) const (/home/shiv/Downloads/seastar/build/debug/apps/seastar/seastar+0x671a80)
    #1 0x671766 in std::pair<std::__detail::_Node_iterator<std::pair<int const, reactor::signals::signal_handler>, false, false>, bool> std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_emplace<std::piecewise_construct_t const&, std::tuple<int>, std::tuple<int, std::function<void ()> > >(std::integral_constant<bool, true>, std::piecewise_construct_t const&, std::tuple<int>&&, std::tuple<int, std::function<void ()> >&&) (/home/shiv/Downloads/seastar/build/debug/apps/seastar/seastar+0x671766)
    #2 0x62e1a2 in std::pair<std::__detail::_Node_iterator<std::pair<int const, reactor::signals::signal_handler>, false, false>, bool> std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::emplace<std::piecewise_construct_t const&, std::tuple<int>, std::tuple<int, std::function<void ()> > >(std::piecewise_construct_t const&, std::tuple<int>&&, std::tuple<int, std::function<void ()> >&&) (/home/shiv/Downloads/seastar/build/debug/apps/seastar/seastar+0x62e1a2)
    #3 0x600c0a in std::pair<std::__detail::_Node_iterator<std::pair<int const, reactor::signals::signal_handler>, false, false>, bool> std::unordered_map<int, reactor::signals::signal_handler, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, reactor::signals::signal_handler> > >::emplace<std::piecewise_construct_t const&, std::tuple<int>, std::tuple<int, std::function<void ()> > >(std::piecewise_construct_t const&, std::tuple<int>&&, std::tuple<int, std::function<void ()> >&&) (/home/shiv/Downloads/seastar/build/debug/apps/seastar/seastar+0x600c0a)
    #4 0x4198b5 in reactor::signals::handle_signal(int, std::function<void ()>&&) core/reactor.cc:168
    #5 0x4443f1 in thread_pool::thread_pool() core/reactor.cc:1673
    #6 0x41b033 in reactor::reactor() core/reactor.cc:218
    #7 0x417b53 in main apps/seastar/main.cc:27
    #8 0x7f89d35bfa3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
    #9 0x4179d8 in _start (/home/shiv/Downloads/seastar/build/debug/apps/seastar/seastar+0x4179d8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ??:0 std::_Hashtable<int, std::pair<int const, reactor::signals::signal_handler>, std::allocator<std::pair<int const, reactor::signals::signal_handler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_bucket_index(int const&, unsigned long) const
==21569==ABORTING

The binary is build on Ubuntu 15.10 with DPDK. I have used gcc 5.2.1. If you need any other information I will be happy to provide that.

@avikivity
Copy link
Member

apps/seastar/main.cc is outdated (and does nothing anyway). Try building build/release/apps/httpd/httpd or another application.

@nyh
Copy link
Contributor

nyh commented Dec 21, 2015

On Mon, Dec 21, 2015 at 3:05 PM, Avi Kivity [email protected]
wrote:

apps/seastar/main.cc is outdated (and does nothing anyway).

So it should be deleted :-)

@shivshankardayal
Copy link
Author

Thanks for confirming. httpd is working fine else I would have reported. :)

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

3 participants