test_connect_delay fails with test_connect_delay.cpp:80: void* server(void*): Assertion `rc != -1' failed.

Description

The test_connect_delay test consistently fails like this:

[ tests]# ./test_connect_delay
test_connect_delay running...
Rerunning with DELAY_ATTACH_ON_CONNECT
Running DELAY_ATTACH_ON_CONNECT with disconnect
lt-test_connect_delay: test_connect_delay.cpp:80: void* server(void*): Assertion `rc != -1' failed.
Aborted (core dumped)

Environment

CentOS 5 x86_64 and possibly others

Activity

Show:
Ian Barber
February 6, 2013, 9:30 PM

Backported the patch to master to the zeromq 3.x - should resolve the issue. https://github.com/zeromq/zeromq3-x/pull/77

Rob Gagnon
February 7, 2013, 6:47 AM
Edited

Ian: Thanks so much for the patch. That fixed the ability to compile things.

Ignore my secondary comment above about test_last_endpoint.cpp.... turns out that /tmp/testep existed and was owned by root, so things would not work due to file permissions and ownership.

Although, to fix that, I referenced the current test_last_endpoint.cpp, and added in the missing parts of main() to make sure the /tmp/testep file created during testing disappears.

I will attempt to attach the patch here, but not sure if that feature works for me.

Rob Gagnon
February 7, 2013, 7:56 AM

No go on the patch attachment. Must be something wrong with Jira.

I hate to do an inline patch, but it is small... Maybe someone can add this to the 3.x branch?

======BEGIN PATCH========
— tests/test_last_endpoint.cpp.orig 2013-02-07 07:13:55.000000000 +0000
+++ tests/test_last_endpoint.cpp 2013-02-07 07:49:05.000000000 +0000
@@ -44,11 +44,20 @@

void *sb = zmq_socket (ctx, ZMQ_ROUTER);
assert (sb);
+ int val = 0;
+ int rc = zmq_setsockopt (sb, ZMQ_LINGER, &val, sizeof (val));
+ assert (rc == 0);

do_bind_and_verify (sb, "tcp://127.0.0.1:5560");
do_bind_and_verify (sb, "tcp://127.0.0.1:5561");
do_bind_and_verify (sb, "ipc:///tmp/testep");

+ rc = zmq_close (sb);
+ assert (rc == 0);
+
+ rc = zmq_term (ctx);
+ assert (rc == 0);
+
return 0 ;
}

======END PATCH==========

Ian Barber
February 10, 2013, 10:28 PM

Thanks Rob, I'll submit that.

Ian Barber
February 10, 2013, 10:53 PM
Fixed

Assignee

Unassigned

Reporter

Adrien Kunysz

Labels

Components

Fix versions

Affects versions

Priority

Major
Configure