Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown vertx instance created within BesuCommand #209

Merged
merged 1 commit into from
Nov 21, 2019

Conversation

ajsutton
Copy link
Contributor

PR description

BesuCommandTest and probably anything else that extends CommandTestAbstract leaked about 50 file descriptors per test that successfully parsed the CLI args. BesuCommand creates a Vertx instance which is never shutdown.

This is the root cause of newer Macs failing tests with "Failed to create a child event loop". They have more cores so run more processes in parallel which increases the number of file descriptors validly being used (each process needs around 200 file descriptors) and increases the chance that two of these tests will run at the same time and hit the resource limits.

This is a fairly brute-force approach to getting hold of that vertx instance and shutting it down but it solves the immediate issue.

Signed-off-by: Adrian Sutton adrian.sutton@consensys.net

… doesn't leak file descriptors.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
@atoulme
Copy link
Contributor

atoulme commented Nov 21, 2019

This change appears to fix the test on my machine - iMac 2019. I do reproduce the problem on the master branch.

@ajsutton ajsutton merged commit 7052fda into hyperledger:master Nov 21, 2019
@ajsutton ajsutton deleted the fix-vertx-leak branch November 21, 2019 06:28
edwardmack pushed a commit to ChainSafe/besu that referenced this pull request Feb 4, 2020
… doesn't leak file descriptors. (hyperledger#209)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
edwardmack pushed a commit to ChainSafe/besu that referenced this pull request Feb 4, 2020
… doesn't leak file descriptors. (hyperledger#209)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Signed-off-by: edwardmack <ed@edwardmack.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants