pgm and epgm on Centos is getting Assertion failed: res != NULL (pgm_socket.cpp:136)

Description

None

Environment

I get the assert failed when running the following client and server. Any help will be appreciated. I tried the latest version from the repository also.

Client-
#include <stdio.h>
#include <zmq.hpp>
int main(int argc, char* argv[]) {
try {
zmq::context_t ctx(1);
zmq::socket_t s(ctx,ZMQ_SUB);
s.setsockopt(ZMQ_SUBSCRIBE,"",0);
s.connect("epgm://eth0;239.192.1.1:5555");
s.connect("epgm://eth0;239.192.1.1:5556");
zmq::message_t res;
int i = 100;
while(i>0) {
s.recv(&res);
const char *resultset_string = (const char *)res.data ();
printf ("Received response: '%s'\n", resultset_string);
}
i--;
}
catch(std::exception &e) {
printf ("An error occurred: %s\n", e.what());
return 1;
}
return 0;
}

Server-
#include <stdio.h>
#include <zmq.hpp>
#include <stdint.h>

int main(int argc, char* argv[]) {
try {
zmq::context_t ctx(1);
zmq::socket_t s1(ctx,ZMQ_PUB);
zmq::socket_t s2(ctx,ZMQ_PUB);
int rate = 10000;
s1.setsockopt (ZMQ_RATE, &rate, sizeof (rate));
s2.setsockopt (ZMQ_RATE, &rate, sizeof (rate));
s1.connect ("epgm://eth0;239.192.1.1:5555");
s2.connect ("epgm://eth0;239.192.1.1:5556");
for (int i = 0;i<10;i++) {
zmq::message_t msg (10);
memcpy (msg.data (), "xy.z\x00" "ABCDE", 10);
s1.send (msg);
zmq::message_t msg2 (10);
memcpy (msg2.data (), "XY.X\x00" "123123", 10);
s2.send (msg2);
}
}
catch(std::exception &e) {
printf ("An error occurred: %s\n", e.what());
return 1;
}
return 0;
}

[nsharma@localhost ~]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure
Thread model: posix
gcc version 4.7.0 (GCC)

[root@localhost ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0C:29:9E:C2:6D
inet addr:192.168.22.128 Bcast:192.168.22.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe9e:c26d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:53036 errors:0 dropped:0 overruns:0 frame:0
TX packets:40186 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44717014 (42.6 MiB) TX bytes:5186596 (4.9 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1
RX packets:114234 errors:0 dropped:0 overruns:0 frame:0
TX packets:114234 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7151188 (6.8 MiB) TX bytes:7151188 (6.8 MiB)

pan0 Link encap:Ethernet HWaddr 16:EF:AF:7C:00E
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-279.1.1.el6.x86_64 #1 SMP Tue Jul 10 13:47:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Status

Assignee

Ian Barber

Reporter

NavnidhiS

Labels

None

Components

Affects versions

Priority

Major
Configure