actix / actix/actix-web

thread 'actix-server worker x' has overflowed its stack fatal runtime error: stack overflow

Aperta
#3,630 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
needs-investigation
Lingua principale
Rust
Stelle
24.8k
Fork
1.9k
Merge medio
23h 10m
PR unite (30g)
26

Descrizione

## Expected Behavior

The test executes till the end and the program exits with no errors.

## Current Behavior

The program, on some of the github actions machines, stops suddenly with the error :
```
thread 'actix-server worker x' has overflowed its stack
fatal runtime error: stack overflow
error: test failed, to rerun pass ....
```
Where x is some integer usually between 0 and 3

A huge problem is that **I could not** reproduce this bug on any of my local setups. It often, however, happens on CI/CD pipelines especially on RedHat machines (but sometimes on ubuntu or mac too !)

## Possible Solution

I have no idea

## Steps to Reproduce (for bugs)

Sorry but I failed to create a standalone program that produces this. I have a huge server that handles requests to basically do some encryption operations. In the test that fails, many tokio threads are spawned to perform a lot of operations where the Actix server is sollicitated multiple times
Currently I tried the following ideas that did not work :
- Using backoff time for the tokio threads that fail to get what they want on first attemps (they will keep pinging the server till they get the reply they want and then they terminate)
- Instantiating the whole test server on the heap (in a Box<...>

## Your Environment

- Machine : RHEL9. Fails sometimes on ubuntu 24_04 if I make the test more "demanding"
- Rust Version (I.e, output of `rustc -V`): rustc 1.85.0-nightly (d117b7f21 2024-12-31)
- Actix Web Version:
actix-rt = "2.10"
actix-server = { version = "2.5", default-features = false }
actix-web = { version = "4.9", default-features = false }

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.