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

Will panic on newer rust due to outdated tokio dependency #10

Open
5225225 opened this issue Aug 1, 2022 · 0 comments
Open

Will panic on newer rust due to outdated tokio dependency #10

5225225 opened this issue Aug 1, 2022 · 0 comments

Comments

@5225225
Copy link

5225225 commented Aug 1, 2022

Hello!

I'm coming to this repo from rust-lang/rust#99389 where we're making the checks for uninitialized data stricter. This crate runs into them. Here's a backtrace, it looks like the tokio dep needs upgrading?

---- protocol::test::test_invalid_async stdout ----
thread 'protocol::test::test_invalid_async' panicked at 'attempted to leave type `[tokio_sync::loom::sync::CausalCell<core::mem::manually_drop::ManuallyDrop<core::result::Result<protocol::Message, error::Error>>>; 32]` uninitialized, which is invalid', /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/block.rs:366:24
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::mem::uninitialized
             at /home/jess/src/rust/library/core/src/mem/mod.rs:685:9
   4: tokio_sync::mpsc::block::Values<T>::uninitialized
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/block.rs:366:24
   5: tokio_sync::mpsc::block::Block<T>::new
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/block.rs:91:30
   6: tokio_sync::mpsc::list::channel
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/list.rs:38:34
   7: tokio_sync::mpsc::chan::channel
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/chan.rs:138:20
   8: tokio_sync::mpsc::bounded::channel
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/bounded.rs:118:20
   9: tt::protocol::test::test_invalid_async
             at ./src/protocol.rs:953:32
  10: tt::protocol::test::test_invalid_async::{{closure}}
             at ./src/protocol.rs:951:5
  11: core::ops::function::FnOnce::call_once
             at /home/jess/src/rust/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- protocol::test::test_read_write_async stdout ----
thread 'protocol::test::test_read_write_async' panicked at 'attempted to leave type `[tokio_sync::loom::sync::CausalCell<core::mem::manually_drop::ManuallyDrop<core::result::Result<protocol::Message, error::Error>>>; 32]` uninitialized, which is invalid', /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/block.rs:366:24
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::mem::uninitialized
             at /home/jess/src/rust/library/core/src/mem/mod.rs:685:9
   4: tokio_sync::mpsc::block::Values<T>::uninitialized
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/block.rs:366:24
   5: tokio_sync::mpsc::block::Block<T>::new
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/block.rs:91:30
   6: tokio_sync::mpsc::list::channel
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/list.rs:38:34
   7: tokio_sync::mpsc::chan::channel
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/chan.rs:138:20
   8: tokio_sync::mpsc::bounded::channel
             at /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.1.7/src/mpsc/bounded.rs:118:20
   9: tt::protocol::test::test_read_write_async
             at ./src/protocol.rs:916:32
  10: tt::protocol::test::test_read_write_async::{{closure}}
             at ./src/protocol.rs:914:5
  11: core::ops::function::FnOnce::call_once
             at /home/jess/src/rust/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    protocol::test::test_invalid_async
    protocol::test::test_read_write_async

It's unclear if this is only an issue in the tests, or if it will also run into the issues in usage.

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