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

Tests don't clean up open descriptors #544

Open
viraptor opened this issue Mar 2, 2023 · 0 comments
Open

Tests don't clean up open descriptors #544

viraptor opened this issue Mar 2, 2023 · 0 comments

Comments

@viraptor
Copy link

viraptor commented Mar 2, 2023

I don't know which part exactly is at fault here, but with default settings for some systems, tests hit the open file limit very quickly.
On a default macos machine:

...

---- planning::tests::test_subplan_produces_crate_root_with_forward_slash stdout ----
thread 'planning::tests::test_subplan_produces_crate_root_with_forward_slash' panicked at 'Cannot build HTTP client: Error { kind: ClientInitialization, context: None, source: Some(Os { code: 24, kind: Uncategorized, message: "Too many open files" }), source_type: Some("std::io::error::Error") }', /Users/viraptor/.cargo/registry/src/github.com-1ecc6299db9ec823/httpmock-0.5.7/src/api/adapter/mod.rs:136:14

---- settings::tests::test_loading_settings_legacy stdout ----
thread 'settings::tests::test_loading_settings_legacy' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 24, kind: Uncategorized, message: "Too many open files" }', src/settings.rs:912:53

---- settings::tests::test_loading_without_package_settings stdout ----
thread 'settings::tests::test_loading_without_package_settings' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 24, kind: Uncategorized, message: "Too many open files" }', src/settings.rs:839:53

---- settings::tests::test_loading_workspace_settings stdout ----
thread 'settings::tests::test_loading_workspace_settings' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 24, kind: Uncategorized, message: "Too many open files" }', src/testing.rs:163:40

---- planning::tests::test_semver_matching stdout ----
thread 'planning::tests::test_semver_matching' panicked at 'Cannot build HTTP client: Error { kind: ClientInitialization, context: None, source: Some(Os { code: 24, kind: Uncategorized, message: "Too many open files" }), source_type: Some("std::io::error::Error") }', /Users/viraptor/.cargo/registry/src/github.com-1ecc6299db9ec823/httpmock-0.5.7/src/api/adapter/mod.rs:136:14


failures:
    planning::tests::test_binary_dependencies_remote_genmode
    planning::tests::test_plan_build_produces_aliased_dependencies
    planning::tests::test_plan_build_produces_build_proc_macro_dependencies
    planning::tests::test_plan_build_produces_proc_macro_dependencies
    planning::tests::test_semver_matching
    planning::tests::test_subplan_produces_crate_root_with_forward_slash
    planning::tests::test_workspace_context_contains_no_binary_dependencies
    planning::tests::test_workspace_members_share_dependency_of_different_versions
    settings::tests::test_loading_settings_legacy
    settings::tests::test_loading_without_package_settings
    settings::tests::test_loading_workspace_settings

test result: FAILED. 49 passed; 11 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.41s

Bumping up the limits lets the tests pass, but maybe they should clean up and not go into hundreds.

boltzmannrain added a commit to boltzmannrain/nixpkgs that referenced this issue Nov 13, 2023
https://hydra.nixos.org/build/239024688/nixlog/2
https://hydra.nixos.org/build/239009073/nixlog/2
```
thread '<unnamed>' panicked at 'Cannot build local tokio runtime: Os { code: 24, kind: Uncategorized, message: "Too many open files" }', /private/tmp/nix-build-cargo-raze-0.16.0.drv-0/cargo-raze-0.16.0-vendor.tar.gz/httpmock/src/lib.rs:1436:14
```

Seems to be a typical darwin failure, some packages already bump
file descriptors limit to 1024 (same as default in some Linux distros,
default darwin value seems to be 256 these days)

Also has a report upstream
google/cargo-raze#544

ZHF: NixOS#265948
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

No branches or pull requests

1 participant