Boost logo

Boost :

Subject: [boost] [asio] need help with timer crash please
From: bnv_at_[hidden]
Date: 2009-03-26 09:54:18


I'm seeing two distinct crashes (gdb output below) on expiration of a
deadline timer, and could use some help identifying possible reasons.

The timer has not been deleted. The timer expired once before and was later
rescheduled using expires_from_now() and async_wait(). The timer is only
accessed by threads in io_service::run(), and is protected by a mutex.

Form the gdb output, I'm guessing the timer is being removed on expiration
and the internal structures have somehow been trashed. Any pointers to
possible explanations would be appreciated.

crash 1...

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 3500.0x83c]
0x5ae9a800 in ?? ()
(gdb) bt full
#0 0x5ae9a800 in ?? ()
No symbol table info available.
#1 0x005ae5f7 in
boost::asio::detail::timer_queue<boost::asio::time_traits<boos
t::posix_time::ptime> >::complete_timers (this=0x5387f74)
    at /usr/local/include/boost-1_38/boost/asio/detail/timer_queue.hpp:205
        this = (
    timer_queue<boost::asio::time_traits<boost::posix_time::ptime> > *
const) 0x
5387f74
        this_timer = (
    timer_queue<boost::asio::time_traits<boost::posix_time::ptime>
>::timer_base
 *) 0x53a4faf
#2 0x053a4fb7 in ?? ()
No symbol table info available.
#3 0x1dcdcb20 in ?? ()
No symbol table info available.
#4 0x005bf1c0 in
boost::asio::detail::select_reactor<false>::complete_operation
s_and_timers (this=0x658, lock=@0x1dcd9498)
    at /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_vector.h:462
        this = (class select_reactor< false> * const) 0x658
        this = (scoped_lock<boost::asio::detail::posix_mutex> * const) 0xa
        i = 500011328
#5 0x00000000 in ?? ()
No symbol table info available.
(gdb)

crash 2...

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 1320.0xa08]
0x005adff1 in
boost::asio::detail::timer_queue<boost::asio::time_traits<boost::p
osix_time::ptime> >::remove_timer (this=0x5387f74, t=0x53aac70)
    at /usr/local/include/boost-1_38/boost/asio/detail/timer_queue.hpp:399
399 t->prev_->next_ = t->next_;
(gdb) bt full
#0 0x005adff1 in
boost::asio::detail::timer_queue<boost::asio::time_traits<boos
t::posix_time::ptime> >::remove_timer (this=0x5387f74, t=0x53aac70)
    at /usr/local/include/boost-1_38/boost/asio/detail/timer_queue.hpp:399
        this = (
    timer_queue<boost::asio::time_traits<boost::posix_time::ptime> > *
const) 0x
5387f74
        index = 87735592
        it = {_M_node = 0x53aad20}
#1 0x00000002 in ?? ()
No symbol table info available.
#2 0x00000000 in ?? ()
No symbol table info available.
(gdb)

Thanks,
Brian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk