-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Segfault when using async on linux-musl #107566
Comments
Huh, interesting. Using the cargo/rust version shipped with Alpine packages (1.67.0) it all works fine. Using the cargo/rust version installed via rustup (1.67.0) it also segfaults. |
I've had issues with the binaries that rustup installs on musl before, I think there might be something broken in the way that these are compiled. |
Yeah, here it is: #108878 On This is |
Updating title since this happens on both nightly and stable. |
I'm starting to suspect that this is just a duplicate of #107566, reproduced under entirely different circumstances. |
My feeling is that this isn't a duplicate. The underlying cause might be the same (or this could be an interaction between the same underlying cause and some infelicity in how Unfortunately I don't have a solution (other than to use It should, though, be labeled as |
Still an issue with |
this seems to be solved as of 1.76.0-nightly, and possibly earlier, tested both with and without
|
I can't confirm whether the issue is fixed; the original example does not compile for me with the compiler shipped via mkdir reproducer
cd reproducer
cargo init
cat > Cargo.toml <<EOF
[package]
name = "reproducer"
version = "0.1.0"
edition = "2021"
[dependencies]
reqwest = "0.11.14"
tokio = { version = "1.25.0", features = ["rt", "macros", "rt-multi-thread"] }
EOF
cat > src/main.rs <<EOF
#[tokio::main]
async fn main() {
reqwest::get("https://www.rust-lang.org")
.await
.unwrap()
.text()
.await
.unwrap();
}
EOF
cargo build
./target/debug/reproducer
echo $? When using
With |
Never mind, different error. |
this is now a loud failure that it failed to find |
I'm aware that it's a different issue. I mention it because it blocks from actually reproducing the original sample here and confirming whether it now works or not. Yeah, it's trying to statically link by default. Looks like that issue is not yet resolved: #59302 Building with |
I tried this code:
And this
Cargo.toml
:I expected to see this happen: It would run fine
Instead, this happened:
segmentation fault
Meta
rustc --version --verbose
:strace
(not sure if useful):The text was updated successfully, but these errors were encountered: