Hi, Sorry for the slow response.
So there are some problems with your test case. - zmq_send in ZMQ/2.x sends a zmq_msg_t structure, not a memory buffer - the ROUTER socket will return an identity blob as first part; you cannot print this as a string When I fix these problems and run the test case, it crashes as follows: Assertion failed: buffer_size == header_size (stream_engine.cpp:484) Which is issue 569, https://zeromq.jira.com/browse/LIBZMQ-569. I'll cut a new stable release with this fix. In the mean time you can build the stable version from https://github.com/zeromq/zeromq4-x -Pieter On Fri, Nov 22, 2013 at 4:05 PM, 舒友村 <[email protected]> wrote: > Hi , The following is my test case. > The peer installed zeromq2.2: > int main (void) > { > // Socket to talk to clients > void *context = zmq_init (1); > void *responder = zmq_socket (context, ZMQ_DEALER); > int rc = zmq_connect (responder, "tcp://10.10.19.154:5555"); > assert (rc == 0); > > char buffer [10]; > zmq_send(responder, "hello", 0); > sleep(10); > return 0; > } > > The peer installed zeromq4.0.1 > int main (void) > { > void *context = zmq_init(1); > void *responder = zmq_socket (context, ZMQ_ROUTER); > int rc = zmq_bind (responder, "tcp://*:5555"); > assert (rc == 0); > > while (1) { > char buffer [10]; > memset(buffer, 0, 10); > zmq_recv (responder, buffer,10, 0); > printf ("%s\n", buffer); > sleep (1); // Do some 'work' > } > return 0; > } > when connecting ,the crash happened in the peer which installed > zeromq4.0.1..Just like the following. > Assertion failed: buffer_size == header_size (stream_engine.cpp:485) > Aborted > Thanks... > > > On Fri, Nov 22, 2013 at 8:12 PM, Pieter Hintjens <[email protected]> wrote: >> >> OK, can you show us some very simple code that causes the problem for >> you? Then I'll test this on various versions of ZMQ. >> >> On Fri, Nov 22, 2013 at 3:55 AM, 舒友村 <[email protected]> wrote: >> > Hi, Sorry, I donot understand "test off libzmq master" clearly. I have >> > do >> > the test: used zeromq3.2.4 as the ROUTER peer, it doest crash when >> > DEALER >> > peer connect to ROUTER peer, but the ROUTER socket receive nothing from >> > DEALER peer when use zmq_send() to send messages. Does not the >> > zeromq3.2.4 >> > support to communicate wtih zeromq2.2? Thanks.. >> > >> > >> > On Thu, Nov 21, 2013 at 11:36 PM, Pieter Hintjens <[email protected]> wrote: >> >> >> >> There was a bug in ZeroMQ 4.0.1 which might be causing this. Could you >> >> test off libzmq master and tell us if it still crashes? >> >> >> >> On Thu, Nov 21, 2013 at 4:31 PM, 舒友村 <[email protected]> wrote: >> >> > HI, I used the DEALER and ROUTER sockets. when the DEALER socket >> >> > (zeromq2.2 >> >> > )connect to ROUTER(zeromq4.0.1), the abort happened in handshake when >> >> > connecting.I donot know whether it is not support this usage.Thanks.. >> >> > >> >> > >> >> > On Thu, Nov 21, 2013 at 6:48 PM, Pieter Hintjens <[email protected]> >> >> > wrote: >> >> >> >> >> >> Hi, what socket types are you using on each side? >> >> >> >> >> >> -Pieter >> >> >> _______________________________________________ >> >> >> zeromq-dev mailing list >> >> >> [email protected] >> >> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > >> >> > >> >> > >> >> > >> >> > -- >> >> > >> >> > best! >> >> > >> >> > >> >> > >> >> > 舒友村 >> >> > >> >> > _______________________________________________ >> >> > zeromq-dev mailing list >> >> > [email protected] >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > >> >> >> >> >> >> >> >> -- >> >> - >> >> Pieter Hintjens >> >> CEO of iMatix.com >> >> Founder of ZeroMQ community >> >> blog: http://hintjens.com >> >> _______________________________________________ >> >> zeromq-dev mailing list >> >> [email protected] >> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> > >> > >> > >> > -- >> > >> > best! >> > >> > >> > >> > 舒友村 >> > >> > _______________________________________________ >> > zeromq-dev mailing list >> > [email protected] >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> >> >> >> -- >> - >> Pieter Hintjens >> CEO of iMatix.com >> Founder of ZeroMQ community >> blog: http://hintjens.com >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > -- > > best! > > > > 舒友村 > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- - Pieter Hintjens CEO of iMatix.com Founder of ZeroMQ community blog: http://hintjens.com _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
