[zeromq-dev] pure virtual method called

ntupel at googlemail.com ntupel at googlemail.com
Thu Oct 14 14:14:02 CEST 2010


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?

I use perf/remote_thr.cpp with this change:

diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp
index 3295f2e..a8fe4da 100644
--- a/perf/remote_thr.cpp
+++ b/perf/remote_thr.cpp
@@ -55,6 +55,14 @@ int main (int argc, char *argv [])
         return -1;
     }

+    int64_t j = 8000;
+
+    rc = zmq_setsockopt (s, ZMQ_RATE, &j, sizeof(j));
+    if (rc != 0) {
+        printf ("error in zmq_setsockopt: %s\n", zmq_strerror (errno));
+        return -1;
+    }
+
     //  Add your socket options here.
     //  For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.

and execute it like this:

./remote_thr epgm://eth1\;231.192.0.1:9999 255 10000

-nt



More information about the zeromq-dev mailing list