Skip to content

Frequent server panic exits – «Ruff language server exited with a panic» #607

@rnckp

Description

@rnckp

I observe frequent server panic exits with no appearant reason. What can I do to fix this?

Note: I do not drag any cells. So this does not seem related to #575

Minimal code snippet
I do not invoke specific commands or cells. I observe the crashes throughout various of my projects in VS Code.

Settings
settings.zip

Versions
VS Code 1.93.0
Ruff extension v2024.44.0 (Auto Update active)

Environment
MacBook Pro 16'' 2023, Apple M2 Max, 64GB
MacOS Sonoma 14.6.1

Panic logs

2024-09-08 09:53:38.747 [info] panicked at crates/ruff_server/src/server/api/requests/hover.rs:36:10:
hover should only be called on text documents or notebook cells

2024-09-08 09:53:38.747 [info]    0: std::backtrace::Backtrace::create
   1
2024-09-08 09:53:38.747 [info] : ruff_server::server::Server::run::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: _rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::option::expect_failed
   8: <ruff_server::server::api
2024-09-08 09:53:38.748 [info] ::requests::hover::Hover as ruff_server::server::api::traits::BackgroundDocumentRequestHandler>::run_with_snapshot
   9: core::ops::function::FnOnce::call_once{{vtable.shim}}
  10: core::ops::function::FnOnce::call_once{{vtable.shim}}
  11: std::sys_common::backtrace::__rust_begin_short_backtrace
  12: core::ops::function::FnOnce::call_once{{vtable.shim}}
  13: std::sys::pal::unix::thread::Thread::new::thread_start
  14: __pthread_joiner_wake


2024-09-08 10:00:51.113 [info] panicked at crates/ruff_server/src/server/api/requests/hover.rs:36:10:
hover should only be called on text documents or notebook cells

2024-09-08 10:00:51.113 [info]    0: std::backtrace::
2024-09-08 10:00:51.114 [info] Backtrace::create
   1: ruff_server::server::Server::run::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: _rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::option::expect_failed
   8: <ruff_server::server::api::requests::hover::Hover as ruff_server::server::api::traits::BackgroundDocumentRequestHandler>::run_with_snapshot
   9: core::ops::function::FnOnce::call_once{{vtable.shim}}
  10: core::ops::function::FnOnce::call_once{{vtable.shim}}
  11: std::sys_common::backtrace::__rust_begin_short_backtrace
  12: core::ops::function::FnOnce::call_once{{vtable.shim}}
  13: std::sys::pal::unix::thread::Thread::new::thread_start
  14: __pthread_joiner_wake

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-mreNeeds more information for reproductionserver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions