Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-2344

segfaults running make check from ev integration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.22.0
    • libprocess
    • None

    Description

      Running make check on Ubuntu under gdb, I've seen a number of segfaults from the process::EventLoop. Stack traces and debugging sessions below:

      (gdb) bt
      #0  0x0000000000789c71 in std::move<std::_Tuple_impl<2ul>&> (__t=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/move.h:102
      #1  0x00007ffff6821148 in std::_Tuple_impl<1, void (*)()>::_Tuple_impl(<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f7273>) (
          this=0x7fffe00228d8, __in=<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f7273>)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/tuple:270
      #2  0x00007ffff68210a4 in std::_Tuple_impl<0, Duration, void (*)()>::_Tuple_impl(<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f71f7>) (this=0x7fffe00228d8, __in=<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f71f7>)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/tuple:271
      #3  0x00007ffff6821068 in std::tuple<Duration, void (*)()>::tuple(<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f71c4>) (
          this=0x7fffe00228d8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/tuple:542
      #4  0x00007ffff6821014 in std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(const Duration &, void (*)())>::_Bind(<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f718d>) (this=0x7fffe00228d0, __b=<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f718d>)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1342
      #5  0x00007ffff6820f86 in std::_Function_base::_Base_manager<std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(Duration const&, void (*)())> >::_M_init_functor(std::_Any_data&, std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(Duration const&, void (*)())>&&, std::integral_constant<bool, false>) (__functor=..., __f=<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f714b>)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1987
      #6  0x00007ffff6820ab0 in std::_Function_base::_Base_manager<std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(Duration const&, void (*)())> >::_M_init_functor(std::_Any_data&, std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(Duration const&, void (*)())>&&) (__functor=..., 
          __f=<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x27e516d, DIE 0x27f7115>)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1958
      #7  0x00007ffff68208e6 in std::function<process::Future<Nothing> ()>::function<std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(const Duration &, void (*)())>, void>(std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(const Duration &, void (*)())>) (this=0x7fffe85ca9d0, __f=...)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2451
      #8  0x00007ffff681fe55 in process::EventLoop::delay (duration=..., function=0x7ffff6729580 <process::tick()>) at ../../../3rdparty/libprocess/src/libev.cpp:98
      #9  0x00007ffff672a151 in process::tick () at ../../../3rdparty/libprocess/src/clock.cpp:125
      #10 0x00007ffff681fcb2 in process::internal::handle_delay (loop=0x7ffff7dd91f0 <default_loop_struct>, timer=0x7fffe00279b0, revents=256)
          at ../../../3rdparty/libprocess/src/libev.cpp:64
      #11 0x00007ffff685f8c5 in ev_invoke_pending (loop=0x7ffff7dd91f0 <default_loop_struct>) at ev.c:2994
      #12 0x00007ffff6860803 in ev_run (loop=0x7ffff7dd91f0 <default_loop_struct>, flags=<optimized out>) at ev.c:3394
      #13 0x00007ffff681fffb in ev_loop (loop=0x7ffff7dd91f0 <default_loop_struct>, flags=0) at 3rdparty/libev-4.15/ev.h:826
      #14 0x00007ffff681ff49 in process::EventLoop::run () at ../../../3rdparty/libprocess/src/libev.cpp:114
      #15 0x00007ffff21d2182 in start_thread (arg=0x7fffe85cb700) at pthread_create.c:312
      #16 0x00007ffff1eff00d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      (gdb) frame 8
      #8  0x00007ffff681fe55 in process::EventLoop::delay (duration=..., function=0x7ffff6729580 <process::tick()>) at ../../../3rdparty/libprocess/src/libev.cpp:98
      98        run_in_event_loop<Nothing>(
      (gdb) list
      93      } // namespace internal {
      94
      95
      96      void EventLoop::delay(const Duration& duration, void(*function)(void))
      97      {
      98        run_in_event_loop<Nothing>(
      99            lambda::bind(&internal::delay, duration, function));
      100     }
      101
      102
      (gdb) p duration
      $1 = (const Duration &) @0x7fffe000da90: {static NANOSECONDS = 1, static MICROSECONDS = 1000, static MILLISECONDS = 1000000, static SECONDS = 1000000000, 
        static MINUTES = 60000000000, static HOURS = 3600000000000, static DAYS = 86400000000000, static WEEKS = 604800000000000, nanos = 91569920}
      (gdb) p function
      $2 = (void (*)(void)) 0x7ffff6729580 <process::tick()>
      
      (gdb) bt
      #0  std::map<std::string, process::ProcessBase*, std::less<std::string>, std::allocator<std::pair<std::string const, process::ProcessBase*> > >::end (
          this=0x7fffe0022620) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_map.h:339
      #1  0x00007ffff67c29dc in std::map<std::string, process::ProcessBase*, std::less<std::string>, std::allocator<std::pair<std::string const, process::ProcessBase*> > >::operator[] (this=0x32f6478, __k=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_map.h:463
      #2  0x00007ffff67a476a in process::ProcessManager::use (this=0x32f6470, pid=...) at ../../../3rdparty/libprocess/src/process.cpp:1944
      #3  0x00007ffff67b1288 in process::ProcessManager::deliver (this=0x32f6470, to=..., event=0x7fffe00155c0, sender=0x0)
          at ../../../3rdparty/libprocess/src/process.cpp:2113
      #4  0x00007ffff67b5a0f in process::internal::dispatch(process::UPID const&, std::shared_ptr<std::function<void (process::ProcessBase*)> > const&, Option<std::type_info const*> const&) (pid=..., f=..., functionType=...) at ../../../3rdparty/libprocess/src/process.cpp:3032
      #5  0x00007ffff681ab72 in process::dispatch<process::ReaperProcess> (pid=..., 
          method=(void (process::ReaperProcess::*)(process::ReaperProcess * const)) 0x7ffff6819800 <process::ReaperProcess::wait()>)
          at ../../../3rdparty/libprocess/include/process/c++11/dispatch.hpp:81
      #6  0x00007ffff681aa9f in operator() (this=0x7fffe0022620) at ../../../3rdparty/libprocess/include/process/c++11/delay.hpp:24
      #7  0x00007ffff681a82d in std::_Function_handler<void (), process::Timer process::delay<process::ReaperProcess>(Duration const&, process::PID<process::ReaperProcess> const&, void (process::ReaperProcess::*)())::{lambda()#1}>::_M_invoke(std::_Any_data const&) (__functor=...)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2071
      #8  0x000000000078114e in std::function<void ()>::operator()() const (this=0x7fffe0015c80)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2464
      #9  0x00007ffff67b7e2c in process::Timer::operator() (this=0x7fffe0015c60) at ../../../3rdparty/libprocess/include/process/timer.hpp:30
      #10 0x00007ffff67a462d in process::timedout (timers=...) at ../../../3rdparty/libprocess/src/process.cpp:676
      #11 0x00007ffff67f54c3 in std::_Bind<void (*(std::_Placeholder<1>))(std::list<process::Timer, std::allocator<process::Timer> > const&)>::__call<void, std::list<process::Timer, std::allocator<process::Timer> > const&, 0ul>(std::tuple<std::list<process::Timer, std::allocator<process::Timer> > const&>&&, std::_Index_tuple<0ul>) (this=0x32f7870, __args=<unknown type in build/src/.libs/libmesos-0.22.0.so, CU 0x262cc71, DIE 0x26f28e2>)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1295
      #12 0x00007ffff67f546d in std::_Bind<void (*(std::_Placeholder<1>))(std::list<process::Timer, std::allocator<process::Timer> > const&)>::operator()<std::list<process::Timer, std::allocator<process::Timer> > const&, void>(std::list<process::Timer, std::allocator<process::Timer> > const&) (this=0x32f7870, __args=...)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1353
      #13 0x00007ffff67f5222 in std::_Function_handler<void (std::list<process::Timer, std::allocator<process::Timer> > const&), std::_Bind<void (*(std::_Placeholder<1>))(std::list<process::Timer, std::allocator<process::Timer> > const&)> >::_M_invoke(std::_Any_data const&, std::list<process::Timer, std::allocator<process::Timer> > const&) (__functor=..., __args=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2071
      #14 0x00007ffff6737c38 in std::function<void (std::list<process::Timer, std::allocator<process::Timer> > const&)>::operator()(std::list<process::Timer, std::allocator<process::Timer> > const&) const (this=0x7ffff7dc86b0 <process::clock::callback>, __args=...)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2464
      #15 0x00007ffff67347cb in process::tick () at ../../../3rdparty/libprocess/src/clock.cpp:129
      #16 0x00007ffff682a2d2 in process::internal::handle_delay (loop=0x7ffff7dd91a0 <default_loop_struct>, timer=0x7fffe0015580, revents=256)
          at ../../../3rdparty/libprocess/src/libev.cpp:64
      #17 0x00007ffff6869ee5 in ev_invoke_pending (loop=0x7ffff7dd91a0 <default_loop_struct>) at ev.c:2994
      #18 0x00007ffff686ae23 in ev_run (loop=0x7ffff7dd91a0 <default_loop_struct>, flags=<optimized out>) at ev.c:3394
      #19 0x00007ffff682a61b in ev_loop (loop=0x7ffff7dd91a0 <default_loop_struct>, flags=0) at 3rdparty/libev-4.15/ev.h:826
      #20 0x00007ffff682a569 in process::EventLoop::run () at ../../../3rdparty/libprocess/src/libev.cpp:114
      #21 0x00007ffff2205182 in start_thread (arg=0x7fffe85fe700) at pthread_create.c:312
      #22 0x00007ffff1f3200d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      (gdb) frame 2
      #2  0x00007ffff67a476a in process::ProcessManager::use (this=0x32f6470, pid=...) at ../../../3rdparty/libprocess/src/process.cpp:1944
      1944            return ProcessReference(processes[pid.id]);
      (gdb) p pid.id
      $3 = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
          _M_p = 0x7fffcc008768 "reaper(1)"}}
      
      (gdb) bt
      #0  std::_Any_data::_M_access (this=0x7fffe85fd9d0) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1799
      #1  0x00007ffff682b345 in std::_Any_data::_M_access<std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(Duration const&, void (*)())>*>() const (
          this=0x7fffe85fd9d0) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1809
      #2  0x00007ffff682b225 in std::_Function_base::_Base_manager<std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(Duration const&, void (*)())> >::_M_get_pointer(std::_Any_data const&) (__source=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1893
      #3  0x00007ffff682b133 in std::_Function_handler<process::Future<Nothing> (), std::_Bind<process::Future<Nothing> (*(Duration, void (*)()))(Duration const&, void (*)())> >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2056
      #4  0x00007ffff5e0068d in std::function<process::Future<Nothing> ()>::operator()() const (this=0x7fffe85fd9d0)
          at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2464
      #5  0x00007ffff682ac21 in process::run_in_event_loop<Nothing>(std::function<process::Future<Nothing> ()> const&) (f=...)
          at ../../../3rdparty/libprocess/src/libev.hpp:67
      #6  0x00007ffff682a4a2 in process::EventLoop::delay (duration=..., function=0x7ffff6733ba0 <process::tick()>) at ../../../3rdparty/libprocess/src/libev.cpp:98
      #7  0x00007ffff6734771 in process::tick () at ../../../3rdparty/libprocess/src/clock.cpp:125
      #8  0x00007ffff682a2f2 in process::internal::handle_delay (loop=0x7ffff7dd91a0 <default_loop_struct>, timer=0x7fffe0015f70, revents=256)
          at ../../../3rdparty/libprocess/src/libev.cpp:64
      #9  0x00007ffff6869f05 in ev_invoke_pending (loop=0x7ffff7dd91a0 <default_loop_struct>) at ev.c:2994
      #10 0x00007ffff686ae43 in ev_run (loop=0x7ffff7dd91a0 <default_loop_struct>, flags=<optimized out>) at ev.c:3394
      #11 0x00007ffff682a63b in ev_loop (loop=0x7ffff7dd91a0 <default_loop_struct>, flags=0) at 3rdparty/libev-4.15/ev.h:826
      #12 0x00007ffff682a589 in process::EventLoop::run () at ../../../3rdparty/libprocess/src/libev.cpp:114
      #13 0x00007ffff2205182 in start_thread (arg=0x7fffe85fe700) at pthread_create.c:312
      #14 0x00007ffff1f3200d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Issue Links

          Activity

            People

              dhamon Dominic Hamon
              dhamon Dominic Hamon
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: