[zeromq-dev] pure virtual method called

Steven McCoy steven.mccoy at miru.hk
Fri Oct 15 17:36:32 CEST 2010


On 15 October 2010 23:23, Toralf Wittner <toralf.wittner at gmail.com> wrote:

> On Thu, Oct 14, 2010 at 2:05 PM, Martin Sustrik <sustrik at moloch.sk> wrote:
> > On 10/14/2010 01:01 PM, ntupel at googlemail.com wrote:
> >>
> >> Same as before:
> >>
> >> (gdb) run epgm://eth1\;231.192.0.1:9999 255 10000
> >> Starting program: /tmp/workspaces/zeromq2/perf/.libs/lt-remote_thr
> >> epgm://eth1\;231.192.0.1:9999 255 10000
> >> [Thread debugging using libthread_db enabled]
> >> [New Thread 0x7ffff681f710 (LWP 8991)]
> >> pure virtual method called
> >> terminate called without an active exception
> >>
> >> Program received signal SIGABRT, Aborted.
> >> [Switching to Thread 0x7ffff681f710 (LWP 8991)]
> >> 0x00007ffff6a5f595 in raise () from /lib/libc.so.6
> >> (gdb) bt
> >> #0  0x00007ffff6a5f595 in raise () from /lib/libc.so.6
> >> #1  0x00007ffff6a60a16 in abort () from /lib/libc.so.6
> >> #2  0x00007ffff72e0ded in __gnu_cxx::__verbose_terminate_handler() ()
> >> from /usr/lib/libstdc++.so.6
> >> #3  0x00007ffff72df006 in ?? () from /usr/lib/libstdc++.so.6
> >> #4  0x00007ffff72df033 in std::terminate() () from
> /usr/lib/libstdc++.so.6
> >> #5  0x00007ffff72df98f in __cxa_pure_virtual () from
> /usr/lib/libstdc++.so.6
> >> #6  0x00007ffff7b84841 in zmq::poller_base_t::execute_timers
> >> (this=0x602180) at poller_base.cpp:88
> >> #7  0x00007ffff7b7a948 in zmq::epoll_t::loop (this=0x602180) at
> epoll.cpp:137
> >> #8  0x00007ffff7b8c347 in zmq::thread_t::thread_routine
> >> (arg_=0x6021e8) at thread.cpp:79
> >> #9  0x00007ffff7532cb0 in start_thread () from /lib/libpthread.so.0
> >> #10 0x00007ffff6afb9fd in clone () from /lib/libc.so.6
> >> #11 0x0000000000000000 in ?? ()
> > I have no idea how it can happen after the patch is applied. Do you have
> > a simple test program that reproduces the problem?
>
> pgm_sender_t::unplug() cancels timers only if the corresponding
> has_rx_timer or has_tx_timer flags have been set. So what may happen
> is that even after unplug() there may still be timers registered at
> poller_base_t.  And since pgm_sender_t::terminate() calls "delete
> this" after unplug(), behaviour is undefined if
> pgm_sender_t::timer_event(int token) is invoked again. (Here it seems
> that the pure virtual base class methods are invoked instead. Could as
> well be a segmentation fault I guess.). Likely this happens because in
> void zmq::pgm_sender_t::out_event() rx_timer_id is reset. I think it
> should be tx_timer_id instead, or?
>
>
Yup, looks like another brainfart / typo on my side.  Thanks.

-- 
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101015/9836521d/attachment.htm>


More information about the zeromq-dev mailing list