all tests pass when I run them through cargo t. But when I run them through make all I get errors like the one below. I think the problem is that too many tests are running in parallel, and this somehow causes an error from the operating system. Removing the RUST_BACKTRACE=1 environment variable that is set in Makefile did not fix the problem.
failures:
---- peer_loop::peer_loop_tests::prevent_ram_exhaustion_test stdout ----
2023-09-26T20:26:11.368298Z ERROR prevent_ram_exhaustion_test: neptune_core::models::state::wallet::wallet_state: Could not open wallet database: Status { code: IOError, err: "children: IOError: Too many open files (os error 24): /tmp/neptune-unit-tests/bUPnNiLJjn30CKkX/alpha/databases/wallet" }
thread 'peer_loop::peer_loop_tests::prevent_ram_exhaustion_test' panicked at 'explicit panic', src/models/state/wallet/wallet_state.rs:168:17
stack backtrace:
0: rust_begin_unwind
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:67:14
2: core::panicking::panic
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:117:5
3: neptune_core::models::state::wallet::wallet_state::WalletState::new_from_wallet_secret::{{closure}}
at ./src/models/state/wallet/wallet_state.rs:168:17
4: neptune_core::tests::shared::get_mock_wallet_state::{{closure}}
at ./src/tests/shared.rs:1043:78
5: neptune_core::tests::shared::get_mock_global_state::{{closure}}
at ./src/tests/shared.rs:222:62
6: neptune_core::tests::shared::get_test_genesis_setup::{{closure}}
at ./src/tests/shared.rs:249:66
7: neptune_core::peer_loop::peer_loop_tests::prevent_ram_exhaustion_test::{{closure}}
at ./src/peer_loop.rs:1695:55
8: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/future/future.rs:125:9
9: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/future/future.rs:125:9
10: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:665:57
11: tokio::runtime::coop::with_budget
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/coop.rs:107:5
12: tokio::runtime::coop::budget
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/coop.rs:73:5
13: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:665:25
14: tokio::runtime::scheduler::current_thread::Context::enter
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:410:19
15: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:664:36
16: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:743:68
17: tokio::runtime::context::scoped::Scoped<T>::set
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/context/scoped.rs:40:9
18: tokio::runtime::context::set_scheduler::{{closure}}
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/context.rs:176:26
19: std::thread::local::LocalKey<T>::try_with
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/thread/local.rs:270:16
20: std::thread::local::LocalKey<T>::with
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/thread/local.rs:246:9
21: tokio::runtime::context::set_scheduler
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/context.rs:176:9
22: tokio::runtime::scheduler::current_thread::CoreGuard::enter
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:743:27
23: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:652:19
24: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:175:28
25: tokio::runtime::context::runtime::enter_runtime
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/context/runtime.rs:65:16
26: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/current_thread/mod.rs:167:9
27: tokio::runtime::runtime::Runtime::block_on
at /home/thv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/runtime.rs:347:47
28: neptune_core::peer_loop::peer_loop_tests::prevent_ram_exhaustion_test
at ./src/peer_loop.rs:1770:9
29: neptune_core::peer_loop::peer_loop_tests::prevent_ram_exhaustion_test::{{closure}}
at ./src/peer_loop.rs:1690:47
30: core::ops::function::FnOnce::call_once
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:250:5
31: core::ops::function::FnOnce::call_once
at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failures:
peer_loop::peer_loop_tests::prevent_ram_exhaustion_test
test result: FAILED. 194 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 12.87s
error: test failed, to rerun pass `--lib`
make: *** [Makefile:58: test] Error 101
all tests pass when I run them through
cargo t
. But when I run them throughmake all
I get errors like the one below. I think the problem is that too many tests are running in parallel, and this somehow causes an error from the operating system. Removing theRUST_BACKTRACE=1
environment variable that is set inMakefile
did not fix the problem.