Skip to content

Stack overflow crash when indexing crate with large amount of dependencies #20484

@unitezen

Description

@unitezen

rust-analyzer version: 0.4.2586 (pre-release channel, as vscode extension)
rustc version: rustc 1.89.0 (29483883e 2025-08-04)
editor version: vscode 1.103.1 (Universal)
os/architecture: macOS 15.5, arm64 (m4 pro, 48gb ram)
minimal reproduction: https://github.com/unitezen/ra-stack-overflow-repro

When opening a rust repo that depends on a crate that has a large amount of dependencies and proc macros, rust-analyzer crashes during indexing with a message in the Output (rust-analyzer Language Server):

thread 'Worker7' has overflowed its stack
fatal runtime error: stack overflow, aborting
[Error - 6:57:17 PM] Server process exited with signal SIGABRT.
[Info  - 6:57:17 PM] Connection to server got closed. Server will restart.
true

and this loops until vscode sees that it crashes too much (more than 3 times in 5 minutes) and halts it entirely. The indexing never completes, so the inlay hints/suggestions never work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Broken WindowBugs / technical debt to be addressed immediately

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions