zeromq / zeromq4-x

ØMQ 4.x stable release branch - bug fixes only
GNU General Public License v3.0
458 stars 196 forks source link

test_many_sockets failing from 4.0.4 to 4.0.7 #155

Closed afarbos closed 8 years ago

afarbos commented 8 years ago

Hi,

When I am calling ctest after building I always finish with an exception on the test test_many_sockets. I tried all releases from 4.0.4 to 4.0.7.

output:

UpdateCTestConfiguration  from :/build/src/libzmq-v4.0.7-build/DartConfiguration.tcl
UpdateCTestConfiguration  from :/build/src/libzmq-v4.0.7-build/DartConfiguration.tcl
Test project /build/src/libzmq-v4.0.7-build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 35
    Start 35: test_many_sockets

35: Test command: /build/src/libzmq-v4.0.7-build/bin/test_many_sockets
35: Test timeout computed to be: 9.99988e+06
35: test_many_sockets: /build/src/libzmq-v4.0.7/tests/test_many_sockets.cpp:40: void test_system_max(): Assertion `(int) sockets.size () < no_of_sockets' failed.
1/1 Test #35: test_many_sockets ................***Exception: Other  0.67 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.70 sec

The following tests FAILED:
         35 - test_many_sockets (OTHER_FAULT)
Errors while running CTest
bluca commented 8 years ago

Platform? Also does make check fail as well?

afarbos commented 8 years ago

Platform: centos7 I assume you wanted to say make test and yes.

bluca commented 8 years ago

No I meant make check (autotools), I'm not familiar with "ctest", and I'm not sure we support it. What steps and commands are you using to build, precisely, so that I can try to reproduce?

afarbos commented 8 years ago

same issue with autotools.

# make check
...
# cat tests/test-suite.log
========================================
   zeromq 4.0.4: tests/test-suite.log
========================================

# TOTAL: 43
# PASS:  42
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test_many_sockets
=======================

lt-test_many_sockets: ../../libzmq-v4.0.4/tests/test_many_sockets.cpp:40: void test_system_max(): Assertion `(int) sockets.size () < no_of_sockets' failed.
bluca commented 8 years ago

Try setting a higher ulimit, the default on CentOS might be too low:

ulimit -n 64000

afarbos commented 8 years ago

Works, thanks.

Does this number was random ?

bluca commented 8 years ago

Hard limit is usually 65k, so we set 64k to be sure. I'm working on a fix to have the tests do it themselves when needed.

afarbos commented 8 years ago

ok thanks.