Assertion failed: options.recv_identity (socket_base.cpp:864)
Description
Environment
Linux, Debian unstable
Activity
Show:

Martin Hurton June 9, 2012 at 2:38 PM
Resolved by 796212a985964162a284cc667ab09834ce681466

Martin Sustrik January 6, 2012 at 12:21 AM
Basically a duplicate of LIBZMQ-308. The problem is caused by wire-level incompatibility in PUB/SUB protocol between version 2.1 and 3.1 (subscription forwarding added).

i have a test case where a subscriber binds to a socket and a publisher connects to it. this works fine if both the publisher and subscriber are both compiled and linked against libzmq 2, or both compiled and linked against libzmq 3, but fails in the case of a v2 publisher and a v3 subscriber or in the case of a v3 publisher and a v2 subscriber.
this is the v2 publisher, v3 subscriber case.
$ ./compile
+ CFLAGS='-Wall -O0 -ggdb'
+ gcc -include /usr/include/zmq.h -Wall -O0 -ggdb -o pub2 pub.c -lzmq
+ gcc -include /usr/include/zmq.h -Wall -O0 -ggdb -o sub2 sub.c -lzmq
+ gcc -include /usr/local/include/zmq.h -Wall -O0 -ggdb -o pub3 pub.c -L/usr/local/lib -lzmq
+ gcc -include /usr/local/include/zmq.h -Wall -O0 -ggdb -o sub3 sub.c -L/usr/local/lib -lzmq
$ ./pub2 ipc://testcase.ipc
publisher: zeromq version 2.1.10
./pub2: connecting to socket ipc://testcase.ipc
^Z
zsh: suspended ./pub2 ipc://testcase.ipc
$ bg
[1] + continued ./pub2 ipc://testcase.ipc
$ ./sub3 ipc://testcase.ipc
subscriber: zeromq version 3.1.1
./sub3: binding to socket ipc://testcase.ipc
Assertion failed: options.recv_identity (socket_base.cpp:864)
zsh: abort ./sub3 ipc://testcase.ipc
$