Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many test failures when using Windows Subsystem for Linux #78

Open
mykmelez opened this issue Sep 4, 2018 · 2 comments
Open

many test failures when using Windows Subsystem for Linux #78

mykmelez opened this issue Sep 4, 2018 · 2 comments

Comments

@mykmelez
Copy link
Contributor

mykmelez commented Sep 4, 2018

On Windows, when using Windows Subsystem for Linux (with the Ubuntu distro), I see a bunch of test failures:

$ cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 5.96s
     Running target/debug/deps/rkv-5955ce6badfae226

running 22 tests
test env::tests::test_concurrent_read_transactions_prohibited ... ok
test env::tests::test_blob ... FAILED
test env::tests::test_delete_value ... FAILED
test env::tests::test_isolation ... FAILED
test env::tests::test_iter ... FAILED
test env::tests::test_iter_from_key_greater_than_existing ... FAILED
test env::tests::test_multiple_store_iter ... FAILED
test env::tests::test_multiple_store_read_write ... FAILED
test env::tests::test_open ... FAILED
test env::tests::test_open_a_missing_store ... ok
test env::tests::test_open_fail_with_badrslot ... ok
test env::tests::test_open_fails ... ok
test env::tests::test_open_from_env ... FAILED
test env::tests::test_open_store_for_read ... FAILED
test env::tests::test_open_with_capacity ... FAILED
test env::tests::test_read_before_write_num ... FAILED
test env::tests::test_read_before_write_str ... FAILED
test env::tests::test_round_trip_and_transactions ... FAILED
thread '<unnamed>' panicked at 'test integer::tests::test_integer_keys ... written: LmdbError(Corrupted)FAILED',
libcore/result.rs:test manager::tests::test_same ... 945ok:
5
test manager::tests::test_same_with_capacity ... thread 'ok<unnamed>
' panicked at 'rkv: "PoisonError { inner: .. }"', libcore/result.rs:945:5
thread '<unnamed>' panicked at 'rkv: "PoisonError { inner: .. }"', libcore/result.rs:945:5
thread '<unnamed>' panicked at 'rkv: "PoisonError { inner: .. }"', libcore/result.rs:945:5
thread '<unnamed>' panicked at 'rkv: "PoisonError { inner: .. }"', libcore/result.rs:945:5
thread '<unnamed>' panicked at 'rkv: "PoisonError { inner: .. }"', libcore/result.rs:945:5
thread '<unnamed>' panicked at 'rkv: "PoisonError { inner: .. }"', libcore/result.rs:945:5
thread '<unnamed>' panicked at 'rkv: "PoisonError { inner: .. }"', libcore/result.rs:945:5
thread '<unnamed>test env::tests::test_store_multiple_thread ... ' panicked at 'FAILEDrkv: "PoisonError { inner: .. }"
',
failures:
libcore/result.rs
:---- env::tests::test_blob stdout ----
thread 'env::tests::test_blob' panicked at 'read: LmdbError(BadTxn)', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- env::tests::test_delete_value stdout ----
thread 'env::tests::test_delete_value' panicked at 'wrote: LmdbError(BadTxn)', libcore/result.rs:945:5
note: Panic did not include expected string 'not yet implemented'
---- env::tests::test_isolation stdout ----
thread 'env::tests::test_isolation' panicked at 'wrote: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_iter stdout ----
thread 'env::tests::test_iter' panicked at 'Unexpected LMDB error BadTxn.', /home/myk/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/lmdb-rkv-0.8.2/src/cursor.rs:263:17

---- env::tests::test_iter_from_key_greater_than_existing stdout ----
thread 'env::tests::test_iter_from_key_greater_than_existing' panicked at 'wrote: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_multiple_store_iter stdout ----
thread 'env::tests::test_multiple_store_iter' panicked at 'opened: LmdbError(Corrupted)', libcore/result.rs:945:5

---- env::tests::test_multiple_store_read_write stdout ----
thread 'env::tests::test_multiple_store_read_write' panicked at 'opened: LmdbError(Corrupted)', libcore/result.rs:945:5

---- env::tests::test_open stdout ----
Root path: "/tmp/test_openBkPsg4"
thread 'env::tests::test_open' panicked at 'success but no value: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_open_from_env stdout ----
Root path: "/tmp/test_open_from_envuAftlz"
thread 'env::tests::test_open_from_env' panicked at 'success but no value: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_open_store_for_read stdout ----
thread 'env::tests::test_open_store_for_read' panicked at 'write: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_open_with_capacity stdout ----
Root path: "/tmp/test_open_with_capacityvY2MVw"
thread 'env::tests::test_open_with_capacity' panicked at 'success but no value: LmdbError(BadTxn)', libcore/result.rs:945:5
note: Panic did not include expected string 'opened: LmdbError(DbsFull)'
---- env::tests::test_read_before_write_num stdout ----
thread 'env::tests::test_read_before_write_num' panicked at 'read: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_read_before_write_str stdout ----
thread 'env::tests::test_read_before_write_str' panicked at 'read: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_round_trip_and_transactions stdout ----
thread 'env::tests::test_round_trip_and_transactions' panicked at 'wrote: LmdbError(BadTxn)', libcore/result.rs:945:5

---- integer::tests::test_integer_keys stdout ----
thread 'integer::tests::test_integer_keys' panicked at 'write: LmdbError(BadTxn)', libcore/result.rs:945:5

---- env::tests::test_store_multiple_thread stdout ----
thread 'env::tests::test_store_multiple_thread' panicked at 'joined: Any', libcore/result.rs:945:5

945
failures:
:    env::tests::test_blob
5    env::tests::test_delete_value

    env::tests::test_isolation
    env::tests::test_iter
    env::tests::test_iter_from_key_greater_than_existing
    env::tests::test_multiple_store_iter
    env::tests::test_multiple_store_read_write
    env::tests::test_open
    env::tests::test_open_from_env
    env::tests::test_open_store_for_read
    env::tests::test_open_with_capacity
    env::tests::test_read_before_write_num
    env::tests::test_read_before_write_str
    env::tests::test_round_trip_and_transactions
    env::tests::test_store_multiple_thread
    integer::tests::test_integer_keys

test result: FAILED. 6 passed; 16 failed; 0 ignored; 0 measured; 0 filtered out

I don't see these on Windows outside of WSL, however; nor on Ubuntu running outside of Windows (in a virtual machine on a macOS host).

@mykmelez
Copy link
Contributor Author

mykmelez commented Sep 4, 2018

I see similar failures when testing lmdb-rs itself, so this looks like an upstream issue:

