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

cmd/ipfs/util max fd tests don't work on MacOS #5495

Closed
rob-deutsch opened this issue Sep 20, 2018 · 0 comments · Fixed by #5496
Closed

cmd/ipfs/util max fd tests don't work on MacOS #5495

rob-deutsch opened this issue Sep 20, 2018 · 0 comments · Fixed by #5496

Comments

@rob-deutsch
Copy link
Contributor

rob-deutsch commented Sep 20, 2018

Version information:

go-ipfs version: 0.4.18-dev-
Repo version: 7
System version: amd64/darwin
Golang version: go1.10.3

Type:

Bug

Description:

$ go test
--- FAIL: TestManageInvalidNFds (0.00s)
        ulimit_test.go:25: Testing file descriptor invalidity
        ulimit_test.go:45: ManageFdLimit should return an error
Successfully raised file descriptor limit to 9223372036854767616.
FAIL
exit status 1
FAIL    github.com/ipfs/go-ipfs/cmd/ipfs/util   0.023s
$

This test can be found here.

This test is trying to set the FD limit higher than your OS's maximum allowed. The problem is that on MacOS this maximum allowed is at the maximum int64 value (i.e. unlimited), and we're experiencing integer wrap around.

Solution:

I am working on a fix now. The fix is based on changing the util code to use uint64 instead of int64, and adding some error conditions to the FreeBSD code.

PR incoming.

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 a pull request may close this issue.

1 participant