Assertion failed end_chunk->next in yqueu.hpp (Line 108)

Description

We report the following issue: an assertion failure in the following context:

1 publisher to 100 subscriber with a message of 5 million bytes.
The publisher runs in a periodic loop of 100Hz. The data is
allocated statically, so no external call for a memory deallocation.
Both publisher and subscriber(s) are implemented in C and
linked against 2.0.9 version of 0MQ.

Please find the code of the publisher below:

struct message {
struct timeval timestamp;
char buffer[MSG_SIZE_IN_BYTES];
};

int main(int argc, char *argv[])
{

void* context;
void* publisher;

context = zmq_init(1);
publisher = zmq_socket(context, ZMQ_PUB);
zmq_bind(publisher, "tcp://*:5556");

int i = 0;
struct message m;

if (m.buffer == NULL) {
printf("Buffer is NULL. Exit!\n");
} else {
for (i = 0; i < MSG_SIZE_IN_BYTES; i++) {
m.buffer[i] = rand()%26+'a';
}
m.buffer[i] = '\0';
}

while(1)
{

zmq_msg_t msg;
zmq_msg_init_size(&msg, sizeof(struct message));
gettimeofday(&(m.timestamp), NULL);
zmq_msg_init_data(&msg, &m, sizeof(struct message), NULL, NULL);

zmq_send(publisher, &msg, 0);
zmq_msg_close(&msg);
usleep(HERTZ_30);
}
return 0;
}

</code>

We also tried the ZMQ_HWM (50MB before dropping messages) and we also tried
ZMQ_SWAP with swap memory of 500MB. In both cases we get the same
assertion "end_chunk->next".

Nico

Environment

None

Status

Assignee

Unassigned

Reporter

nicoh

Labels

None

Priority