Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Connection to server got closed" error after initiating a rebase #3039

Closed
difernandez opened this issue Jan 10, 2025 · 1 comment · Fixed by #3036
Closed

"Connection to server got closed" error after initiating a rebase #3039

difernandez opened this issue Jan 10, 2025 · 1 comment · Fixed by #3036
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes

Comments

@difernandez
Copy link

Description

Ruby LSP Information

VS Code Version

1.93.1

Ruby LSP Extension Version

0.8.17

Ruby LSP Server Version

0.23.3

Ruby LSP Add-ons

  • Ruby LSP Rails

Ruby Version

3.1.4

Ruby Version Manager

rbenv

Installed Extensions

Click to expand
  • EditorConfig (0.16.4)
  • dotenv (1.0.1)
  • errorlens (3.22.0)
  • explorer (1.8.5)
  • gitlens (16.1.1)
  • gitsweep (1.0.0)
  • indent-rainbow (8.3.1)
  • remote-containers (0.327.0)
  • ruby-lsp (0.8.17)
  • selectline-statusbar (0.0.2)
  • string-manipulation (0.7.25)
  • svg (1.5.4)
  • vitest-snippets (1.8.0)
  • vscode-alternate-file (0.3.1)
  • vscode-docker (1.29.3)
  • vscode-eslint (3.0.10)
  • vscode-mjml (1.6.0)
  • vscode-open-in-github (1.18.0)
  • vscode-peacock (4.2.2)
  • vscode-tailwindcss (0.12.17)
  • vue-snippets (1.0.4)

Ruby LSP Settings

Click to expand
Workspace
{}
User
{
  "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": "auto"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true,
  "featureFlags": {}
}

Reproduction steps

  1. Start the Ruby LSP in a git project using VSCode (also happens in Cursor)
  2. Move from main to a new branch
  3. Open a Ruby file
  4. Commit any change
  5. Run a git rebase with main/master
  6. The following error and log output come up after a few seconds:
Image
2025-01-10 09:33:32.078 [info] (my-project) Restarting the Ruby LSP because /Users/my-user/Desktop/projects/my-project/.git/rebase-merge changed, matching .git/{rebase-merge,rebase-apply,BISECT_START,CHERRY_PICK_HEAD}
2025-01-10 09:33:32.612 [info] (my-project) Shutting down Ruby LSP...
2025-01-10 09:33:32.613 [info] (my-project) /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/base_server.rb:123:in `join': 
2025-01-10 09:33:32.613 [info] (my-project) No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x000000013c804080 main thread:0x000000013c804080
* #<Thread:0x00000001005c4d00 sleep_forever>
   rb_thread_t:0x000000013c804080 native:0x00000001f7bcc140 int:0
   
* #<Thread:0x000000010989cd08 /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/base_server.rb:26 sleep_forever>
   rb_thread_t:0x00000001075a4700 native:0x000000016fe5b000 int:0 mutex:0x000000013c804510 cond:1
    depended by: tb_thread_id:0x000000013c804080
   
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/base_server.rb:123:in `run_shutdown'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/base_server.rb:99:in `block (2 levels) in start'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/global_state.rb:64:in `synchronize'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/global_state.rb:64:in `synchronize'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/base_server.rb:96:in `block in start'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/transport/io/reader.rb:20:in `read'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/lib/ruby_lsp/base_server.rb:46:in `start'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/ruby-lsp-0.23.3/exe/ruby-lsp:154:in `<top (required)>'
	from /Users/my-user/.rbenv/versions/3.1/bin/ruby-lsp:25:in `load'
	from /Users/my-user/.rbenv/versions/3.1/bin/ruby-lsp:25:in `<top (required)>'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'

2025-01-10 09:33:32.613 [info] (my-project) 	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/my-user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'

2025-01-10 09:33:32.613 [info] (my-project) 	from /Users/my-user/.rbenv/versions/3.1.4/bin/bundle:25:in `load'
	from /Users/my-user/.rbenv/versions/3.1.4/bin/bundle:25:in `<main>'

2025-01-10 09:33:32.855 [info] (my-project) [Error - 9:33:32 AM] Server process exited with code 1.
2025-01-10 09:33:32.856 [info] (my-project) [Error - 9:33:32 AM] Connection to server got closed. Server will not be restarted.
2025-01-10 09:33:32.856 [info] (my-project) [Error - 9:33:32 AM] Stopping server failed
2025-01-10 09:33:32.856 [info] (my-project)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-01-10 09:33:32.856 [error] (my-project) Error restarting the server: Pending response rejected since connection got disposed

@difernandez difernandez added bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes labels Jan 10, 2025
@vinistock
Copy link
Member

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants