Re: [zeromq-dev] ZeroMQ 4.2 release, planning

2016-10-20 Thread Thomas Rodgers
I will have some time most likely the week of Nov6 (off for a week of C++
Committee 'fun') to test different message size alternatives. I'll follow
up with my results here for consideration the next time we are inclined to
break the ABI compatibility :)

On Sunday, October 16, 2016, Brian Knox  wrote:

> A new stable version would definitely help me in my quest to get ZeroMQ
> support enabled by default in rsyslog in distros.
>
> On Sun, Oct 16, 2016 at 2:40 PM Doron Somech  wrote:
>
>> I say lets bump.
>>
>> On Oct 15, 2016 20:32, "Luca Boccassi"  wrote:
>>
>>> As Thomas said, false sharing would be a real issue with 96.
>>>
>>> So given a release is long due, at this point I'd say to drop this for
>>> the moment.
>>>
>>> What do we do for the change to union for zmq_msg_t? Bump ABI version or
>>> not?
>>>
>>> On Thu, 2016-10-06 at 09:53 +0300, Doron Somech wrote:
>>> > No new socket type, I worked at the time on binary message type, might
>>> > complete it sometime, but it is not urgent.
>>> >
>>> > If there is a lot of performance penalty we can give it up, I will
>>> > find another solution for the Radio-Dish.
>>> >
>>> > What about 96 bytes? same penalty?
>>> >
>>> > Regarding the binding, I'm not sure.
>>> >
>>> > On Sat, Oct 1, 2016 at 9:14 PM, Luca Boccassi 
>>> wrote:
>>> > > On Tue, 2016-09-27 at 09:41 +0300, Doron Somech wrote:
>>> > >> Sorry for the late response, increasing the msg_t structure will be
>>> > >> great, however this will require changing a lot of binding.
>>> > >
>>> > > I think I remember we need it for the new socket types, is that
>>> correct?
>>> > >
>>> > > There is a large performance penalty (intuitively due to not fitting
>>> > > into a single cache line anymore, but haven't ran perf/cachegrind),
>>> and
>>> > > the throughput with vsm type messages goes down by 4% (min) and 20%
>>> > > (max) for TCP, and 36% (min) 38 (max) for inproc, which is quite a
>>> lot,
>>> > > so we need to be sure it's worth it.
>>> > >
>>> > > Regarding the bindings, after a quick search on the Github org, I
>>> could
>>> > > only see:
>>> > >
>>> > > https://github.com/zeromq/lzmq/blob/master/src/lua/lzmq/
>>> ffi/api.lua#L144
>>> > > https://github.com/zeromq/clrzmq4/blob/master/lib/zmq.cs#L28
>>> > > https://github.com/zeromq/pyczmq/blob/master/pyczmq/zmq.py#L177
>>> > >
>>> > > Other bindings just import zmq.h. Did I miss any?
>>> > >
>>> > >> Sorry for disappearing, baby and full time job is a lot :-),
>>> hopefully
>>> > >> I'm back...
>>> > >
>>> > > No worries, perfectly understandable :-)
>>> > >
>>> > >> On Mon, Aug 29, 2016 at 6:46 PM, Luca Boccassi <
>>> luca.bocca...@gmail.com> wrote:
>>> > >> > Sorry, I meant if we go with (1), not (2), we might bump the size
>>> as
>>> > >> > well, since we are already doing another ABI-breaking change.
>>> > >> >
>>> > >> > I agree on the solution as well.
>>> > >> >
>>> > >> > On Mon, 2016-08-29 at 17:12 +0200, Pieter Hintjens wrote:
>>> > >> >> I'm confused between the (1) and (2) choices, and can't see where
>>> > >> >> bumping the message size fits.
>>> > >> >>
>>> > >> >> Nonetheless, I think bumping the size, fixing the alignment
>>> issues,
>>> > >> >> and bumping the ABI version is the best solution here.
>>> > >> >>
>>> > >> >> On Fri, Aug 26, 2016 at 12:33 PM, Luca Boccassi <
>>> luca.bocca...@gmail.com> wrote:
>>> > >> >> > I've given some more thoughts and testing to the alignment
>>> issue. I can
>>> > >> >> > reproduce the problem by enabling alignment checks on x86 too.
>>> > >> >> >
>>> > >> >> > But most importantly, I think we cannot get away from bumping
>>> the ABI
>>> > >> >> > with this fix, however we rearrange it, simply because
>>> applications need
>>> > >> >> > to be rebuilt against the new header to be fixed. A simple
>>> rebuild of
>>> > >> >> > the libzmq.so is not enough. And the way to do this is to bump
>>> the ABI
>>> > >> >> > so that distros can schedule transitions and rebuilds and so
>>> on.
>>> > >> >> >
>>> > >> >> > So the choice list is now restricted to:
>>> > >> >> >
>>> > >> >> > 1) Bump ABI
>>> > >> >> > 2) Revert the fix and leave everything broken on sparc64 and
>>> some
>>> > >> >> > aarch64 (rpi3 seems not to be affected, must depend on the SoC
>>> flavour)
>>> > >> >> >
>>> > >> >> > If we go with 2, we might as well get 2 birds with one stone
>>> and bump
>>> > >> >> > the zmq_msg_t size to 128 as we have talked about in the past.
>>> > >> >> >
>>> > >> >> > Doron, this would help with the new UDP based socket types
>>> right?
>>> > >> >> >
>>> > >> >> > Pros of bumping msg size:
>>> > >> >> >
>>> > >> >> > - we can get rid of the malloc() in the lmsg type case as all
>>> the data
>>> > >> >> > will fit
>>> > >> >> >
>>> > >> >> > Cons:
>>> > >> >> >
>>> > >> >> > - for the vsm/cmsg type cases (for most architectures anyway)
>>> it won't
>>> > >> >> > fit anymore into a single cacheline
>>> > >> >> >

