Skip to content

Rogue ruby-lsp related processes even after VS Code is quit #2841

Open

Description

Description

From time to time I notice that there are a bunch of ruby processes where I'm pretty sure they are related to ruby-lsp even if the Rails project got already closed or VS Code is no longer running (see details below).

Ruby LSP Information

VS Code Version

1.95.2

Ruby LSP Extension Version

0.8.13

Ruby LSP Server Version

0.21.3

Ruby LSP Addons

  • Ruby LSP Rails

Ruby Version

3.3.5

Ruby Version Manager

chruby

Installed Extensions

Click to expand
  • EditorConfig (0.16.4)
  • code-spell-checker (3.0.1)
  • copilot (1.243.0)
  • copilot-chat (0.22.2)
  • debugpy (2024.12.0)
  • dotenv (1.0.1)
  • even-better-toml (0.19.2)
  • go (0.42.1)
  • haml (1.4.1)
  • makefile-tools (0.11.13)
  • prettier-vscode (11.0.0)
  • python (2024.18.0)
  • remote-containers (0.388.0)
  • remote-explorer (0.4.3)
  • remote-server (1.5.2)
  • remote-ssh (0.115.0)
  • remote-ssh-edit (0.87.0)
  • remote-wsl (0.88.5)
  • rewrap (1.16.3)
  • ruby-extensions-pack (0.1.12)
  • ruby-lsp (0.8.13)
  • rust-analyzer (0.3.2172)
  • shellcheck (0.37.1)
  • solargraph (0.24.1)
  • sorbet-vscode-extension (0.3.37)
  • vscode-docker (1.29.3)
  • vscode-eslint (3.0.10)
  • vscode-fileutils (3.10.3)
  • vscode-github-actions (0.27.0)
  • vscode-graphviz (0.0.9)
  • vscode-kubernetes-tools (1.3.18)
  • vscode-markdownlint (0.56.0)
  • vscode-proto3 (0.5.5)
  • vscode-rdbg (0.2.2)
  • vscode-remote-extensionpack (0.26.0)
  • vscode-standard (2.1.3)
  • vscode-todo-highlight (1.0.5)
  • vscode-typescript-next (5.8.20241106)
  • vscode-yaml (1.15.0)
  • vsliveshare (1.0.5941)

Ruby LSP Settings

Click to expand
Workspace
{
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": true,
    "definition": true,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  }
}
User
{
  "enableExperimentalFeatures": true,
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": true,
    "definition": true,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  },
  "featuresConfiguration": {},
  "addonSettings": {},
  "rubyVersionManager": {
    "identifier": "chruby"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true,
  "useLauncher": false,
  "featureFlags": {}
}

Reproduction steps

Unavailable at this time.

I'm not sure if there is something specific I'm doing that leads to the issue. From time to time I just notice that there are a bunch of ruby processes running where I'm either 100% sure (~/.gem/ruby/3.3.5/gems/ruby-lsp-rails-0.3.23/lib/ruby_lsp/ruby_lsp_rails/server.rb) or pretty sure (~/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch […]) that they are spawned/related to ruby-lsp. I'm only using ruby-lsp from within VSCode.

There must be something off with process cleanup. Especially after quitting VS Code I'd expect all spawned processes to be properly terminated.

This output is from VS Code being terminated (properly quit, closing all windows before, no crashes reported, etc) – ps aux:

tisba            69979   0.0  0.0 410170688   1776   ??  S    Wed06PM   0:01.48 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/lib /Users/tisba/src/rails_project/spec/mailers/previews /Users/tisba/src/rails_project/app/controllers /Users/tisba/src/rails_project/app/decorators /Users/tisba/src/rails_project/app/helpers /Users/tisba/src/rails_project/app/lib /Users/tisba/src/rails_project/app/mailers /Users/tisba/src/rails_project/app/models /Users/tisba/src/rails_project/app/sandbox /Users/tisba/src/rails_project/app/serializers /Users/tisba/src/rails_project/app/validators /Users/tisba/src/rails_project/db
tisba            69978   0.0  0.0 410190144   1472   ??  S    Wed06PM   0:01.37 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/app/views
tisba            69977   0.0  0.0 410163520   1376   ??  S    Wed06PM   0:01.31 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/spec/factories
tisba            69976   0.0  0.0 410171712   1504   ??  S    Wed06PM   0:01.48 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/config/locales
tisba            69975   0.0  0.0 411842656   4144   ??  Ss   Wed06PM   0:00.62 /Users/tisba/.gem/ruby/3.3.5/gems/ruby-lsp-rails-0.3.23/lib/ruby_lsp/ruby_lsp_rails/server.rb
tisba            69974   0.0  0.0 411361424   3520   ??  S    Wed06PM   0:00.39 /Users/tisba/.rubies/ruby-3.3.5/bin/ruby bin/rails runner /Users/tisba/.gem/ruby/3.3.5/gems/ruby-lsp-rails-0.3.23/lib/ruby_lsp/ruby_lsp_rails/server.rb start
tisba            69929   0.0  0.0 412429648   3584   ??  S    Wed06PM   0:07.84 /Users/tisba/.gem/ruby/3.3.5/bin/ruby-lsp
tisba            59817   0.0  0.0 410171712   1776   ??  S    Wed03PM   0:01.82 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/lib /Users/tisba/src/rails_project/spec/mailers/previews /Users/tisba/src/rails_project/app/controllers /Users/tisba/src/rails_project/app/decorators /Users/tisba/src/rails_project/app/helpers /Users/tisba/src/rails_project/app/lib /Users/tisba/src/rails_project/app/mailers /Users/tisba/src/rails_project/app/models /Users/tisba/src/rails_project/app/sandbox /Users/tisba/src/rails_project/app/serializers /Users/tisba/src/rails_project/app/validators /Users/tisba/src/rails_project/db
tisba            59816   0.0  0.0 410173760   1472   ??  S    Wed03PM   0:01.64 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/app/views
tisba            59815   0.0  0.0 410179904   1776   ??  S    Wed03PM   0:01.81 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/lib /Users/tisba/src/rails_project/spec/mailers/previews /Users/tisba/src/rails_project/app/controllers /Users/tisba/src/rails_project/app/decorators /Users/tisba/src/rails_project/app/helpers /Users/tisba/src/rails_project/app/lib /Users/tisba/src/rails_project/app/mailers /Users/tisba/src/rails_project/app/models /Users/tisba/src/rails_project/app/sandbox /Users/tisba/src/rails_project/app/serializers /Users/tisba/src/rails_project/app/validators /Users/tisba/src/rails_project/db
tisba            59814   0.0  0.0 410173760   1472   ??  S    Wed03PM   0:01.66 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/app/views
tisba            59813   0.0  0.0 410182976   1376   ??  S    Wed03PM   0:01.76 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/spec/factories
tisba            59812   0.0  0.0 410163520   1504   ??  S    Wed03PM   0:01.69 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/config/locales
tisba            59811   0.0  0.0 411842496   3888   ??  Ss   Wed03PM   0:00.64 /Users/tisba/.gem/ruby/3.3.5/gems/ruby-lsp-rails-0.3.23/lib/ruby_lsp/ruby_lsp_rails/server.rb
tisba            59810   0.0  0.0 410164544   1376   ??  S    Wed03PM   0:02.07 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/spec/factories
tisba            59809   0.0  0.0 410173760   1504   ??  S    Wed03PM   0:02.13 /Users/tisba/.gem/ruby/3.3.5/gems/rb-fsevent-0.11.2/bin/fsevent_watch --format=otnetstring --latency 0.1 /Users/tisba/src/rails_project/config/locales
tisba            59728   0.0  0.0 411212880   3280   ??  S    Wed03PM   0:00.38 /Users/tisba/.rubies/ruby-3.3.5/bin/ruby bin/rails runner /Users/tisba/.gem/ruby/3.3.5/gems/ruby-lsp-rails-0.3.23/lib/ruby_lsp/ruby_lsp_rails/server.rb start
tisba            59599   0.0  0.0 412176912   3584   ??  S    Wed03PM   0:09.46 /Users/tisba/.gem/ruby/3.3.5/bin/ruby-lsp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvscodeThis pull request should be included in the VS Code extension's release notes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions