Skip to content

Runaway memory leak when viewing any file importing ndarray #20582

@decahedron1

Description

@decahedron1

rust-analyzer version: rust-analyzer version: 0.4.2594-standalone (870cb3329b 2025-08-25)

rustc version: rustc 1.91.0-nightly (523d3999d 2025-08-30)

editor or extension: VSCode, extension version 0.4.2594

relevant settings:

# User settings:
{
    "rust-analyzer.cargo.targetDir": true
}

# Workspace settings (in .vscode/settings.json):
{
    "rust-analyzer.check.command": "clippy",
    "rust-analyzer.rustfmt.extraArgs": [ "+nightly" ],
    "rust-analyzer.cachePriming.enable": true,
    "rust-analyzer.diagnostics.experimental.enable": true,
    "rust-analyzer.showUnlinkedFileNotification": false
}

repository link: https://github.com/pykeio/ort

Reproduction

  1. git clone https://github.com/pykeio/ort
  2. Open ort in VS Code
    • Once rust-analyzer is done priming cache, memory usage is fine.
    • Opening most files in src/ shows normal memory usage as well.
  3. Open any of these affected files:
    • tests/mnist.rs
    • tests/squeezenet.rs
    • tests/upsample.rs
    • tests/vectorizer.rs
    • src/tensor/ndarray.rs
  4. Observe RAM explode

Seems to have been introduced in v0.4.2586. v0.4.2579 and earlier are unaffected.

Metadata

Metadata

Assignees

Labels

A-new-solverBugs from the new solver migration - should be fixed before stable releaseC-bugCategory: bugI-hangIssue: The analysis never terminates, due to infinite loops, deadlock, livelock, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions