iotaledger / stronghold.rs

Stronghold is a secret management engine written in rust.

Home Page:https://wiki.iota.org/stronghold.rs/getting_started

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EngineError(IoError(Os { code: 5, kind: PermissionDenied

Thoralf-M opened this issue · comments

Bug description

When running the tests in wallet.rs I sometimes get a panic, but not exactly sure why could too many open files or something like that cause it?

Rust version

  • Rust version: rustc 1.53.0 (53cb7b09b 2021-06-17)

Stronghold version

  • Stronghold version (version number, commit, or branch): iota_stronghold-0.4.1

Hardware specification

  • Operating system: Win 10
  • RAM: 16 GB
  • Cores: 16
  • Device: Desktop

Steps To reproduce the bug

Not sure, just executed cargo test --all-features --release -- --nocapture a few times in the dev branch of https://github.com/iotaledger/wallet.rs, also executed it as administrator

Errors

thread 'pool-thread-#5' panicked at 'Error at \.cargo\registry\src\github.com-1ecc6299db9ec823\iota_stronghold-0.4.1\src\actors\snapshot.rs:136: EngineError(IoError(Os { code: 5, kind: PermissionDenied, message: "Zugriff verweigert" }))', \.cargo\registry\src\github.com-1ecc6299db9ec823\iota_stronghold-0.4.1\src\actors\snapshot.rs:136:22
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b\/library\std\src\panicking.rs:493
   1: core::panicking::panic_fmt
             at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b\/library\core\src\panicking.rs:92
   2: core::result::unwrap_failed
             at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b\/library\core\src\result.rs:1355
   3: iota_stronghold::actors::snapshot::<impl riker::actor::Receive<iota_stronghold::actors::snapshot::SMsg> for iota_stronghold::state::snapshot::Snapshot>::receive
   4: riker::kernel::mailbox::run_mailbox
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   6: futures_executor::thread_pool::PoolState::work

Hello @Thoralf-M, does the bug still occur?

Hi @felsweg-iota, yes the issue is still there if I run it as admin, if I run it as normal user I get

thread 'stronghold::tests::password_expires' panicked at 'forking test failed: SpawnError(Os { code: 225, kind: Uncategorized, message: "Der Vorgang konnte nicht erfolgreich abgeschlossen werden, da die Datei einen Virus oder möglicherweise unerwünschte Software enthält." })', src\stronghold.rs:685:5

not sure if that's related

Hi @Thoralf-M , thanks for confirming. This bug relates to the currently released version on crates.io of Stronghold. We haven't pushed a new version, yet. May I ask you to use the latest revision from the dev branch, and see if the bug still exists? Thanks you.

Does this happen on any other test aside from the stronghold::tests::password_expires test? I tried to replicate it with windows 11 but had no luck. Maybe try disabling windows defender and see if the error still occurs.

@Thoralf-M I went through and replicated this error and found that it was an issue with windows defender. If you disable windows defender or exclude the test folder from the windows defender list, it will work without an issue.

Thanks @tensor-programming for clearing up. @Thoralf-M can you confirm?

Follow-Up:
@Thoralf-M do you mind confirming the solution provided by @tensor-programming? Otherwise I would like to close this issue. Thanks!

Sry for taking so long, can confirm windows defender was the problem