Skip to content

macOS 0.12.22 -> 0.12.23 regression: Abort trap 6 #2832

@jbapple

Description

@jbapple

Cargo.toml:

[package]
name = "reqwest-repro"
version = "0.1.0"
edition = "2024"

[dependencies]
reqwest = { version = "=0.12.23", features = ["gzip", "rustls-tls"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
anyhow = "1"

src/main.rs:

use anyhow::Result;
use reqwest::{Client, Method, Url};

const REQUEST_URL: &str = "http://localhost:12345/";

#[tokio::main]
async fn main() -> Result<()> {
    let client = Client::builder().build()?;
    let url = Url::parse(REQUEST_URL)?;
    let request = client.request(Method::GET, url).build()?;
    println!("Sending request: {} {}", request.method(), request.url());
    let response = client.execute(request).await?;
    println!("Status: {}", response.status());
    Ok(())
}

uname -mprsv:

Darwin 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041 arm64 arm

cargo --version:

cargo 1.89.0 (c24e10642 2025-06-23)

cargo run in bash shows:

Sending request: GET http://localhost:12345/
Abort trap: 6

But with v0.12.22, I get

Sending request: GET http://localhost:12345/
Error: error sending request for url (http://localhost:12345/)

Caused by:
    0: client error (Connect)
    1: tcp connect error
    2: Connection refused (os error 61)

(and when I have a server running, I get HTTP 200)

I have been told by some other developers that something like this works on their machine with both .22 and .23. This is from one person running Linux and another one macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions