Skip to content

Commit

Permalink
core: destroy network stack before destroying timer lists.
Browse files Browse the repository at this point in the history
Fixes assert failure during ^C:
   #0  0x0000003e134348c7 in raise () from /lib64/libc.so.6
   #1  0x0000003e1343652a in abort () from /lib64/libc.so.6
   #2  0x0000003e1342d46d in __assert_fail_base () from /lib64/libc.so.6
   #3  0x0000003e1342d522 in __assert_fail () from /lib64/libc.so.6
   #4  0x0000000000409a7c in boost::intrusive::list_impl<boost::intrusive::mhtraits<timer, boost::intrusive::list_
        at /usr/include/boost/intrusive/list.hpp:1263
   #5  0x00000000004881cc in iterator_to (this=<optimized out>, value=...) at core/timer-set.hh:71
   #6  reactor::del_timer (this=<optimized out>, tmr=tmr@entry=0x60000005cda8) at core/reactor.cc:287
   #7  0x00000000004682a5 in ~timer (this=0x60000005cda8, __in_chrg=<optimized out>) at ./core/reactor.hh:974
   #8  ~resolution (this=0x60000005cd90, __in_chrg=<optimized out>) at net/arp.hh:86
   #9  ~pair (this=0x60000005cd88, __in_chrg=<optimized out>) at /usr/include/c++/4.9.2/bits/stl_pair.h:96
  • Loading branch information
tgrabiec authored and avikivity committed Nov 11, 2014
1 parent 0ccb83b commit 3aa5cf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/reactor.hh
Expand Up @@ -416,13 +416,13 @@ class reactor {
unsigned _id = 0;
bool _stopped = false;
bool _handle_sigint = true;
timer_set<timer, &timer::_link, clock_type> _timers;
timer_set<timer, &timer::_link, clock_type>::timer_list_t _expired_timers;
std::unique_ptr<network_stack> _network_stack;
int _return = 0;
std::unordered_map<int, signal_handler> _signal_handlers;
promise<> _start_promise;
uint64_t _timers_completed;
timer_set<timer, &timer::_link, clock_type> _timers;
timer_set<timer, &timer::_link, clock_type>::timer_list_t _expired_timers;
file_desc _epollfd;
readable_eventfd _io_eventfd;
io_context_t _io_context;
Expand Down

0 comments on commit 3aa5cf1

Please sign in to comment.