Skip to content

Runtime builder panics when unable to spawn worker threads #6167

@xiaoluzi0050

Description

@xiaoluzi0050

Version
1.28.2

Platform
linux ubuntu18.04

Description
Using sccache to improve compilation speed, but encountering an error with the third-party library tokio.

thread 'main' panicked at 'failed to spawn thread: Os {code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/jobserver.rs:53:18
thread 'main' panicked at 'OS can't pawn worker thread:Resource temporarily unavailable (os error 11)', /home/.cargo/registry/src/github.com/tokio-1.28.2/src/runtime/scheduler/multi_thread/worker.rs:365:13
make[2]: fork: Resource temporarily unavailable

sccache version : 0.7.1
The server has 256 cores, with a parallelism setting of 100, and then compile in Docker.
The aforementioned issue occurs sporadically, and the probability of occurrence increases as the parallelism value is set higher
The server resources are abundant, such as memory and maximum thread count.

[short summary of the bug]
runtime::spawn_blocking error, Resource temporarily unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tokioArea: The main tokio crateC-bugCategory: This is a bug.M-runtimeModule: tokio/runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions