khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
1.01k stars 37 forks source link

thread 'tokio-runtime-worker' panicked at 'mio must be compiled with `os-poll` to run.' #203

Closed ecton closed 2 years ago

ecton commented 2 years ago

Tokio released 0.17.0 last night which causes this to happen when using the QUIC-based networking protocol:

thread 'tokio-runtime-worker' panicked at 'mio must be compiled with `os-poll` to run.', /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.14/src/sys/shell/udp.rs:9:5
stack backtrace:
thread 'tokio-runtime-worker' panicked at 'mio must be compiled with `os-poll` to run.', /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.14/src/sys/shell/udp.rs:9:5
Received Pong from server on websockets
   0: std::panicking::begin_panic
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:525:12
   1: mio::sys::shell::udp::only_v6
             at /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.14/src/sys/shell/udp.rs:9:5
   2: mio::net::udp::UdpSocket::only_v6
             at /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.14/src/net/udp.rs:517:9
   3: quinn_udp::imp::init
             at /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-udp-0.1.0/src/unix.rs:103:84
   4: quinn_udp::imp::UdpSocket::from_std
             at /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-udp-0.1.0/src/unix.rs:38:9
   5: quinn::endpoint::Endpoint::new
             at /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.8.0/src/endpoint.rs:83:22
   6: quinn::endpoint::Endpoint::server
             at /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.8.0/src/endpoint.rs:71:9
   7: fabruic::quic::endpoint::Endpoint::new
             at /home/ecton/.cargo/registry/src/github.com-1ecc6299db9ec823/fabruic-0.0.1-dev.5/src/quic/endpoint/mod.rs:93:32

This can be worked around by forcing tokio to 1.16.1 in your Cargo.toml for now:

tokio = "=1.16.1"

I believe most users are currently exploring the local-only option, so I'm going to try to wait until I'm ready to release 0.2.0 to release a new update with tokio pinned to that version.

I'm hoping to have 0.2.0 out in the next couple of days -- after I finish #200.