-
Notifications
You must be signed in to change notification settings - Fork 13k
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
io_error: "too many open files" on Mac #10442
Comments
This is an unfortunate consequence of using libuv right now. All println requests go through libuv, which requires a handle to stdout. Whenever we get a libuv handle, we must eventually close it, but this will close the underlying file descriptor of the handle. To get around this, we dup the stdout file descriptor, causing you to reach the file descriptor limit fairly quickly on osx. That being said, libuv recently had a patch (joyent/libuv@359d6678) to not close stdio file descriptors on unix. Sadly they're still closed on windows, so we haven't been able to fix this just yet. We can special-case unix/windows right now, but I'd almost rather just wait until joyent/libuv#991 is fixed. Thanks for the bug report though! |
@alexcrichton Are there plans to move away from libuv? |
No, but there are many plans to optimize our usage of libuv! |
This was closed by #10804 now that we're no longer calling |
Downgrade let_underscore_untyped to restriction From reading rust-lang#6842 I am not convinced of the cost/benefit of this lint even as a pedantic lint. It sounds like the primary motivation was to catch cases of `fn() -> Result` being changed to `async fn() -> Result`. If the original Result was ignored by a `let _`, then the compiler wouldn't guide you to add `.await`. **However, this situation is caught in a more specific way by [let_underscore_future](https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future) which was introduced _after_ the original suggestion (rust-lang#9760).** In rust-lang#10410 it was mentioned twice that a <kbd>restriction</kbd> lint might be more appropriate for let_underscore_untyped. changelog: Moved [`let_underscore_untyped`] to restriction
Source:
Compilation and run:
rustc main.rs; ./main
Result:
The text was updated successfully, but these errors were encountered: