Skip to content

LSP crashes on large rust files in Windows #11136

Description

@BrianShTsoi

Summary

When opening a large rust file, lsp crashes and can't be recovered with lsp-restart. This behaviour is only on Windows. I tested with Linux (WSL Ubuntu) and cannot reproduce the crash. I also cannot reproduce with VSCode on Windows, so this is not a rust-analyzer issue.

Reproduction Steps

I tried this:

  1. hx
  2. Open a large rust file, such as this

I expected this to happen:
LSP works properly.

Instead, this happened:
LSP crashes. It gives the request timeout message.

Helix log

~/.cache/helix/helix.log
2024-07-11T11:09:12.387 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"40/47 (minidump_common + 1 more)","percentage":85}}}
2024-07-11T11:09:12.427 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"41/47 (minidump_common)","percentage":87}}}
2024-07-11T11:09:12.601 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"percentage":89}}}
2024-07-11T11:09:12.601 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"42/47 (minidump_synth + 1 more)","percentage":89}}}
2024-07-11T11:09:12.610 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"43/47 (breakpad_symbols)","percentage":91}}}
2024-07-11T11:09:12.610 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"43/47 (breakpad_symbols + 1 more)","percentage":91}}}
2024-07-11T11:09:12.667 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"44/47 (breakpad_symbols)","percentage":93}}}
2024-07-11T11:09:12.681 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"percentage":95}}}
2024-07-11T11:09:12.681 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"45/47 (minidump_unwind)","percentage":95}}}
2024-07-11T11:09:12.875 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"percentage":97}}}
2024-07-11T11:09:12.875 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"message":"46/47 (minidump_processor)","percentage":97}}}
2024-07-11T11:09:12.905 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","cancellable":false,"percentage":100}}}
2024-07-11T11:09:12.905 helix_lsp::transport [INFO] rust-analyzer <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"end"}}}
2024-07-11T11:09:14.304 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-07-11T11:09:14.304 helix_lsp::transport [ERROR] rust-analyzer err <- "thread 'Worker' has overflowed its stack\n"
2024-07-11T11:09:17.874 helix_lsp::transport [ERROR] rust-analyzer err: <- StreamClosed

Platform

Windows 11

Terminal Emulator

Windows Terminal (Powershell)

Installation Method

Scoop

Helix Version

helix 24.3 (2cadec0)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions