[zeromq-dev] PGM assert on connect: Assertion failed: rc == 0 (connect_session.cpp:82) (ATT: Steve!)

Ian Barber ian.barber at gmail.com
Mon Feb 7 17:28:18 CET 2011

On Mon, Feb 7, 2011 at 10:24 AM, Ian Barber <ian.barber at gmail.com> wrote:

> Hi all,
> Martin suggested I post this onto the list in case anyone (well, Steve :) )
> has an idea. I was trying a simple PGM connection (below), which was causing
> an assertion. On Mikko's advice I tried setting a higher ZMQ_RATE, which has
> sorted the problem out. I did a quite trial, and discovered that the magic
> rate (in my setup at least) was 150 - at 149 and below it seemed to trigger
> the assertion.
We've been investigating this on the IRC. The issue looks to be in setting
the txw_sqns, as this is calculated based on the recovery_ivl, the rate and
the the max_tpdu. Unfortunately this calculation is wrong at the moment:

recovery_ivl * rate / max_tpdu

The rate on the 0MQ side is set in kilobits, while the tpdu is set in bytes.
For the default values for 10 * 100 / 1500, this yields a value less than 1,
which is stored in the int as 0, and causes the pgm_setsockopt to fail. On
investigation of this, Martin worked out the correct formula would be
something along the lines of:

recovery_ivl * rate / max_tpdu * 1000 / 8

For the default values this comes out at about 83 sequence numbers. While
this seems to be the correct value, if we were to implement this change
there would be a significant increase in TXW_SQNS values, of around 125
times, which is likely to also cause an equivalent increase in the size of
buffers allocated, and hence overall memory usage. The size of the increase
is large enough this seems likely to cause a problem for people with a
currently working set up.

Steve: is this change likely to cause a 125x buffer size increase, and does
the revised formula seem correct?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110207/31ceae98/attachment.htm>

More information about the zeromq-dev mailing list