rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.63k stars 12.48k forks source link

error: failed to build archive: Too many open files #97234

Open TheButlah opened 2 years ago

TheButlah commented 2 years ago

Problem

I was compiling my code with cargo test name_of_test, and got the following error:

   Compiling wgpu v0.12.0
   Compiling bevy_render v0.6.1
error: failed to build archive: Too many open files

error: could not compile `wgpu` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not write output to /path/target/debug/deps/bevy_render-ea0e2b06d065ce6a.bevy_render.972d2127-cgu.15.rcgu.o: Too many open files

error: could not compile `bevy_render` due to previous error

I did a cargo clean and rebuilt, and it happened again. Then I just did a regular cargo test name_of_test and it succeeded.

Steps

I cannot post the original code or the full dependency tree, as it is proprietary. However, here is the dependency tree with closed source crates redacted:

❯ cargo tree
redacted_lib v0.0.0 (/path)
└── generational-arena v0.2.8
    └── cfg-if v0.1.10

redacted_lib v0.0.0 (/path)
[dev-dependencies]
└── derive_more v0.99.17 (proc-macro)
    ├── convert_case v0.4.0
    ├── proc-macro2 v1.0.37
    │   └── unicode-xid v0.2.3
    ├── quote v1.0.18
    │   └── proc-macro2 v1.0.37 (*)
    └── syn v1.0.92
        ├── proc-macro2 v1.0.37 (*)
        ├── quote v1.0.18 (*)
        └── unicode-xid v0.2.3
    [build-dependencies]
    └── rustc_version v0.4.0
        └── semver v1.0.9

redacted_executable v0.0.0 (/path)
├── bevy v0.6.1
│   └── bevy_internal v0.6.0
│       ├── bevy_app v0.6.0
│       │   ├── bevy_derive v0.6.0 (proc-macro)
│       │   │   ├── bevy_macro_utils v0.6.0
│       │   │   │   ├── cargo-manifest v0.2.6
│       │   │   │   │   ├── serde v1.0.137
│       │   │   │   │   ├── serde_derive v1.0.137 (proc-macro)
│       │   │   │   │   │   ├── proc-macro2 v1.0.37 (*)
│       │   │   │   │   │   ├── quote v1.0.18 (*)
│       │   │   │   │   │   └── syn v1.0.92 (*)
│       │   │   │   │   └── toml v0.5.9
│       │   │   │   │       ├── indexmap v1.8.1
│       │   │   │   │       │   └── hashbrown v0.11.2
│       │   │   │   │       │   [build-dependencies]
│       │   │   │   │       │   └── autocfg v1.1.0
│       │   │   │   │       └── serde v1.0.137
│       │   │   │   ├── quote v1.0.18 (*)
│       │   │   │   └── syn v1.0.92 (*)
│       │   │   ├── quote v1.0.18 (*)
│       │   │   └── syn v1.0.92 (*)
│       │   ├── bevy_ecs v0.6.1
│       │   │   ├── async-channel v1.6.1
│       │   │   │   ├── concurrent-queue v1.2.2
│       │   │   │   │   └── cache-padded v1.2.0
│       │   │   │   ├── event-listener v2.5.2
│       │   │   │   └── futures-core v0.3.21
│       │   │   ├── bevy_ecs_macros v0.6.0 (proc-macro)
│       │   │   │   ├── bevy_macro_utils v0.6.0 (*)
│       │   │   │   ├── proc-macro2 v1.0.37 (*)
│       │   │   │   ├── quote v1.0.18 (*)
│       │   │   │   └── syn v1.0.92 (*)
│       │   │   ├── bevy_reflect v0.6.0
│       │   │   │   ├── bevy_reflect_derive v0.6.0 (proc-macro)
│       │   │   │   │   ├── bevy_macro_utils v0.6.0 (*)
│       │   │   │   │   ├── proc-macro2 v1.0.37 (*)
│       │   │   │   │   ├── quote v1.0.18 (*)
│       │   │   │   │   ├── syn v1.0.92 (*)
│       │   │   │   │   └── uuid v0.8.2
│       │   │   │   │       ├── getrandom v0.2.6
│       │   │   │   │       │   ├── cfg-if v1.0.0
│       │   │   │   │       │   └── libc v0.2.125
│       │   │   │   │       └── serde v1.0.137
│       │   │   │   ├── bevy_utils v0.6.0
│       │   │   │   │   ├── ahash v0.7.6
│       │   │   │   │   │   ├── getrandom v0.2.6 (*)
│       │   │   │   │   │   └── once_cell v1.10.0
│       │   │   │   │   │   [build-dependencies]
│       │   │   │   │   │   └── version_check v0.9.4
│       │   │   │   │   ├── bevy_derive v0.6.0 (proc-macro) (*)
│       │   │   │   │   ├── instant v0.1.12
│       │   │   │   │   │   └── cfg-if v1.0.0
│       │   │   │   │   ├── tracing v0.1.34
│       │   │   │   │   │   ├── cfg-if v1.0.0
│       │   │   │   │   │   ├── pin-project-lite v0.2.9
│       │   │   │   │   │   ├── tracing-attributes v0.1.21 (proc-macro)
│       │   │   │   │   │   │   ├── proc-macro2 v1.0.37 (*)
│       │   │   │   │   │   │   ├── quote v1.0.18 (*)
│       │   │   │   │   │   │   └── syn v1.0.92 (*)
│       │   │   │   │   │   └── tracing-core v0.1.26
│       │   │   │   │   │       └── lazy_static v1.4.0
│       │   │   │   │   └── uuid v0.8.2 (*)
│       │   │   │   ├── downcast-rs v1.2.0
│       │   │   │   ├── erased-serde v0.3.20
│       │   │   │   │   └── serde v1.0.137
│       │   │   │   │       └── serde_derive v1.0.137 (proc-macro) (*)
│       │   │   │   ├── glam v0.20.5
│       │   │   │   │   ├── bytemuck v1.9.1
│       │   │   │   │   │   └── bytemuck_derive v1.1.0 (proc-macro)
│       │   │   │   │   │       ├── proc-macro2 v1.0.37 (*)
│       │   │   │   │   │       ├── quote v1.0.18 (*)
│       │   │   │   │   │       └── syn v1.0.92 (*)
│       │   │   │   │   ├── mint v0.5.9
│       │   │   │   │   └── serde v1.0.137 (*)
│       │   │   │   ├── parking_lot v0.11.2
│       │   │   │   │   ├── instant v0.1.12 (*)
│       │   │   │   │   ├── lock_api v0.4.7
│       │   │   │   │   │   └── scopeguard v1.1.0
│       │   │   │   │   │   [build-dependencies]
│       │   │   │   │   │   └── autocfg v1.1.0
│       │   │   │   │   └── parking_lot_core v0.8.5
│       │   │   │   │       ├── cfg-if v1.0.0
│       │   │   │   │       ├── instant v0.1.12 (*)
│       │   │   │   │       ├── libc v0.2.125
│       │   │   │   │       └── smallvec v1.8.0
│       │   │   │   │           └── serde v1.0.137 (*)
│       │   │   │   ├── serde v1.0.137 (*)
│       │   │   │   ├── smallvec v1.8.0 (*)
│       │   │   │   └── thiserror v1.0.31
│       │   │   │       └── thiserror-impl v1.0.31 (proc-macro)
│       │   │   │           ├── proc-macro2 v1.0.37 (*)
│       │   │   │           ├── quote v1.0.18 (*)
│       │   │   │           └── syn v1.0.92 (*)
│       │   │   ├── bevy_tasks v0.6.0
│       │   │   │   ├── async-channel v1.6.1 (*)
│       │   │   │   ├── async-executor v1.4.1
│       │   │   │   │   ├── async-task v4.2.0
│       │   │   │   │   ├── concurrent-queue v1.2.2 (*)
│       │   │   │   │   ├── fastrand v1.7.0
│       │   │   │   │   ├── futures-lite v1.12.0
│       │   │   │   │   │   ├── fastrand v1.7.0
│       │   │   │   │   │   ├── futures-core v0.3.21
│       │   │   │   │   │   ├── futures-io v0.3.21
│       │   │   │   │   │   ├── memchr v2.5.0
│       │   │   │   │   │   ├── parking v2.0.0
│       │   │   │   │   │   ├── pin-project-lite v0.2.9
│       │   │   │   │   │   └── waker-fn v1.1.0
│       │   │   │   │   ├── once_cell v1.10.0
│       │   │   │   │   └── slab v0.4.6
│       │   │   │   ├── event-listener v2.5.2
│       │   │   │   ├── futures-lite v1.12.0 (*)
│       │   │   │   └── num_cpus v1.13.1
│       │   │   │       └── libc v0.2.125
│       │   │   ├── bevy_utils v0.6.0 (*)
│       │   │   ├── downcast-rs v1.2.0
│       │   │   ├── fixedbitset v0.4.1
│       │   │   ├── fxhash v0.2.1
│       │   │   │   └── byteorder v1.4.3
│       │   │   ├── serde v1.0.137 (*)
│       │   │   └── thiserror v1.0.31 (*)
│       │   ├── bevy_reflect v0.6.0 (*)
│       │   └── bevy_utils v0.6.0 (*)
│       ├── bevy_asset v0.6.0
│       │   ├── anyhow v1.0.57
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_diagnostic v0.6.0
│       │   │   ├── bevy_app v0.6.0 (*)
│       │   │   ├── bevy_core v0.6.0
│       │   │   │   ├── bevy_app v0.6.0 (*)
│       │   │   │   ├── bevy_derive v0.6.0 (proc-macro) (*)
│       │   │   │   ├── bevy_ecs v0.6.1 (*)
│       │   │   │   ├── bevy_math v0.6.0
│       │   │   │   │   ├── bevy_reflect v0.6.0 (*)
│       │   │   │   │   └── glam v0.20.5 (*)
│       │   │   │   ├── bevy_reflect v0.6.0 (*)
│       │   │   │   ├── bevy_tasks v0.6.0 (*)
│       │   │   │   ├── bevy_utils v0.6.0 (*)
│       │   │   │   └── bytemuck v1.9.1 (*)
│       │   │   ├── bevy_ecs v0.6.1 (*)
│       │   │   ├── bevy_log v0.6.0
│       │   │   │   ├── bevy_app v0.6.0 (*)
│       │   │   │   ├── bevy_utils v0.6.0 (*)
│       │   │   │   ├── tracing-log v0.1.3
│       │   │   │   │   ├── lazy_static v1.4.0
│       │   │   │   │   ├── log v0.4.16
│       │   │   │   │   │   └── cfg-if v1.0.0
│       │   │   │   │   └── tracing-core v0.1.26 (*)
│       │   │   │   └── tracing-subscriber v0.3.11
│       │   │   │       ├── ansi_term v0.12.1
│       │   │   │       ├── lazy_static v1.4.0
│       │   │   │       ├── matchers v0.1.0
│       │   │   │       │   └── regex-automata v0.1.10
│       │   │   │       │       └── regex-syntax v0.6.25
│       │   │   │       ├── regex v1.5.5
│       │   │   │       │   ├── aho-corasick v0.7.18
│       │   │   │       │   │   └── memchr v2.5.0
│       │   │   │       │   ├── memchr v2.5.0
│       │   │   │       │   └── regex-syntax v0.6.25
│       │   │   │       ├── sharded-slab v0.1.4
│       │   │   │       │   └── lazy_static v1.4.0
│       │   │   │       ├── smallvec v1.8.0 (*)
│       │   │   │       ├── thread_local v1.1.4
│       │   │   │       │   └── once_cell v1.10.0
│       │   │   │       ├── tracing v0.1.34 (*)
│       │   │   │       ├── tracing-core v0.1.26 (*)
│       │   │   │       └── tracing-log v0.1.3 (*)
│       │   │   └── bevy_utils v0.6.0 (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   ├── bevy_log v0.6.0 (*)
│       │   ├── bevy_reflect v0.6.0 (*)
│       │   ├── bevy_tasks v0.6.0 (*)
│       │   ├── bevy_utils v0.6.0 (*)
│       │   ├── crossbeam-channel v0.5.4
│       │   │   ├── cfg-if v1.0.0
│       │   │   └── crossbeam-utils v0.8.8
│       │   │       ├── cfg-if v1.0.0
│       │   │       └── lazy_static v1.4.0
│       │   ├── downcast-rs v1.2.0
│       │   ├── notify v5.0.0-pre.11
│       │   │   ├── bitflags v1.3.2
│       │   │   ├── crossbeam-channel v0.5.4 (*)
│       │   │   ├── filetime v0.2.16
│       │   │   │   ├── cfg-if v1.0.0
│       │   │   │   └── libc v0.2.125
│       │   │   ├── inotify v0.9.6
│       │   │   │   ├── bitflags v1.3.2
│       │   │   │   ├── inotify-sys v0.1.5
│       │   │   │   │   └── libc v0.2.125
│       │   │   │   └── libc v0.2.125
│       │   │   ├── libc v0.2.125
│       │   │   ├── mio v0.7.14
│       │   │   │   ├── libc v0.2.125
│       │   │   │   └── log v0.4.16 (*)
│       │   │   └── walkdir v2.3.2
│       │   │       └── same-file v1.0.6
│       │   ├── parking_lot v0.11.2 (*)
│       │   ├── rand v0.8.5
│       │   │   ├── libc v0.2.125
│       │   │   ├── rand_chacha v0.3.1
│       │   │   │   ├── ppv-lite86 v0.2.16
│       │   │   │   └── rand_core v0.6.3
│       │   │   │       └── getrandom v0.2.6 (*)
│       │   │   └── rand_core v0.6.3 (*)
│       │   ├── serde v1.0.137 (*)
│       │   └── thiserror v1.0.31 (*)
│       ├── bevy_audio v0.6.0
│       │   ├── anyhow v1.0.57
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_asset v0.6.0 (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   ├── bevy_reflect v0.6.0 (*)
│       │   ├── bevy_utils v0.6.0 (*)
│       │   ├── parking_lot v0.11.2 (*)
│       │   └── rodio v0.14.0
│       │       ├── cpal v0.13.5
│       │       │   ├── alsa v0.6.0
│       │       │   │   ├── alsa-sys v0.3.1
│       │       │   │   │   └── libc v0.2.125
│       │       │   │   │   [build-dependencies]
│       │       │   │   │   └── pkg-config v0.3.25
│       │       │   │   ├── bitflags v1.3.2
│       │       │   │   ├── libc v0.2.125
│       │       │   │   └── nix v0.23.1
│       │       │   │       ├── bitflags v1.3.2
│       │       │   │       ├── cfg-if v1.0.0
│       │       │   │       ├── libc v0.2.125
│       │       │   │       └── memoffset v0.6.5
│       │       │   │           [build-dependencies]
│       │       │   │           └── autocfg v1.1.0
│       │       │   ├── libc v0.2.125
│       │       │   ├── nix v0.23.1 (*)
│       │       │   ├── parking_lot v0.11.2 (*)
│       │       │   └── thiserror v1.0.31 (*)
│       │       └── lewton v0.10.2
│       │           ├── byteorder v1.4.3
│       │           ├── ogg v0.8.0
│       │           │   └── byteorder v1.4.3
│       │           └── tinyvec v1.6.0
│       │               └── tinyvec_macros v0.1.0
│       ├── bevy_core v0.6.0 (*)
│       ├── bevy_core_pipeline v0.6.0
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_asset v0.6.0 (*)
│       │   ├── bevy_core v0.6.0 (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   └── bevy_render v0.6.1
│       │       ├── anyhow v1.0.57
│       │       ├── bevy_app v0.6.0 (*)
│       │       ├── bevy_asset v0.6.0 (*)
│       │       ├── bevy_core v0.6.0 (*)
│       │       ├── bevy_crevice v0.6.1
│       │       │   ├── bevy-crevice-derive v0.6.0 (proc-macro)
│       │       │   │   ├── bevy_macro_utils v0.6.0 (*)
│       │       │   │   ├── proc-macro2 v1.0.37 (*)
│       │       │   │   ├── quote v1.0.18 (*)
│       │       │   │   └── syn v1.0.92 (*)
│       │       │   ├── bytemuck v1.9.1 (*)
│       │       │   ├── glam v0.20.5 (*)
│       │       │   └── mint v0.5.9
│       │       ├── bevy_derive v0.6.0 (proc-macro) (*)
│       │       ├── bevy_ecs v0.6.1 (*)
│       │       ├── bevy_math v0.6.0 (*)
│       │       ├── bevy_reflect v0.6.0 (*)
│       │       ├── bevy_transform v0.6.0
│       │       │   ├── bevy_app v0.6.0 (*)
│       │       │   ├── bevy_ecs v0.6.1 (*)
│       │       │   ├── bevy_math v0.6.0 (*)
│       │       │   ├── bevy_reflect v0.6.0 (*)
│       │       │   ├── bevy_utils v0.6.0 (*)
│       │       │   └── smallvec v1.8.0 (*)
│       │       ├── bevy_utils v0.6.0 (*)
│       │       ├── bevy_window v0.6.0
│       │       │   ├── bevy_app v0.6.0 (*)
│       │       │   ├── bevy_math v0.6.0 (*)
│       │       │   ├── bevy_utils v0.6.0 (*)
│       │       │   └── raw-window-handle v0.4.3
│       │       │       └── cty v0.2.2
│       │       ├── bitflags v1.3.2
│       │       ├── codespan-reporting v0.11.1
│       │       │   ├── termcolor v1.1.3
│       │       │   └── unicode-width v0.1.9
│       │       ├── copyless v0.1.5
│       │       ├── downcast-rs v1.2.0
│       │       ├── futures-lite v1.12.0 (*)
│       │       ├── hex v0.4.3
│       │       ├── hexasphere v6.1.0
│       │       │   ├── glam v0.20.5 (*)
│       │       │   └── lazy_static v1.4.0
│       │       ├── image v0.23.14
│       │       │   ├── bytemuck v1.9.1 (*)
│       │       │   ├── byteorder v1.4.3
│       │       │   ├── color_quant v1.1.0
│       │       │   ├── num-iter v0.1.43
│       │       │   │   ├── num-integer v0.1.45
│       │       │   │   │   └── num-traits v0.2.14
│       │       │   │   │       [build-dependencies]
│       │       │   │   │       └── autocfg v1.1.0
│       │       │   │   │   [build-dependencies]
│       │       │   │   │   └── autocfg v1.1.0
│       │       │   │   └── num-traits v0.2.14 (*)
│       │       │   │   [build-dependencies]
│       │       │   │   └── autocfg v1.1.0
│       │       │   ├── num-rational v0.3.2
│       │       │   │   ├── num-integer v0.1.45 (*)
│       │       │   │   └── num-traits v0.2.14 (*)
│       │       │   │   [build-dependencies]
│       │       │   │   └── autocfg v1.1.0
│       │       │   ├── num-traits v0.2.14 (*)
│       │       │   ├── png v0.16.8
│       │       │   │   ├── bitflags v1.3.2
│       │       │   │   ├── crc32fast v1.3.2
│       │       │   │   │   └── cfg-if v1.0.0
│       │       │   │   ├── deflate v0.8.6
│       │       │   │   │   ├── adler32 v1.2.0
│       │       │   │   │   └── byteorder v1.4.3
│       │       │   │   └── miniz_oxide v0.3.7
│       │       │   │       └── adler32 v1.2.0
│       │       │   └── scoped_threadpool v0.1.9
│       │       ├── naga v0.8.5
│       │       │   ├── bit-set v0.5.2
│       │       │   │   └── bit-vec v0.6.3
│       │       │   ├── bitflags v1.3.2
│       │       │   ├── codespan-reporting v0.11.1 (*)
│       │       │   ├── hexf-parse v0.2.1
│       │       │   ├── indexmap v1.8.1 (*)
│       │       │   ├── log v0.4.16 (*)
│       │       │   ├── num-traits v0.2.14 (*)
│       │       │   ├── petgraph v0.6.0
│       │       │   │   ├── fixedbitset v0.4.1
│       │       │   │   └── indexmap v1.8.1 (*)
│       │       │   ├── pp-rs v0.2.1
│       │       │   │   └── unicode-xid v0.2.3
│       │       │   ├── rustc-hash v1.1.0
│       │       │   ├── spirv v0.2.0+1.5.4
│       │       │   │   ├── bitflags v1.3.2
│       │       │   │   └── num-traits v0.2.14 (*)
│       │       │   └── thiserror v1.0.31 (*)
│       │       ├── once_cell v1.10.0
│       │       ├── parking_lot v0.11.2 (*)
│       │       ├── regex v1.5.5 (*)
│       │       ├── serde v1.0.137 (*)
│       │       ├── smallvec v1.8.0 (*)
│       │       ├── thiserror v1.0.31 (*)
│       │       └── wgpu v0.12.0
│       │           ├── arrayvec v0.7.2
│       │           ├── log v0.4.16 (*)
│       │           ├── naga v0.8.5 (*)
│       │           ├── parking_lot v0.11.2 (*)
│       │           ├── raw-window-handle v0.4.3 (*)
│       │           ├── smallvec v1.8.0 (*)
│       │           ├── wgpu-core v0.12.2
│       │           │   ├── arrayvec v0.7.2
│       │           │   ├── bitflags v1.3.2
│       │           │   ├── codespan-reporting v0.11.1 (*)
│       │           │   ├── copyless v0.1.5
│       │           │   ├── fxhash v0.2.1 (*)
│       │           │   ├── log v0.4.16 (*)
│       │           │   ├── naga v0.8.5 (*)
│       │           │   ├── parking_lot v0.11.2 (*)
│       │           │   ├── profiling v1.0.5
│       │           │   ├── raw-window-handle v0.4.3 (*)
│       │           │   ├── smallvec v1.8.0 (*)
│       │           │   ├── thiserror v1.0.31 (*)
│       │           │   ├── wgpu-hal v0.12.5
│       │           │   │   ├── arrayvec v0.7.2
│       │           │   │   ├── ash v0.34.0+1.2.203
│       │           │   │   │   └── libloading v0.7.3
│       │           │   │   │       └── cfg-if v1.0.0
│       │           │   │   ├── bitflags v1.3.2
│       │           │   │   ├── fxhash v0.2.1 (*)
│       │           │   │   ├── glow v0.11.2
│       │           │   │   ├── gpu-alloc v0.5.3
│       │           │   │   │   ├── bitflags v1.3.2
│       │           │   │   │   └── gpu-alloc-types v0.2.0
│       │           │   │   │       └── bitflags v1.3.2
│       │           │   │   ├── gpu-descriptor v0.2.2
│       │           │   │   │   ├── bitflags v1.3.2
│       │           │   │   │   ├── gpu-descriptor-types v0.1.1
│       │           │   │   │   │   └── bitflags v1.3.2
│       │           │   │   │   └── hashbrown v0.11.2
│       │           │   │   │       └── ahash v0.7.6 (*)
│       │           │   │   ├── inplace_it v0.3.3
│       │           │   │   ├── khronos-egl v4.1.0
│       │           │   │   │   ├── libc v0.2.125
│       │           │   │   │   └── libloading v0.7.3 (*)
│       │           │   │   ├── libloading v0.7.3 (*)
│       │           │   │   ├── log v0.4.16 (*)
│       │           │   │   ├── naga v0.8.5 (*)
│       │           │   │   ├── parking_lot v0.11.2 (*)
│       │           │   │   ├── profiling v1.0.5
│       │           │   │   ├── raw-window-handle v0.4.3 (*)
│       │           │   │   ├── renderdoc-sys v0.7.1
│       │           │   │   ├── thiserror v1.0.31 (*)
│       │           │   │   └── wgpu-types v0.12.0
│       │           │   │       └── bitflags v1.3.2
│       │           │   └── wgpu-types v0.12.0 (*)
│       │           │   [build-dependencies]
│       │           │   └── cfg_aliases v0.1.1
│       │           ├── wgpu-hal v0.12.5 (*)
│       │           └── wgpu-types v0.12.0 (*)
│       ├── bevy_derive v0.6.0 (proc-macro) (*)
│       ├── bevy_diagnostic v0.6.0 (*)
│       ├── bevy_ecs v0.6.1 (*)
│       ├── bevy_gilrs v0.6.0
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   ├── bevy_input v0.6.0
│       │   │   ├── bevy_app v0.6.0 (*)
│       │   │   ├── bevy_ecs v0.6.1 (*)
│       │   │   ├── bevy_math v0.6.0 (*)
│       │   │   └── bevy_utils v0.6.0 (*)
│       │   ├── bevy_utils v0.6.0 (*)
│       │   └── gilrs v0.8.2
│       │       ├── fnv v1.0.7
│       │       ├── gilrs-core v0.3.2
│       │       │   ├── libc v0.2.125
│       │       │   ├── libudev-sys v0.1.4
│       │       │   │   └── libc v0.2.125
│       │       │   │   [build-dependencies]
│       │       │   │   └── pkg-config v0.3.25
│       │       │   ├── log v0.4.16 (*)
│       │       │   ├── nix v0.23.1 (*)
│       │       │   ├── uuid v0.8.2 (*)
│       │       │   └── vec_map v0.8.2
│       │       ├── log v0.4.16 (*)
│       │       ├── uuid v0.8.2 (*)
│       │       └── vec_map v0.8.2
│       ├── bevy_gltf v0.6.0
│       │   ├── anyhow v1.0.57
│       │   ├── base64 v0.13.0
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_asset v0.6.0 (*)
│       │   ├── bevy_core v0.6.0 (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   ├── bevy_log v0.6.0 (*)
│       │   ├── bevy_math v0.6.0 (*)
│       │   ├── bevy_pbr v0.6.1
│       │   │   ├── bevy_app v0.6.0 (*)
│       │   │   ├── bevy_asset v0.6.0 (*)
│       │   │   ├── bevy_core v0.6.0 (*)
│       │   │   ├── bevy_core_pipeline v0.6.0 (*)
│       │   │   ├── bevy_ecs v0.6.1 (*)
│       │   │   ├── bevy_math v0.6.0 (*)
│       │   │   ├── bevy_reflect v0.6.0 (*)
│       │   │   ├── bevy_render v0.6.1 (*)
│       │   │   ├── bevy_transform v0.6.0 (*)
│       │   │   ├── bevy_utils v0.6.0 (*)
│       │   │   ├── bevy_window v0.6.0 (*)
│       │   │   ├── bitflags v1.3.2
│       │   │   └── bytemuck v1.9.1 (*)
│       │   ├── bevy_reflect v0.6.0 (*)
│       │   ├── bevy_render v0.6.1 (*)
│       │   ├── bevy_scene v0.6.0
│       │   │   ├── anyhow v1.0.57
│       │   │   ├── bevy_app v0.6.0 (*)
│       │   │   ├── bevy_asset v0.6.0 (*)
│       │   │   ├── bevy_ecs v0.6.1 (*)
│       │   │   ├── bevy_reflect v0.6.0 (*)
│       │   │   ├── bevy_transform v0.6.0 (*)
│       │   │   ├── bevy_utils v0.6.0 (*)
│       │   │   ├── ron v0.7.0
│       │   │   │   ├── base64 v0.13.0
│       │   │   │   ├── bitflags v1.3.2
│       │   │   │   └── serde v1.0.137 (*)
│       │   │   ├── serde v1.0.137 (*)
│       │   │   ├── thiserror v1.0.31 (*)
│       │   │   └── uuid v0.8.2 (*)
│       │   ├── bevy_transform v0.6.0 (*)
│       │   ├── bevy_utils v0.6.0 (*)
│       │   ├── gltf v0.16.0
│       │   │   ├── byteorder v1.4.3
│       │   │   ├── gltf-json v0.16.0
│       │   │   │   ├── gltf-derive v0.16.0 (proc-macro)
│       │   │   │   │   ├── inflections v1.1.1
│       │   │   │   │   ├── proc-macro2 v1.0.37 (*)
│       │   │   │   │   ├── quote v1.0.18 (*)
│       │   │   │   │   └── syn v1.0.92 (*)
│       │   │   │   ├── serde v1.0.137 (*)
│       │   │   │   ├── serde_derive v1.0.137 (proc-macro) (*)
│       │   │   │   └── serde_json v1.0.80
│       │   │   │       ├── itoa v1.0.1
│       │   │   │       ├── ryu v1.0.9
│       │   │   │       └── serde v1.0.137 (*)
│       │   │   └── lazy_static v1.4.0
│       │   ├── percent-encoding v2.1.0
│       │   └── thiserror v1.0.31 (*)
│       ├── bevy_input v0.6.0 (*)
│       ├── bevy_log v0.6.0 (*)
│       ├── bevy_math v0.6.0 (*)
│       ├── bevy_pbr v0.6.1 (*)
│       ├── bevy_reflect v0.6.0 (*)
│       ├── bevy_render v0.6.1 (*)
│       ├── bevy_scene v0.6.0 (*)
│       ├── bevy_sprite v0.6.0
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_asset v0.6.0 (*)
│       │   ├── bevy_core v0.6.0 (*)
│       │   ├── bevy_core_pipeline v0.6.0 (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   ├── bevy_log v0.6.0 (*)
│       │   ├── bevy_math v0.6.0 (*)
│       │   ├── bevy_reflect v0.6.0 (*)
│       │   ├── bevy_render v0.6.1 (*)
│       │   ├── bevy_transform v0.6.0 (*)
│       │   ├── bevy_utils v0.6.0 (*)
│       │   ├── bitflags v1.3.2
│       │   ├── bytemuck v1.9.1 (*)
│       │   ├── copyless v0.1.5
│       │   ├── guillotiere v0.6.2
│       │   │   ├── euclid v0.22.7
│       │   │   │   └── num-traits v0.2.14 (*)
│       │   │   └── svg_fmt v0.4.1
│       │   ├── rectangle-pack v0.4.2
│       │   ├── serde v1.0.137 (*)
│       │   └── thiserror v1.0.31 (*)
│       ├── bevy_tasks v0.6.0 (*)
│       ├── bevy_text v0.6.0
│       │   ├── ab_glyph v0.2.15
│       │   │   ├── ab_glyph_rasterizer v0.1.5
│       │   │   └── owned_ttf_parser v0.15.0
│       │   │       └── ttf-parser v0.15.0
│       │   ├── anyhow v1.0.57
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_asset v0.6.0 (*)
│       │   ├── bevy_core v0.6.0 (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   ├── bevy_math v0.6.0 (*)
│       │   ├── bevy_reflect v0.6.0 (*)
│       │   ├── bevy_render v0.6.1 (*)
│       │   ├── bevy_sprite v0.6.0 (*)
│       │   ├── bevy_transform v0.6.0 (*)
│       │   ├── bevy_utils v0.6.0 (*)
│       │   ├── bevy_window v0.6.0 (*)
│       │   ├── glyph_brush_layout v0.2.3
│       │   │   ├── ab_glyph v0.2.15 (*)
│       │   │   ├── approx v0.5.1
│       │   │   │   └── num-traits v0.2.14 (*)
│       │   │   └── xi-unicode v0.3.0
│       │   ├── serde v1.0.137 (*)
│       │   └── thiserror v1.0.31 (*)
│       ├── bevy_transform v0.6.0 (*)
│       ├── bevy_ui v0.6.1
│       │   ├── bevy_app v0.6.0 (*)
│       │   ├── bevy_asset v0.6.0 (*)
│       │   ├── bevy_core v0.6.0 (*)
│       │   ├── bevy_core_pipeline v0.6.0 (*)
│       │   ├── bevy_derive v0.6.0 (proc-macro) (*)
│       │   ├── bevy_ecs v0.6.1 (*)
│       │   ├── bevy_input v0.6.0 (*)
│       │   ├── bevy_log v0.6.0 (*)
│       │   ├── bevy_math v0.6.0 (*)
│       │   ├── bevy_reflect v0.6.0 (*)
│       │   ├── bevy_render v0.6.1 (*)
│       │   ├── bevy_sprite v0.6.0 (*)
│       │   ├── bevy_text v0.6.0 (*)
│       │   ├── bevy_transform v0.6.0 (*)
│       │   ├── bevy_utils v0.6.0 (*)
│       │   ├── bevy_window v0.6.0 (*)
│       │   ├── bytemuck v1.9.1 (*)
│       │   ├── serde v1.0.137 (*)
│       │   ├── smallvec v1.8.0 (*)
│       │   └── stretch v0.3.2
│       │       ├── lazy_static v1.4.0
│       │       └── libm v0.1.4
│       ├── bevy_utils v0.6.0 (*)
│       ├── bevy_window v0.6.0 (*)
│       └── bevy_winit v0.6.1
│           ├── approx v0.5.1 (*)
│           ├── bevy_app v0.6.0 (*)
│           ├── bevy_ecs v0.6.1 (*)
│           ├── bevy_input v0.6.0 (*)
│           ├── bevy_math v0.6.0 (*)
│           ├── bevy_utils v0.6.0 (*)
│           ├── bevy_window v0.6.0 (*)
│           ├── raw-window-handle v0.4.3 (*)
│           └── winit v0.26.1
│               ├── bitflags v1.3.2
│               ├── instant v0.1.12 (*)
│               ├── lazy_static v1.4.0
│               ├── libc v0.2.125
│               ├── log v0.4.16 (*)
│               ├── mio v0.8.2
│               │   ├── libc v0.2.125
│               │   └── log v0.4.16 (*)
│               ├── parking_lot v0.11.2 (*)
│               ├── percent-encoding v2.1.0
│               ├── raw-window-handle v0.4.3 (*)
│               └── x11-dl v2.19.1
│                   ├── lazy_static v1.4.0
│                   └── libc v0.2.125
│                   [build-dependencies]
│                   └── pkg-config v0.3.25
├── bevy_prototype_lyon v0.4.0
│   ├── bevy v0.6.1 (*)
│   ├── lyon_tessellation v0.17.10
│   │   ├── float_next_after v0.1.5
│   │   │   └── num-traits v0.2.14 (*)
│   │   └── lyon_path v0.17.7
│   │       └── lyon_geom v0.17.6
│   │           ├── arrayvec v0.5.2
│   │           ├── euclid v0.22.7 (*)
│   │           └── num-traits v0.2.14 (*)
│   └── svgtypes v0.5.0
│       ├── float-cmp v0.5.3
│       └── siphasher v0.2.3
├── color-eyre v0.6.1
│   ├── backtrace v0.3.65
│   │   ├── addr2line v0.17.0
│   │   │   └── gimli v0.26.1
│   │   ├── cfg-if v1.0.0
│   │   ├── libc v0.2.125
│   │   ├── miniz_oxide v0.5.1
│   │   │   └── adler v1.0.2
│   │   ├── object v0.28.3
│   │   │   └── memchr v2.5.0
│   │   └── rustc-demangle v0.1.21
│   │   [build-dependencies]
│   │   └── cc v1.0.73
│   ├── color-spantrace v0.2.0
│   │   ├── once_cell v1.10.0
│   │   ├── owo-colors v3.4.0
│   │   ├── tracing-core v0.1.26 (*)
│   │   └── tracing-error v0.2.0
│   │       ├── tracing v0.1.34 (*)
│   │       └── tracing-subscriber v0.3.11 (*)
│   ├── eyre v0.6.8
│   │   ├── indenter v0.3.3
│   │   └── once_cell v1.10.0
│   ├── indenter v0.3.3
│   ├── once_cell v1.10.0
│   ├── owo-colors v3.4.0
│   └── tracing-error v0.2.0 (*)
├── derive_more v0.99.17 (proc-macro) (*)
├── eyre v0.6.8 (*)
├── lazy_static v1.4.0
├── rand v0.8.5 (*)
└── redacted_lib v0.0.0 (/path)
    ├── redacted_lib v0.0.0 (/path) (*)
    ├── redacted_lib v0.0.0 (/path) (*)
    ├── crossbeam-channel v0.5.4 (*)
    ├── derive_more v0.99.17 (proc-macro) (*)
    ├── enum_dispatch v0.3.8 (proc-macro)
    │   ├── once_cell v1.10.0
    │   ├── proc-macro2 v1.0.37 (*)
    │   ├── quote v1.0.18 (*)
    │   └── syn v1.0.92 (*)
    ├── eyre v0.6.8 (*)
    ├── itertools v0.10.3
    │   └── either v1.6.1
    ├── keyframe v1.0.4
    │   ├── mint v0.5.9
    │   └── num-traits v0.2.14 (*)
    ├── log v0.4.16 (*)
    ├── paste v1.0.7 (proc-macro)
    ├── rand v0.8.5 (*)
    ├── ref-cast v1.0.7
    │   └── ref-cast-impl v1.0.7 (proc-macro)
    │       ├── proc-macro2 v1.0.37 (*)
    │       ├── quote v1.0.18 (*)
    │       └── syn v1.0.92 (*)
    ├── redacted_lib v0.0.0 (/path)
    │   ├── paste v1.0.7 (proc-macro)
    │   ├── redacted_macro v0.0.0 (proc-macro) (/path)
    │   │   ├── find-crate v0.6.3
    │   │   │   └── toml v0.5.9 (*)
    │   │   ├── lazy_static v1.4.0
    │   │   ├── proc-macro2 v1.0.37 (*)
    │   │   ├── quote v1.0.18 (*)
    │   │   └── syn v1.0.92 (*)
    │   └── safer-ffi v0.0.10
    │       ├── inventory v0.1.11
    │       │   ├── ctor v0.1.22 (proc-macro)
    │       │   │   ├── quote v1.0.18 (*)
    │       │   │   └── syn v1.0.92 (*)
    │       │   ├── ghost v0.1.4 (proc-macro)
    │       │   │   ├── proc-macro2 v1.0.37 (*)
    │       │   │   ├── quote v1.0.18 (*)
    │       │   │   └── syn v1.0.92 (*)
    │       │   └── inventory-impl v0.1.11 (proc-macro)
    │       │       ├── proc-macro2 v1.0.37 (*)
    │       │       ├── quote v1.0.18 (*)
    │       │       └── syn v1.0.92 (*)
    │       ├── libc v0.2.125
    │       ├── mini_paste v0.1.11
    │       │   └── mini_paste-proc_macro v0.1.11 (proc-macro)
    │       ├── proc-macro-hack v0.5.19 (proc-macro)
    │       ├── require_unsafe_in_body v0.2.1 (proc-macro)
    │       │   ├── proc-macro2 v1.0.37 (*)
    │       │   ├── quote v1.0.18 (*)
    │       │   └── syn v1.0.92 (*)
    │       └── safer_ffi-proc_macro v0.0.10 (proc-macro)
    │           ├── proc-macro-hack v0.5.19 (proc-macro)
    │           ├── proc-macro2 v1.0.37 (*)
    │           ├── quote v1.0.18 (*)
    │           └── syn v1.0.92 (*)
    ├── safer-ffi v0.0.10 (*)
    ├── redacted_macro v0.1.0 (proc-macro) (/path)
    │   ├── lazy_static v1.4.0
    │   ├── proc-macro2 v1.0.37 (*)
    │   ├── quote v1.0.18 (*)
    │   └── syn v1.0.92 (*)
    │   [dev-dependencies]
    │   └── redacted_lib v0.0.0 (/path) (*)
    ├── tracing v0.1.34 (*)
    └── typemap v0.3.3
        └── unsafe-any v0.4.2
            └── traitobject v0.1.0

redacted_executable v0.0.0 (/path)
├── handlebars v4.2.2
│   ├── log v0.4.16 (*)
│   ├── pest v2.1.3
│   │   └── ucd-trie v0.1.3
│   ├── pest_derive v2.1.0 (proc-macro)
│   │   ├── pest v2.1.3 (*)
│   │   └── pest_generator v2.1.3
│   │       ├── pest v2.1.3 (*)
│   │       ├── pest_meta v2.1.3
│   │       │   ├── maplit v1.0.2
│   │       │   └── pest v2.1.3 (*)
│   │       │   [build-dependencies]
│   │       │   └── sha-1 v0.8.2
│   │       │       ├── block-buffer v0.7.3
│   │       │       │   ├── block-padding v0.1.5
│   │       │       │   │   └── byte-tools v0.3.1
│   │       │       │   ├── byte-tools v0.3.1
│   │       │       │   ├── byteorder v1.4.3
│   │       │       │   └── generic-array v0.12.4
│   │       │       │       └── typenum v1.15.0
│   │       │       ├── digest v0.8.1
│   │       │       │   └── generic-array v0.12.4 (*)
│   │       │       ├── fake-simd v0.1.2
│   │       │       └── opaque-debug v0.2.3
│   │       ├── proc-macro2 v1.0.37 (*)
│   │       ├── quote v1.0.18 (*)
│   │       └── syn v1.0.92 (*)
│   ├── quick-error v2.0.1
│   ├── serde v1.0.137 (*)
│   └── serde_json v1.0.80 (*)
├── lazy_static v1.4.0
├── miette v4.6.0
│   ├── atty v0.2.14
│   │   └── libc v0.2.125
│   ├── backtrace v0.3.65 (*)
│   ├── miette-derive v4.6.0 (proc-macro)
│   │   ├── proc-macro2 v1.0.37 (*)
│   │   ├── quote v1.0.18 (*)
│   │   └── syn v1.0.92 (*)
│   ├── once_cell v1.10.0
│   ├── owo-colors v3.4.0
│   ├── supports-color v1.3.0
│   │   ├── atty v0.2.14 (*)
│   │   └── is_ci v1.1.1
│   ├── supports-hyperlinks v1.2.0
│   │   └── atty v0.2.14 (*)
│   ├── supports-unicode v1.0.2
│   │   └── atty v0.2.14 (*)
│   ├── terminal_size v0.1.17
│   │   └── libc v0.2.125
│   ├── textwrap v0.15.0
│   │   ├── smawk v0.3.1
│   │   ├── unicode-linebreak v0.1.2
│   │   │   [build-dependencies]
│   │   │   └── regex v1.5.5 (*)
│   │   └── unicode-width v0.1.9
│   ├── thiserror v1.0.31 (*)
│   └── unicode-width v0.1.9
├── serde v1.0.137 (*)
└── syn v1.0.92
    ├── proc-macro2 v1.0.37 (*)
    ├── quote v1.0.18 (*)
    └── unicode-xid v0.2.3

Possible Solution(s)

No response

Notes

Version

Running inside of WSL2 on build 19044.1706 of windows 10 pro.

My CPU has 12 cores/24 threads

❯ cargo version --verbose
cargo 1.63.0-nightly (3f052d8ee 2022-05-12)
release: 1.63.0-nightly
commit-hash: 3f052d8eed98c6a24f8b332fb2e6e6249d12d8c1
commit-date: 2022-05-12
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1n)
os: Ubuntu 20.04 (focal) [64-bit]
ehuss commented 2 years ago

Transferred to rust-lang/rust as this appears to be an error originating in rustc during linking.

the8472 commented 2 years ago

Some environments set a fairly low (1024) soft ulimit for open files while having a higher hard limit, you can try bumping it

# check current soft limit
ulimit -n
# check hard limit
ulimit -Hn
# set new soft limit
ulimit -n 4096
bjorn3 commented 10 months ago

@TheButlah does the above suggestion work?

TheButlah commented 10 months ago

I am not able to test unfortuantely - I no longer work on that codebase. However, the code became available here: https://github.com/tomthecarrot/constellation/.

The ulimit fix sounds quite likely to resolve it. It would be nice however, if rustc could detect the limit and not try to open more files than that.

bjorn3 commented 10 months ago

I am not able to test unfortuantely - I no longer work on that codebase.

:+1:

It would be nice however, if rustc could detect the limit and not try to open more files than that.

Or alternatively raise the limit to match the hard limit. The soft limit only exists for compatibility with programs that use the select syscall which fails for fd's higher than 1023. Systemd raises the hard limit to a very high number (1048576) by default to allow programs that don't use select to raise their soft limit as necessary.