question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

regression: 0.28.3 fails to respond to `initialize` request, stalls and consumes high CPU

See original GitHub issue

I’m working on an LSP client, and hoping to support jedi-language-server. When I started implementing, 0.27.2 was current, and this worked well. However, in testing, one of my testers reported that the client was hanging waiting for jedi-language-server.

Upon investigation, I found that the relevant difference was that the tester was running 0.28.3 rather than my 0.27.2, and upon updating my own installation of jedi-language-server to 0.28.3 I was able to reproduce the same symptom.

Platform: macOS 10.15.7 Python: 3.9.2 jedi-language-server: 0.28.3 Client: n/a

I don’t have a clean test harness for reproducing this; I thought I could start jedi-language-server in a Terminal window and pipe or paste JSON into it, but that doesn’t seem to work as expected. However, I have provided the JSON that is being sent to the server when it starts up, perhaps that is useful.

The regression is reproducible: use pip install -U jedi-language-server to install the current version (0.28.3 as I write this), and the server never responds to the initialize message. Sometimes it appears to continue running and consume high CPU, I have attached a macOS sample report, in case that is helpful.

Then, use pip uninstall jedi-language-server followed by pip install -Iv jedi-language-server==0.27.2 to install the older version, and the language server responds immediately and as expected to initialize and other protocol requests.

Thanks for reading; please let me know if there’s any additional information I can provide.

initialize.json.zip jedi-ls-sample.txt

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
siegelcommented, Mar 19, 2021

Got it! It didn’t go exactly as planned, but I was able to crowbar in a full path to the development build, and confirmed that the server responds as expected to initialization and other requests that I tested.

Thanks very much! I really appreciate the quick fix.

While I’m at it, I just wanted to throw some love your way for generating fully qualified snippet information for function completions. It makes this client developer’s life much happier, and my customers will appreciate it as well. ❤️

0reactions
siegelcommented, Mar 19, 2021

So, I did pip uninstall jedi-language-server followed by pip install -U jedi-language-server, and did indeed note the new version 0.28.4. However, when starting the server, I get the following (reproducible from the command line):

siegel ~ % jedi-language-server
Traceback (most recent call last):
  File "/usr/local/bin/jedi-language-server", line 5, in <module>
    from jedi_language_server.cli import cli
  File "/usr/local/lib/python3.9/site-packages/jedi_language_server/cli.py", line 5, in <module>
    from .server import SERVER
  File "/usr/local/lib/python3.9/site-packages/jedi_language_server/server.py", line 15, in <module>
    from pygls.lsp.methods import (
  File "/usr/local/lib/python3.9/site-packages/pygls/lsp/__init__.py", line 19, in <module>
    from pygls.exceptions import MethodTypeNotRegisteredError
ImportError: cannot import name 'MethodTypeNotRegisteredError' from 'pygls.exceptions' (/usr/local/lib/python3.9/site-packages/pygls/exceptions.py)

Unclear to me where the issue lies, and it may not be your issue to solve.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ChangeLog.openSUSE-Leap-15.3-x86_64 ... - BYU Linux Club
A check was added to ensure that the + traversal code does not try to read beyond the end of the file, +...
Read more >
Package List — Spack 0.20.0.dev0 documentation
MPI calls are intercepted (using wrappers) to create the models. When an MPI application hangs, AutomaDeD creates a progress-dependence graph that helps ...
Read more >
CHANGELOG - mesos - Git at Google
[MESOS-9889] - Master CPU high due to unexpected foreachkey behaviour in ... [MESOS-9177] - Mesos master segfaults when responding to /state requests.
Read more >
Untitled
(#869446) - Additional upstream work to address 100% cpu usage bug in ... security flags added - Init file fixed (bz 860627) -...
Read more >
Memory leaks - CVE - Search Results
This is an application bug, not a security issue. CVE-2021-4135, A memory leak vulnerability was found in the Linux kernel's eBPF for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found