Skip to content

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

Open
@HatemMn

Description

@HatemMn

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 }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions