reth
reth copied to clipboard
Lockfile tests failing
Describe the bug
The following tests in lockfile::tests::test_drop_lock and lockfile::tests::test_lock in crates/storage/db/src/lockfile.rs are failing.
Steps to reproduce
Run make test on main branch. Observe the following error:
failures:
---- lockfile::tests::test_drop_lock stdout ----
thread 'lockfile::tests::test_drop_lock' panicked at crates/storage/db/src/lockfile.rs:198:9:
assertion failed: lock_file.exists()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- lockfile::tests::test_lock stdout ----
thread 'lockfile::tests::test_lock' panicked at crates/storage/db/src/lockfile.rs:153:54:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }
failures:
lockfile::tests::test_drop_lock
lockfile::tests::test_lock
test result: FAILED. 39 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.65s
Node logs
No response
Platform(s)
Mac (Apple Silicon)
What version/commit are you on?
1.0.5-dev
What database version are you on?
N/A
Which chain / network are you on?
N/A
What type of node are you running?
Archive (default)
What prune config do you use, if any?
No response
If you've built Reth from source, provide the full command you used
No response
Code of Conduct
- [X] I agree to follow the Code of Conduct
I think, at least for test_drop_lock , this is because of the following line:
https://github.com/paradigmxyz/reth/blob/b1d6e27e3f147678243423a35593c8357a6dabaa/crates/storage/db/src/lockfile.rs#L37-L38
as we don't use
Ok(Self(Arc::new(StorageLockInner::new(file_path)?)))
I imagine because of the comment (ef tests overload) so that it does not creates the lock file/writes into it.
the same issue.
seems like locally there is issues with clean up, possibly also with concurrency running different tests @Rjected
we should probably re-write the make test command to run nextest instead @mattsse ? ref https://github.com/paradigmxyz/reth/pull/9403
This issue is stale because it has been open for 21 days with no activity.
It seems that the issue is related to this PR: https://github.com/paradigmxyz/reth/pull/8753
With this change in testing/ef-tests/Cargo.toml cargo test --workspace passes:
- reth-db = { workspace = true, features = ["mdbx", "test-utils", "disable-lock"] }
+ reth-db = { workspace = true, features = ["mdbx", "test-utils"] }
It seems that the issue is related to this PR: #8753
With this change in testing/ef-tests/Cargo.toml
cargo test --workspacepasses:- reth-db = { workspace = true, features = ["mdbx", "test-utils", "disable-lock"] } + reth-db = { workspace = true, features = ["mdbx", "test-utils"] }
@emhane has a pr https://github.com/paradigmxyz/reth/pull/10636, but I don't know why she closed it.
This issue is stale because it has been open for 21 days with no activity.