Re: [zeromq-dev] Assertion failed: !more (src/fq.cpp:117)

2016-10-20 Thread Ranjeet Kumar
Yes,
I had used
zsocket_set_router_handover( self->router, 1);

in my code.

On Thu, Oct 20, 2016 at 7:21 PM, Doron Somech  wrote:

> Is the handover option enabled?
>
> On Fri, Sep 16, 2016 at 11:13 AM, Ranjeet Kumar 
> wrote:
> > Hi Martin,
> >
> > Yes, it is very often. I am having 100k clients connecting with my
> server.
> > So in order to run the application i had commented the line from fq.cpp
> 117
> > zmq_assert (!more);
> >
> > And now it is working for me.
> >
> >
> > Thanks
> > (Ranjeet Kumar)
> >
> >
> > On Fri, Sep 16, 2016 at 12:18 AM, Martin Hurton 
> wrote:
> >>
> >> Hi Ranjeet,
> >>
> >> Is this easy to reproduce? Thanks.
> >>
> >> - Martin
> >>
> >> On Sat, Sep 10, 2016 at 3:17 PM, Ranjeet Kumar 
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I am using zeromq 4.1.5 and czmq 3.0.2. I am using the server-client as
> >>> router dealer. I am getting this  Assertion failed: !more
> (src/fq.cpp:117)
> >>> issue while 50k clients starts making connecting with the server.
> >>>
> >>> stack trace is below:
> >>> Assertion failed: !more (src/fq.cpp:117)
> >>>
> >>> Program received signal SIGABRT, Aborted.
> >>> [Switching to Thread 0x7490d700 (LWP 24885)]
> >>> 0x768f15f7 in raise () from /lib64/libc.so.6
> >>> Missing separate debuginfos, use: debuginfo-install
> >>> glibc-2.17-106.el7_2.6.x86_64 libgcc-4.8.5-4.el7.x86_64
> >>> libstdc++-4.8.5-4.el7.x86_64
> >>> (gdb) bt
> >>> #0  0x768f15f7 in raise () from /lib64/libc.so.6
> >>> #1  0x768f2ce8 in abort () from /lib64/libc.so.6
> >>> #2  0x77b8f769 in zmq::zmq_abort
> >>> (errmsg_=errmsg_@entry=0x77bc1eca "!more") at src/err.cpp:83
> >>> #3  0x77b8fccd in zmq::fq_t::recvpipe (this=this@entry
> =0x60bdc0,
> >>> msg_=msg_@entry=0x7490ce60, pipe_=pipe_@entry=0x7490cd08) at
> >>> src/fq.cpp:117
> >>> #4  0x77ba3423 in zmq::router_t::xrecv (this=0x60b8d0,
> >>> msg_=0x7490ce60) at src/router.cpp:301
> >>> #5  0x77ba878b in zmq::socket_base_t::recv
> >>> (this=this@entry=0x60b8d0, msg_=msg_@entry=0x7490ce60,
> >>> flags_=flags_@entry=0) at src/socket_base.cpp:910
> >>> #6  0x77ba1015 in forward (from_=from_@entry=0x60b8d0,
> >>> to_=to_@entry=0x60c0b0, capture_=capture_@entry=0x0, msg_=...) at
> >>> src/proxy.cpp:81
> >>> #7  0x77ba11e7 in zmq::proxy (frontend_=0x60b8d0,
> >>> backend_=0x60c0b0, capture_=0x0, control_=0x0) at src/proxy.cpp:188
> >>> #8  0x00403fcf in broker_task (args=0x0) at
> push_server.cpp:1348
> >>> #9  0x7791978f in s_thread_shim (args=0x60d590) at
> >>> src/zthread.c:84
> >>> #10 0x776b6dc5 in start_thread () from /lib64/libpthread.so.0
> >>> #11 0x769b2ced in clone () from /lib64/libc.so.6
> >>>
> >>> Any suggestion to fix this issue.
> >>>
> >>> Thanks
> >>> (Ranjeet Kumar)
> >>>
> >>>
> >>>
> >>> ___
> >>> zeromq-dev mailing list
> >>> zeromq-dev@lists.zeromq.org
> >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >>
> >>
> >>
> >> ___
> >> zeromq-dev mailing list
> >> zeromq-dev@lists.zeromq.org
> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> >
> >
> > ___
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] about Assertion failed: !more (src/fq.cpp:117): just remove the assertion?

