[zeromq-dev] Assertion failed: !current_out (xrep.cpp:166)
Victor Nakoryakov
nail.xx at gmail.com
Sat Jan 29 15:40:33 CET 2011
Hi Martin,
Thanks for the advices. They helped to narrow down the problem. I'm
sorry for disturbing, but that was my fault. Actually there _was_ a
scenario when socket is used from different threads simultaneously.
Now I've made inproc transport to deliver all messages to a single
main XREP and all came fine.
ZMQ is cool! Thanks again and good luck.
On Fri, Jan 28, 2011 at 20:50, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Hi Victor,
>
>> I've got a trouble while using XREP socket under relatively high load.
>> Assertion mentioned crashes my daemon after minute or so. All that
>> time it is used to reply to xreqs and to initiate message pushes with
>> manually formed envelope (as an identity of an expected receiver) as
>> well. Messages are from 40 bytes to 20 KBytes.
>>
>> As far as I understand looking at C++ code, the problem is attempt to
>> send a new message while previous message send isn't done. If so, how
>> could it be? Could it be a threading issue? I done my code in such way
>> so that a new XREP socket is created for every thread, but there is
>> just one thread and just one socket on receiving (XREQ) side. Could it
>> be a reason? I guess no, but who knows. I use python bindings if it
>> matters, they are 2.1.1 and zeromq itself is 2.1.0.
>
> I've checked the code and it seems the !more_out && current_out cannot
> happen unless there's a memory overwrite or something like that.
>
> Is there a way to reproduce the problem?
>
> As for debugging you can possibly assert() that !(!more_out && current_out)
> at each place where either more_out or current_out are set to double check
> that xrep_t doesn't get the two variables into inconsistent state somehow.
>
> Martin
>
--
Victor Nakoryakov
nail.xx at gmail
Moscow, Russia
http://ru.linkedin.com/in/nakoryakov
More information about the zeromq-dev
mailing list