Skip to content

Instantly share code, notes, and snippets.

@bahamas10
Last active March 21, 2022 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bahamas10/a773315ebbbdba445a11bd62206b0480 to your computer and use it in GitHub Desktop.
Save bahamas10/a773315ebbbdba445a11bd62206b0480 to your computer and use it in GitHub Desktop.
illumos LX (void linux) rustup hang - tokio hang bug
[package]
name = "tokio-test"
version = "0.1.0"
edition = "2021"
[dependencies]
tokio = { version = "1.17.0", features = ["full"] }
use tokio::fs;
use tokio::runtime::Builder;
fn main() {
let runtime = Builder::new_current_thread()
.enable_all() // THIS IS THE LINE THAT CAUSES THE BREAKAGE (this is default from the `tokio::main` macro)
.build()
.unwrap();
runtime.block_on(async {
let want_data = b"data\n";
let fname = "foo.txt";
fs::write(fname, want_data).await.unwrap();
let got_data = fs::read(fname).await.unwrap();
println!("want_data = {:?}", want_data);
println!("got_data = {:?}", got_data);
assert_eq!(got_data, want_data);
});
}
@bahamas10
Copy link
Author

this bug has been narrowed down to epoll -> https://gist.github.com/bahamas10/d158ac87271c926aa32a0528faca03d6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment