[zeromq-dev] Failed to use zeromq2.2 to communicate with zeromq4.0.1

舒友村 shuyoucun at bwstor.com.cn
Fri Nov 22 16:05:35 CET 2013


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 <ph at imatix.com> 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, 舒友村 <shuyoucun at bwstor.com.cn> 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 <ph at imatix.com> 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, 舒友村 <shuyoucun at bwstor.com.cn> 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 <ph at imatix.com>
> wrote:
> >> >>
> >> >> Hi, what socket types are you using on each side?
> >> >>
> >> >> -Pieter
> >> >> _______________________________________________
> >> >> zeromq-dev mailing list
> >> >> zeromq-dev at lists.zeromq.org
> >> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> >
> >> > best!
> >> >
> >> >
> >> >
> >> > 舒友村
> >> >
> >> > _______________________________________________
> >> > zeromq-dev mailing list
> >> > zeromq-dev at lists.zeromq.org
> >> > 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
> >> zeromq-dev at lists.zeromq.org
> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> >
> >
> >
> > --
> >
> > best!
> >
> >
> >
> > 舒友村
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > 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
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



-- 

best!


舒友村
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131122/2acfeea3/attachment.html>


More information about the zeromq-dev mailing list