2016-10-20 Thread Doron Somech
Try compile zeromq with the tweak I suggested and the multipart test case.

On Thu, Oct 20, 2016 at 4:56 PM, zmqdev  wrote:
> On 20.10.2016 15:46, Doron Somech wrote:
>>
>> I actually those are different issues. If you suffer from the pubsub
>> issue, I think I trace the bug and have a solution. Take a look at the
>> issue. If you suffer from the 100K issue, I think that is a different
>> one, anyway you can try the solution as well. It might be related to
>> another pipe.terminate call
>>
>
> just tweaked the test case of issue 2163 for a message with a single frame.
>
> No assertion, the program completes.
>
> There seems to be something broken in PUB -> SUB, multi-part messages, and
> zmq_disconnect.
>
>
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Assertion failed: !more (src/fq.cpp:117)

2016-10-20 Thread Doron Somech
Is the handover option enabled?

On Fri, Sep 16, 2016 at 11:13 AM, Ranjeet Kumar  wrote:
> Hi Martin,
>
> Yes, it is very often. I am having 100k clients connecting with my server.
> So in order to run the application i had commented the line from fq.cpp 117
> zmq_assert (!more);
>
> And now it is working for me.
>
>
> Thanks
> (Ranjeet Kumar)
>
>
> On Fri, Sep 16, 2016 at 12:18 AM, Martin Hurton  wrote:
>>
>> Hi Ranjeet,
>>
>> Is this easy to reproduce? Thanks.
>>
>> - Martin
>>
>> On Sat, Sep 10, 2016 at 3:17 PM, Ranjeet Kumar 
>> wrote:
>>>
>>> Hi,
>>>
>>> I am using zeromq 4.1.5 and czmq 3.0.2. I am using the server-client as
>>> router dealer. I am getting this  Assertion failed: !more (src/fq.cpp:117)
>>> issue while 50k clients starts making connecting with the server.
>>>
>>> stack trace is below:
>>> Assertion failed: !more (src/fq.cpp:117)
>>>
>>> Program received signal SIGABRT, Aborted.
>>> [Switching to Thread 0x7490d700 (LWP 24885)]
>>> 0x768f15f7 in raise () from /lib64/libc.so.6
>>> Missing separate debuginfos, use: debuginfo-install
>>> glibc-2.17-106.el7_2.6.x86_64 libgcc-4.8.5-4.el7.x86_64
>>> libstdc++-4.8.5-4.el7.x86_64
>>> (gdb) bt
>>> #0  0x768f15f7 in raise () from /lib64/libc.so.6
>>> #1  0x768f2ce8 in abort () from /lib64/libc.so.6
>>> #2  0x77b8f769 in zmq::zmq_abort
>>> (errmsg_=errmsg_@entry=0x77bc1eca "!more") at src/err.cpp:83
>>> #3  0x77b8fccd in zmq::fq_t::recvpipe (this=this@entry=0x60bdc0,
>>> msg_=msg_@entry=0x7490ce60, pipe_=pipe_@entry=0x7490cd08) at
>>> src/fq.cpp:117
>>> #4  0x77ba3423 in zmq::router_t::xrecv (this=0x60b8d0,
>>> msg_=0x7490ce60) at src/router.cpp:301
>>> #5  0x77ba878b in zmq::socket_base_t::recv
>>> (this=this@entry=0x60b8d0, msg_=msg_@entry=0x7490ce60,
>>> flags_=flags_@entry=0) at src/socket_base.cpp:910
>>> #6  0x77ba1015 in forward (from_=from_@entry=0x60b8d0,
>>> to_=to_@entry=0x60c0b0, capture_=capture_@entry=0x0, msg_=...) at
>>> src/proxy.cpp:81
>>> #7  0x77ba11e7 in zmq::proxy (frontend_=0x60b8d0,
>>> backend_=0x60c0b0, capture_=0x0, control_=0x0) at src/proxy.cpp:188
>>> #8  0x00403fcf in broker_task (args=0x0) at push_server.cpp:1348
>>> #9  0x7791978f in s_thread_shim (args=0x60d590) at
>>> src/zthread.c:84
>>> #10 0x776b6dc5 in start_thread () from /lib64/libpthread.so.0
>>> #11 0x769b2ced in clone () from /lib64/libc.so.6
>>>
>>> Any suggestion to fix this issue.
>>>
>>> Thanks
>>> (Ranjeet Kumar)
>>>
>>>
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] about Assertion failed: !more (src/fq.cpp:117): just remove the assertion?

2016-10-20 Thread zmqdev

On 20.10.2016 15:46, Doron Somech wrote:

I actually those are different issues. If you suffer from the pubsub
issue, I think I trace the bug and have a solution. Take a look at the
issue. If you suffer from the 100K issue, I think that is a different
one, anyway you can try the solution as well. It might be related to
another pipe.terminate call



just tweaked the test case of issue 2163 for a message with a single frame.

No assertion, the program completes.

There seems to be something broken in PUB -> SUB, multi-part messages, 
and zmq_disconnect.





___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] about Assertion failed: !more (src/fq.cpp:117): just remove the assertion?

2016-10-20 Thread Doron Somech
I actually those are different issues. If you suffer from the pubsub
issue, I think I trace the bug and have a solution. Take a look at the
issue. If you suffer from the 100K issue, I think that is a different
one, anyway you can try the solution as well. It might be related to
another pipe.terminate call

On Thu, Oct 20, 2016 at 3:46 PM, zmqdev  wrote:
> On 20.10.2016 14:31, Doron Somech wrote:
>>
>> Also I think it smells like using socket from multiple threads...
>
>
> unfortunately no, the assertion strikes in a single thread application.
>
> See also the test case at
>
> https://github.com/zeromq/libzmq/issues/2163
>
>> On Thu, Oct 20, 2016 at 3:28 PM, Doron Somech  wrote:
>>>
>>> It don't think it is correct, there might be an issue we need to solve.
>>>
>>> The workaround is not to use multi-part messages...
>>>
>
> I like multi-part messages!
>
> The workaround would require me to do the framing myself, which would be
> tricky, considering the advanced state of the application.
>
>
> Thanks anyway.
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] about Assertion failed: !more (src/fq.cpp:117): just remove the assertion?

