DioxusLabs / DioxusLabs/dioxus

dioxus_devtools::serve_subsecond `thread 'main' (27848) has overflowed its stack` error

Open
#5,311 3 comments 2 reactions 0 assignees View on GitHub
bug subsecond
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

I read the amazing post by @tehnix [here](https://codethoughts.io/posts/2026-02-07-rust-hot-reloading/) and I tried in my own project with axum and async-graphql: nothing works.

So I tried a new project with this code:

```toml
[package]
name = "app"
version = "0.1.0"
edition = "2024"

[dependencies]
axum = { version = "=0.8.8", default-features = false, features = [
"tokio",
"http1",
"http2",
"query",
"json",
] }
dioxus-devtools = { version = "=0.7.3", features = ["serve"] }
tokio = { version = "=1.49.0", features = ["full"] }
```

```rust
use axum::{Router, routing::get};

#[tokio::main]
async fn main() -> Result<(), Box> {
dioxus_devtools::serve_subsecond(|| server())
.await;

Ok(())
}

async fn server() -> Result<(), std::io::Error> {
let app = Router::new().route("/", get(handler));

let listener = tokio::net::TcpListener::bind("127.0.0.1:3000")
.await?;

println!("listening on {}", listener.local_addr()?);

axum::serve(listener, app).await
}

async fn handler() -> String {
"Hello, world!".to_string()
}
```

Steps:

1. start the server with `dx serve --hot-patch`

1. open localhost:3000

1. change "Hello, world!" to "Hello, moon!"

1. error in console:

```log
[dev] Hot-patching: \src\main.rs took 1315ms
[windows] listening on 127.0.0.1:3000
[windows] thread 'main' (27848) has overflowed its stack
[dev] Application [windows] exited with error: exit code: 0xc00000fd
```

What is happening?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.