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

datacake-rpc failing: cargo test --features simulation #73

Open
FrankReh opened this issue Jul 15, 2024 · 3 comments
Open

datacake-rpc failing: cargo test --features simulation #73

FrankReh opened this issue Jul 15, 2024 · 3 comments

Comments

@FrankReh
Copy link

Change directory to datacake-rpc
Run

$ cargo test --features simulation
   Compiling turmoil v0.4.0
   Compiling datacake-rpc v0.6.0 (/home/ubuntu/forks/datacake/datacake-rpc)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 20.14s
     Running unittests src/lib.rs (/home/ubuntu/forks/datacake/target/debug/deps/datacake_rpc-e0a7f3d5e447c9cb)

running 7 tests
test rkyv_tooling::tests::test_heap_size_serialize ... ok
test net::status::tests::test_variants ... ok
test rkyv_tooling::tests::test_static_size_serialize ... ok
test rkyv_tooling::view::tests::test_deserialize ... ok
test rkyv_tooling::view::tests::test_invalid_view ... ok
test rkyv_tooling::view::tests::test_view ... ok
test rkyv_tooling::view::tests::test_view_missing_checksum ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/basic.rs (/home/ubuntu/forks/datacake/target/debug/deps/basic-d85fb6a6be6259e3)

running 1 test
test test_basic ... FAILED

failures:

---- test_basic stdout ----
thread 'test_basic' panicked at /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scoped-tls-1.0.1/src/lib.rs:168:9:
cannot access a scoped thread local variable without calling `set` first
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test_basic

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass `--test basic`

Is this meant to work or was the simulation feature meant to be used in another way?

@ChillFish8
Copy link
Member

Hmm, That is not good 🤔

Could you do cargo tree for me? I wonder if this is an issue with some updated dependencies because datacake as a lib doesn't have a lock file, it might be that some libs updated and have broken (probably turmoil-related since that has changed a lot since I implemented it)

@FrankReh
Copy link
Author

turmoil has changed but because I ran into the problem trying turmoil v0.6.2, I had gone back to v0.4, and found the same problem. I wondered if there was another feature needed (like "test-utils") but that didn't help so I left it off further tries.

Here are two cargo tree outputs:

$ cargo tree
datacake-rpc v0.6.0 (/home/ubuntu/forks/datacake/datacake-rpc)
├── anyhow v1.0.86
├── async-trait v0.1.81 (proc-macro)
│   ├── proc-macro2 v1.0.86
│   │   └── unicode-ident v1.0.12
│   ├── quote v1.0.36
│   │   └── proc-macro2 v1.0.86 (*)
│   └── syn v2.0.71
│       ├── proc-macro2 v1.0.86 (*)
│       ├── quote v1.0.36 (*)
│       └── unicode-ident v1.0.12
├── bytes v1.6.1
├── crc32fast v1.4.2
│   └── cfg-if v1.0.0
├── http v0.2.12
│   ├── bytes v1.6.1
│   ├── fnv v1.0.7
│   └── itoa v1.0.11
├── hyper v0.14.30
│   ├── bytes v1.6.1
│   ├── futures-channel v0.3.30
│   │   └── futures-core v0.3.30
│   ├── futures-core v0.3.30
│   ├── futures-util v0.3.30
│   │   ├── futures-core v0.3.30
│   │   ├── futures-task v0.3.30
│   │   ├── pin-project-lite v0.2.14
│   │   └── pin-utils v0.1.0
│   ├── h2 v0.3.26
│   │   ├── bytes v1.6.1
│   │   ├── fnv v1.0.7
│   │   ├── futures-core v0.3.30
│   │   ├── futures-sink v0.3.30
│   │   ├── futures-util v0.3.30 (*)
│   │   ├── http v0.2.12 (*)
│   │   ├── indexmap v2.2.6
│   │   │   ├── equivalent v1.0.1
│   │   │   └── hashbrown v0.14.5
│   │   ├── slab v0.4.9
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.3.0
│   │   ├── tokio v1.38.0
│   │   │   ├── bytes v1.6.1
│   │   │   ├── libc v0.2.155
│   │   │   ├── mio v0.8.11
│   │   │   │   └── libc v0.2.155
│   │   │   ├── num_cpus v1.16.0
│   │   │   │   └── libc v0.2.155
│   │   │   ├── parking_lot v0.12.3
│   │   │   │   ├── lock_api v0.4.12
│   │   │   │   │   └── scopeguard v1.2.0
│   │   │   │   │   [build-dependencies]
│   │   │   │   │   └── autocfg v1.3.0
│   │   │   │   └── parking_lot_core v0.9.10
│   │   │   │       ├── cfg-if v1.0.0
│   │   │   │       ├── libc v0.2.155
│   │   │   │       └── smallvec v1.13.2
│   │   │   ├── pin-project-lite v0.2.14
│   │   │   ├── signal-hook-registry v1.4.2
│   │   │   │   └── libc v0.2.155
│   │   │   ├── socket2 v0.5.7
│   │   │   │   └── libc v0.2.155
│   │   │   └── tokio-macros v2.3.0 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.86 (*)
│   │   │       ├── quote v1.0.36 (*)
│   │   │       └── syn v2.0.71 (*)
│   │   ├── tokio-util v0.7.11
│   │   │   ├── bytes v1.6.1
│   │   │   ├── futures-core v0.3.30
│   │   │   ├── futures-sink v0.3.30
│   │   │   ├── pin-project-lite v0.2.14
│   │   │   └── tokio v1.38.0 (*)
│   │   └── tracing v0.1.40
│   │       ├── pin-project-lite v0.2.14
│   │       ├── tracing-attributes v0.1.27 (proc-macro)
│   │       │   ├── proc-macro2 v1.0.86 (*)
│   │       │   ├── quote v1.0.36 (*)
│   │       │   └── syn v2.0.71 (*)
│   │       └── tracing-core v0.1.32
│   │           └── once_cell v1.19.0
│   ├── http v0.2.12 (*)
│   ├── http-body v0.4.6
│   │   ├── bytes v1.6.1
│   │   ├── http v0.2.12 (*)
│   │   └── pin-project-lite v0.2.14
│   ├── httparse v1.9.4
│   ├── httpdate v1.0.3
│   ├── itoa v1.0.11
│   ├── pin-project-lite v0.2.14
│   ├── socket2 v0.5.7 (*)
│   ├── tokio v1.38.0 (*)
│   ├── tower-service v0.3.2
│   ├── tracing v0.1.40 (*)
│   └── want v0.3.1
│       └── try-lock v0.2.5
├── parking_lot v0.12.3 (*)
├── rkyv v0.7.44
│   ├── bytecheck v0.6.12
│   │   ├── bytecheck_derive v0.6.12 (proc-macro)
│   │   │   ├── proc-macro2 v1.0.86 (*)
│   │   │   ├── quote v1.0.36 (*)
│   │   │   └── syn v1.0.109
│   │   │       ├── proc-macro2 v1.0.86 (*)
│   │   │       ├── quote v1.0.36 (*)
│   │   │       └── unicode-ident v1.0.12
│   │   ├── ptr_meta v0.1.4
│   │   │   └── ptr_meta_derive v0.1.4 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.86 (*)
│   │   │       ├── quote v1.0.36 (*)
│   │   │       └── syn v1.0.109 (*)
│   │   └── simdutf8 v0.1.4
│   ├── hashbrown v0.12.3
│   │   └── ahash v0.7.8
│   │       ├── getrandom v0.2.15
│   │       │   ├── cfg-if v1.0.0
│   │       │   └── libc v0.2.155
│   │       └── once_cell v1.19.0
│   │       [build-dependencies]
│   │       └── version_check v0.9.4
│   ├── ptr_meta v0.1.4 (*)
│   ├── rend v0.4.2
│   │   └── bytecheck v0.6.12 (*)
│   ├── rkyv_derive v0.7.44 (proc-macro)
│   │   ├── proc-macro2 v1.0.86 (*)
│   │   ├── quote v1.0.36 (*)
│   │   └── syn v1.0.109 (*)
│   └── seahash v4.1.0
├── thiserror v1.0.62
│   └── thiserror-impl v1.0.62 (proc-macro)
│       ├── proc-macro2 v1.0.86 (*)
│       ├── quote v1.0.36 (*)
│       └── syn v2.0.71 (*)
├── tokio v1.38.0 (*)
└── tracing v0.1.40 (*)
[dev-dependencies]
├── rkyv v0.7.44 (*)
├── test-helper v0.1.0 (/home/ubuntu/forks/datacake/test-helper)
└── tokio v1.38.0 (*)

And with the feature:

$ cargo tree --features simulation
datacake-rpc v0.6.0 (/home/ubuntu/forks/datacake/datacake-rpc)
├── anyhow v1.0.86
├── async-stream v0.3.5
│   ├── async-stream-impl v0.3.5 (proc-macro)
│   │   ├── proc-macro2 v1.0.86
│   │   │   └── unicode-ident v1.0.12
│   │   ├── quote v1.0.36
│   │   │   └── proc-macro2 v1.0.86 (*)
│   │   └── syn v2.0.71
│   │       ├── proc-macro2 v1.0.86 (*)
│   │       ├── quote v1.0.36 (*)
│   │       └── unicode-ident v1.0.12
│   ├── futures-core v0.3.30
│   └── pin-project-lite v0.2.14
├── async-trait v0.1.81 (proc-macro)
│   ├── proc-macro2 v1.0.86 (*)
│   ├── quote v1.0.36 (*)
│   └── syn v2.0.71 (*)
├── bytes v1.6.1
├── crc32fast v1.4.2
│   └── cfg-if v1.0.0
├── http v0.2.12
│   ├── bytes v1.6.1
│   ├── fnv v1.0.7
│   └── itoa v1.0.11
├── hyper v0.14.30
│   ├── bytes v1.6.1
│   ├── futures-channel v0.3.30
│   │   ├── futures-core v0.3.30
│   │   └── futures-sink v0.3.30
│   ├── futures-core v0.3.30
│   ├── futures-util v0.3.30
│   │   ├── futures-channel v0.3.30 (*)
│   │   ├── futures-core v0.3.30
│   │   ├── futures-io v0.3.30
│   │   ├── futures-macro v0.3.30 (proc-macro)
│   │   │   ├── proc-macro2 v1.0.86 (*)
│   │   │   ├── quote v1.0.36 (*)
│   │   │   └── syn v2.0.71 (*)
│   │   ├── futures-sink v0.3.30
│   │   ├── futures-task v0.3.30
│   │   ├── memchr v2.7.4
│   │   ├── pin-project-lite v0.2.14
│   │   ├── pin-utils v0.1.0
│   │   └── slab v0.4.9
│   │       [build-dependencies]
│   │       └── autocfg v1.3.0
│   ├── h2 v0.3.26
│   │   ├── bytes v1.6.1
│   │   ├── fnv v1.0.7
│   │   ├── futures-core v0.3.30
│   │   ├── futures-sink v0.3.30
│   │   ├── futures-util v0.3.30 (*)
│   │   ├── http v0.2.12 (*)
│   │   ├── indexmap v2.2.6
│   │   │   ├── equivalent v1.0.1
│   │   │   └── hashbrown v0.14.5
│   │   ├── slab v0.4.9 (*)
│   │   ├── tokio v1.38.0
│   │   │   ├── bytes v1.6.1
│   │   │   ├── libc v0.2.155
│   │   │   ├── mio v0.8.11
│   │   │   │   └── libc v0.2.155
│   │   │   ├── num_cpus v1.16.0
│   │   │   │   └── libc v0.2.155
│   │   │   ├── parking_lot v0.12.3
│   │   │   │   ├── lock_api v0.4.12
│   │   │   │   │   └── scopeguard v1.2.0
│   │   │   │   │   [build-dependencies]
│   │   │   │   │   └── autocfg v1.3.0
│   │   │   │   └── parking_lot_core v0.9.10
│   │   │   │       ├── cfg-if v1.0.0
│   │   │   │       ├── libc v0.2.155
│   │   │   │       └── smallvec v1.13.2
│   │   │   ├── pin-project-lite v0.2.14
│   │   │   ├── signal-hook-registry v1.4.2
│   │   │   │   └── libc v0.2.155
│   │   │   ├── socket2 v0.5.7
│   │   │   │   └── libc v0.2.155
│   │   │   └── tokio-macros v2.3.0 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.86 (*)
│   │   │       ├── quote v1.0.36 (*)
│   │   │       └── syn v2.0.71 (*)
│   │   ├── tokio-util v0.7.11
│   │   │   ├── bytes v1.6.1
│   │   │   ├── futures-core v0.3.30
│   │   │   ├── futures-sink v0.3.30
│   │   │   ├── pin-project-lite v0.2.14
│   │   │   └── tokio v1.38.0 (*)
│   │   └── tracing v0.1.40
│   │       ├── pin-project-lite v0.2.14
│   │       ├── tracing-attributes v0.1.27 (proc-macro)
│   │       │   ├── proc-macro2 v1.0.86 (*)
│   │       │   ├── quote v1.0.36 (*)
│   │       │   └── syn v2.0.71 (*)
│   │       └── tracing-core v0.1.32
│   │           └── once_cell v1.19.0
│   ├── http v0.2.12 (*)
│   ├── http-body v0.4.6
│   │   ├── bytes v1.6.1
│   │   ├── http v0.2.12 (*)
│   │   └── pin-project-lite v0.2.14
│   ├── httparse v1.9.4
│   ├── httpdate v1.0.3
│   ├── itoa v1.0.11
│   ├── pin-project-lite v0.2.14
│   ├── socket2 v0.5.7 (*)
│   ├── tokio v1.38.0 (*)
│   ├── tower-service v0.3.2
│   ├── tracing v0.1.40 (*)
│   └── want v0.3.1
│       └── try-lock v0.2.5
├── parking_lot v0.12.3 (*)
├── rkyv v0.7.44
│   ├── bytecheck v0.6.12
│   │   ├── bytecheck_derive v0.6.12 (proc-macro)
│   │   │   ├── proc-macro2 v1.0.86 (*)
│   │   │   ├── quote v1.0.36 (*)
│   │   │   └── syn v1.0.109
│   │   │       ├── proc-macro2 v1.0.86 (*)
│   │   │       ├── quote v1.0.36 (*)
│   │   │       └── unicode-ident v1.0.12
│   │   ├── ptr_meta v0.1.4
│   │   │   └── ptr_meta_derive v0.1.4 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.86 (*)
│   │   │       ├── quote v1.0.36 (*)
│   │   │       └── syn v1.0.109 (*)
│   │   └── simdutf8 v0.1.4
│   ├── hashbrown v0.12.3
│   │   └── ahash v0.7.8
│   │       ├── getrandom v0.2.15
│   │       │   ├── cfg-if v1.0.0
│   │       │   └── libc v0.2.155
│   │       └── once_cell v1.19.0
│   │       [build-dependencies]
│   │       └── version_check v0.9.4
│   ├── ptr_meta v0.1.4 (*)
│   ├── rend v0.4.2
│   │   └── bytecheck v0.6.12 (*)
│   ├── rkyv_derive v0.7.44 (proc-macro)
│   │   ├── proc-macro2 v1.0.86 (*)
│   │   ├── quote v1.0.36 (*)
│   │   └── syn v1.0.109 (*)
│   └── seahash v4.1.0
├── thiserror v1.0.62
│   └── thiserror-impl v1.0.62 (proc-macro)
│       ├── proc-macro2 v1.0.86 (*)
│       ├── quote v1.0.36 (*)
│       └── syn v2.0.71 (*)
├── tokio v1.38.0 (*)
├── tracing v0.1.40 (*)
└── turmoil v0.4.0
    ├── bytes v1.6.1
    ├── futures v0.3.30
    │   ├── futures-channel v0.3.30 (*)
    │   ├── futures-core v0.3.30
    │   ├── futures-executor v0.3.30
    │   │   ├── futures-core v0.3.30
    │   │   ├── futures-task v0.3.30
    │   │   └── futures-util v0.3.30 (*)
    │   ├── futures-io v0.3.30
    │   ├── futures-sink v0.3.30
    │   ├── futures-task v0.3.30
    │   └── futures-util v0.3.30 (*)
    ├── indexmap v1.9.3
    │   └── hashbrown v0.12.3 (*)
    │   [build-dependencies]
    │   └── autocfg v1.3.0
    ├── rand v0.8.5
    │   ├── libc v0.2.155
    │   ├── rand_chacha v0.3.1
    │   │   ├── ppv-lite86 v0.2.17
    │   │   └── rand_core v0.6.4
    │   │       └── getrandom v0.2.15 (*)
    │   └── rand_core v0.6.4 (*)
    ├── rand_distr v0.4.3
    │   ├── num-traits v0.2.19
    │   │   └── libm v0.2.8
    │   │   [build-dependencies]
    │   │   └── autocfg v1.3.0
    │   └── rand v0.8.5 (*)
    ├── scoped-tls v1.0.1
    ├── tokio v1.38.0 (*)
    ├── tokio-stream v0.1.15
    │   ├── futures-core v0.3.30
    │   ├── pin-project-lite v0.2.14
    │   └── tokio v1.38.0 (*)
    ├── tokio-test v0.4.4
    │   ├── async-stream v0.3.5 (*)
    │   ├── bytes v1.6.1
    │   ├── futures-core v0.3.30
    │   ├── tokio v1.38.0 (*)
    │   └── tokio-stream v0.1.15 (*)
    ├── tokio-util v0.7.11 (*)
    ├── tracing v0.1.40 (*)
    └── tracing-subscriber v0.3.18
        ├── matchers v0.1.0
        │   └── regex-automata v0.1.10
        │       └── regex-syntax v0.6.29
        ├── nu-ansi-term v0.46.0
        │   └── overload v0.1.1
        ├── once_cell v1.19.0
        ├── regex v1.10.5
        │   ├── regex-automata v0.4.7
        │   │   └── regex-syntax v0.8.4
        │   └── regex-syntax v0.8.4
        ├── sharded-slab v0.1.7
        │   └── lazy_static v1.5.0
        ├── smallvec v1.13.2
        ├── thread_local v1.1.8
        │   ├── cfg-if v1.0.0
        │   └── once_cell v1.19.0
        ├── tracing v0.1.40 (*)
        ├── tracing-core v0.1.32 (*)
        └── tracing-log v0.2.0
            ├── log v0.4.22
            ├── once_cell v1.19.0
            └── tracing-core v0.1.32 (*)
[dev-dependencies]
├── rkyv v0.7.44 (*)
├── test-helper v0.1.0 (/home/ubuntu/forks/datacake/test-helper)
└── tokio v1.38.0 (*)

I could also try a git bisection if you think that could help narrow the problem down to a commit but first I wanted to hear I was running the test in this crate as intended.

@ChillFish8
Copy link
Member

Yeah looks like a dependency change within turmoil, I can have a look at replicating this since it shouldn't be hard. Since scoped-tls is v1.x I assume this is an accidental breaking change with how it does the thread locals.

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

2 participants