2016-10-20 Thread zmqdev

On 20.10.2016 14:31, Doron Somech wrote:

Also I think it smells like using socket from multiple threads...


unfortunately no, the assertion strikes in a single thread application.

See also the test case at

https://github.com/zeromq/libzmq/issues/2163


On Thu, Oct 20, 2016 at 3:28 PM, Doron Somech  wrote:

It don't think it is correct, there might be an issue we need to solve.

The workaround is not to use multi-part messages...



I like multi-part messages!

The workaround would require me to do the framing myself, which would be 
tricky, considering the advanced state of the application.



Thanks anyway.


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] about Assertion failed: !more (src/fq.cpp:117): just remove the assertion?

2016-10-20 Thread Doron Somech
Also I think it smells like using socket from multiple threads...

On Thu, Oct 20, 2016 at 3:28 PM, Doron Somech  wrote:
> It don't think it is correct, there might be an issue we need to solve.
>
> The workaround is not to use multi-part messages...
>
> On Thu, Oct 20, 2016 at 10:11 AM, zmqdev  wrote:
>> Hi,
>>
>> Ranjeet Kumar described his troubles with the assertion in
>>
>>
>> http://lists.zeromq.org/pipermail/zeromq-dev/2016-September/030839.html
>>
>> According to
>>
>>
>> http://lists.zeromq.org/pipermail/zeromq-dev/2016-September/030851.html
>>
>> he apparently solved his problem by commenting the assertion out.
>>
>> 1. Could someone who understands that part of the code advise on the safety
>> of removing that assertion?
>>
>> 2. Is the assertion even correct?
>>
>> Thanks
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] about Assertion failed: !more (src/fq.cpp:117): just remove the assertion?

2016-10-20 Thread Doron Somech
It don't think it is correct, there might be an issue we need to solve.

The workaround is not to use multi-part messages...

On Thu, Oct 20, 2016 at 10:11 AM, zmqdev  wrote:
> Hi,
>
> Ranjeet Kumar described his troubles with the assertion in
>
>
> http://lists.zeromq.org/pipermail/zeromq-dev/2016-September/030839.html
>
> According to
>
>
> http://lists.zeromq.org/pipermail/zeromq-dev/2016-September/030851.html
>
> he apparently solved his problem by commenting the assertion out.
>
> 1. Could someone who understands that part of the code advise on the safety
> of removing that assertion?
>
> 2. Is the assertion even correct?
>
> Thanks
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] about Assertion failed: !more (src/fq.cpp:117): just remove the assertion?

2016-10-20 Thread zmqdev

Hi,

Ranjeet Kumar described his troubles with the assertion in

http://lists.zeromq.org/pipermail/zeromq-dev/2016-September/030839.html

According to

http://lists.zeromq.org/pipermail/zeromq-dev/2016-September/030851.html

he apparently solved his problem by commenting the assertion out.

1. Could someone who understands that part of the code advise on the 
safety of removing that assertion?


2. Is the assertion even correct?

Thanks

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev