reth icon indicating copy to clipboard operation
reth copied to clipboard

Lockfile tests failing

Open emnul opened this issue 1 year ago • 7 comments

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

emnul avatar Aug 27 '24 14:08 emnul

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.

tcoratger avatar Aug 27 '24 20:08 tcoratger

the same issue.

nkysg avatar Aug 29 '24 17:08 nkysg

seems like locally there is issues with clean up, possibly also with concurrency running different tests @Rjected

emhane avatar Aug 30 '24 20:08 emhane

we should probably re-write the make test command to run nextest instead @mattsse ? ref https://github.com/paradigmxyz/reth/pull/9403

emhane avatar Aug 30 '24 21:08 emhane

This issue is stale because it has been open for 21 days with no activity.

github-actions[bot] avatar Sep 21 '24 01:09 github-actions[bot]

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"] }

Thegaram avatar Sep 27 '24 15:09 Thegaram

It seems that the issue is related to this PR: #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"] }

@emhane has a pr https://github.com/paradigmxyz/reth/pull/10636, but I don't know why she closed it.

nkysg avatar Sep 28 '24 23:09 nkysg

This issue is stale because it has been open for 21 days with no activity.

github-actions[bot] avatar Oct 20 '24 02:10 github-actions[bot]