$ cargo +nightly test
   Compiling cc v1.0.23
   Compiling pkg-config v0.3.14
   Compiling libc v0.2.43
   Compiling bitflags v1.0.4
   Compiling remove_dir_all v0.5.1
   Compiling byteorder v1.2.6
   Compiling lmdb-sys v0.8.0
   Compiling rand v0.4.3
   Compiling tempdir v0.3.7
   Compiling lmdb-rkv v0.8.2 (file:///mnt/c/Users/myk/Projects/lmdb-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 18.81s
     Running target/debug/deps/lmdb-fe4a304767f7db47

running 32 tests
test cursor::test::bench_get_seq_iter ... FAILED
test cursor::test::bench_get_seq_cursor ... FAILED
test cursor::test::test_get ... ok
test cursor::test::bench_get_seq_raw ... FAILED
test cursor::test::test_get_dup ... ok
test cursor::test::test_get_dupfixed ... ok
test cursor::test::test_iter ... FAILED
test cursor::test::test_iter_dup ... FAILED
test cursor::test::test_iter_empty_database ... ok
test cursor::test::test_iter_empty_dup_database ... ok
test cursor::test::test_put_del ... ok
test environment::test::test_begin_txn ... ok
test environment::test::test_close_database ... FAILED
test environment::test::test_create_db ... ok
test environment::test::test_open ... ok
test environment::test::test_open_db ... ok
test environment::test::test_stat ... FAILED
test error::test::test_description ... ok
test environment::test::test_sync ... ok
test test_utils::issue_21_regression ... FAILED
test transaction::test::bench_get_rand ... FAILED
test transaction::test::bench_put_rand ... ok
test transaction::test::bench_get_rand_raw ... ok
test transaction::test::bench_put_rand_raw ... ok
test transaction::test::test_clear_db ... FAILED
thread '<unnamed>thread 'thread 'thread 'thread 'thread 'thread 'thread 'thread 'thread 'thread '' panicked at '<unnamed><unnamed><unnamed><unnamed><unnamed><unnamed><unnamed><unnamed><unnamed><unnamed>called `Result::unwrap()` on an `Err` value: Corrupted' panicked at '' panicked at '' panicked at '' panicked at '' panicked at '' panicked at '' panicked at '' panicked at '' panicked at '' panicked at '', called `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedcalled `Result::unwrap()` on an `Err` value: Corruptedlibcore/result.rs', ', ', ', ', ', ', ', ', ', :libcore/result.rslibcore/result.rslibcore/result.rslibcore/result.rslibcore/result.rslibcore/result.rslibcore/result.rslibcore/result.rslibcore/result.rslibcore/result.rs983:::::::::::9839839839839839839839839839835::::::::::
5555555555
thread '








<unnamed>test transaction::test::test_concurrent_readers_single_writer ... ' panicked at 'FAILEDcalled `Result::unwrap()` on an `Err` value: Corrupted
', libcore/result.rs:983:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:test transaction::test::test_drop_db ... 983FAILED:
5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5
test transaction::test::test_inactive_txn ... FAILEDthread '
<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:test transaction::test::test_nested_txn ... 983ok:
5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5
test transaction::test::test_put_get_del ... FAILED
test transaction::test::test_concurrent_writers ... FAILED
test transaction::test::test_reserve ... FAILED

failures:

---- cursor::test::bench_get_seq_iter stdout ----
thread 'cursor::test::bench_get_seq_iter' panicked at 'mdb_cursor_get returned an unexpected error: -30796', src/cursor.rs:253:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- cursor::test::bench_get_seq_cursor stdout ----
thread 'cursor::test::bench_get_seq_cursor' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `100`', src/cursor.rs:603:13

---- cursor::test::bench_get_seq_raw stdout ----
thread 'cursor::test::bench_get_seq_raw' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `100`', src/cursor.rs:633:13

---- cursor::test::test_iter stdout ----
thread 'cursor::test::test_iter' panicked at 'mdb_cursor_get returned an unexpected error: -30796', src/cursor.rs:253:26

---- cursor::test::test_iter_dup stdout ----
thread 'cursor::test::test_iter_dup' panicked at 'assertion failed: `(left == right)`
  left: `[([97], [49]), ([97], [50]), ([97], [51]), ([98], [49]), ([98], [50]), ([98], [51]), ([99], [49]), ([99], [50]), ([99], [51]), ([101], [49]), ([101], [50]), ([101], [51])]`,
 right: `[]`', src/cursor.rs:513:9

---- environment::test::test_close_database stdout ----
thread 'environment::test::test_close_database' panicked at 'assertion failed: env.open_db(Some("db")).is_ok()', src/environment.rs:414:9

---- environment::test::test_stat stdout ----
thread 'environment::test::test_stat' panicked at 'tx.put: Corrupted', libcore/result.rs:983:5

---- test_utils::issue_21_regression stdout ----
thread 'test_utils::issue_21_regression' panicked at 'tx.put: Corrupted', libcore/result.rs:983:5

---- transaction::test::bench_get_rand stdout ----
thread 'transaction::test::bench_get_rand' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5

---- transaction::test::test_clear_db stdout ----
thread 'transaction::test::test_clear_db' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5

---- transaction::test::test_concurrent_readers_single_writer stdout ----
thread 'transaction::test::test_concurrent_readers_single_writer' panicked at 'called `Result::unwrap()` on an `Err` value: Any', libcore/result.rs:983:5

---- transaction::test::test_drop_db stdout ----
thread 'transaction::test::test_drop_db' panicked at 'called `Result::unwrap()` on an `Err` value: BadTxn', libcore/result.rs:983:5

---- transaction::test::test_inactive_txn stdout ----
thread 'transaction::test::test_inactive_txn' panicked at 'assertion failed: active.get(db, b"key").is_ok()', src/transaction.rs:454:9

---- transaction::test::test_put_get_del stdout ----
thread 'transaction::test::test_put_get_del' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5

---- transaction::test::test_concurrent_writers stdout ----
thread 'transaction::test::test_concurrent_writers' panicked at 'called `Result::unwrap()` on an `Err` value: Any', libcore/result.rs:983:5

---- transaction::test::test_reserve stdout ----
thread 'transaction::test::test_reserve' panicked at 'called `Result::unwrap()` on an `Err` value: Corrupted', libcore/result.rs:983:5


failures:
    cursor::test::bench_get_seq_cursor
    cursor::test::bench_get_seq_iter
    cursor::test::bench_get_seq_raw
    cursor::test::test_iter
    cursor::test::test_iter_dup
    environment::test::test_close_database
    environment::test::test_stat
    test_utils::issue_21_regression
    transaction::test::bench_get_rand
    transaction::test::test_clear_db
    transaction::test::test_concurrent_readers_single_writer
    transaction::test::test_concurrent_writers
    transaction::test::test_drop_db
    transaction::test::test_inactive_txn
    transaction::test::test_put_get_del
    transaction::test::test_reserve

test result: FAILED. 16 passed; 16 failed; 0 ignored; 0 measured; 0 filtered out

@mykmelez
Copy link
Contributor Author

mykmelez commented Sep 4, 2018

Indeed, the lmdb C library itself fails tests on WSL because of what sounds like a limitation of Windows itself:

microsoft/WSL#3451

LMDB has a workaround for Windows, but I guess WSL doesn't look like Windows:

https://github.com/openldap/openldap/blob/59e9ff6243465640956b58ad1756a3ede53eca7c/libraries/liblmdb/mdb.c#L3943-L3963

This probably needs a fix in the lmdb C library and/or Windows/WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant