Skip to content

Commit 2b62d5e

Browse files
committed
fix(cli): Increase Tokio thread stack size
Set runtime thread stacks to 16 MiB to avoid stack overflow in the agent execution and configuration update path in debug builds. The outer CLI thread's stack size does not apply to runtime threads. Linux CI probes failed twice with the default stack and passed twice with 16 MiB. Local cargo check --locked -p openbitfun-cli passes.
1 parent 8304b9d commit 2b62d5e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/apps/cli/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,9 @@ fn main() {
17141714
.stack_size(16 * 1024 * 1024)
17151715
.spawn(|| {
17161716
let runtime = tokio::runtime::Builder::new_multi_thread()
1717+
// Agent execution can exceed Tokio's default stack in debug builds.
1718+
// Runtime threads do not inherit the outer thread's stack size.
1719+
.thread_stack_size(16 * 1024 * 1024)
17171720
.enable_all()
17181721
.build()
17191722
.expect("failed to build tokio runtime");

0 commit comments

Comments
 (0)