GithubHelp home page GithubHelp logo

Comments (15)

Shougo avatar Shougo commented on September 28, 2024

I cannot reproduce the problem.

from deoplete-jedi.

ysolis avatar ysolis commented on September 28, 2024

how is restarted the python process in deoplete-jedi ?

from deoplete-jedi.

ysolis avatar ysolis commented on September 28, 2024

I check again the process. The python process launched for deoplete-jedi get in zombie mode, and after this get killed and a new process is created. So I assume that is restarted the process. But take some time to get completed the restart process. We can close this but we need to set an option to define how is restarted deoplete-jedi.

from deoplete-jedi.

zchee avatar zchee commented on September 28, 2024

@ysolis sorry late reply. and thanks information.
Yes, maybe deoplete-jedi daemon have a bug.
I understand half, will read and understand tomorrow(now Japan is AM 4:30)
But it might be good information. Thanks.

from deoplete-jedi.

blueyed avatar blueyed commented on September 28, 2024

@ysolis
Maybe you can produce a log with more info?!

call deoplete#custom#set('jedi', 'debug_enabled', 1)
call deoplete#enable_logging('DEBUG', '/tmp/deoplete.log')

Also try export NVIM_PYTHON_LOG_FILE=/tmp/nvim-python-log NVIM_PYTHON_LOG_LEVEL=DEBUG before starting Neovim.

from deoplete-jedi.

zchee avatar zchee commented on September 28, 2024

@blueyed Thanks. You're right.

from deoplete-jedi.

blueyed avatar blueyed commented on September 28, 2024

@zchee
Not sure about the method, but were just using this myself to debug Shougo/deoplete.nvim#336. (I/we should / will create a separate issue for that.)
See #60 for an improved issue template.

from deoplete-jedi.

ysolis avatar ysolis commented on September 28, 2024

https://gist.github.com/ysolis/9af49c1e2afa7c8e873719e0418f11ad

log uploaded and attached

from deoplete-jedi.

blueyed avatar blueyed commented on September 28, 2024

Thanks!

Relevant part where it starts to misbehave:

2016-09-21 09:07:54,149 DEBUG    (deoplete.jedi.Thread-1) Worker error
Traceback (most recent call last):
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/worker.py", line 67, in run
    self.out_queue.put(self.completion_work(*work), block=False)
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/worker.py", line 34, in completion_work
    filename)
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py", line 532, in completions
    return stream_read(self._server.stdout)
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py", line 83, in stream_read
    raise StreamEmpty
deoplete_jedi.server.StreamEmpty
2016-09-21 09:07:57,698 DEBUG    (deoplete.jedi.cache) Input: "i"
2016-09-21 09:07:57,699 DEBUG    (deoplete.jedi) Key: ('add4d4c65ffb2275f5a0bfdc9c72543b', ('views', 'unique'), 'vars'), Refresh: True, Wait: False
2016-09-21 09:07:57,701 INFO     (deoplete.jedi) �[34mgather_candidates�[m t = �[32m6.441123�[mms, µ = �[39m16.541704�[mms, σ = �[39m23.852977�[mms)
2016-09-21 09:07:57,707 DEBUG    (deoplete.jedi.Thread-1) Got work
2016-09-21 09:07:57,708 DEBUG    (deoplete.jedi.Thread-1) Worker error
Traceback (most recent call last):
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/worker.py", line 67, in run
    self.out_queue.put(self.completion_work(*work), block=False)
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/worker.py", line 34, in completion_work
    filename)
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py", line 531, in completions
    stream_write(self._server.stdin, args)
  File "/home/yonsy/.config/nvim/dein/repos/github.com/zchee/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py", line 101, in stream_write
    pipe.flush()
BrokenPipeError: [Errno 32] Broken pipe

The StreamEmpty gets raised in stream_read (called in Client.completions): https://github.com/zchee/deoplete-jedi/blob/ba6c29144f69ede846ebc3a7e4000eed5f5a76a6/rplugin/python3/deoplete/sources/deoplete_jedi/server.py#L532.

It is not caught there, like it's done in the Server's _loop.

@ysolis
Can you try #65, please?

Can you reliably trigger the crash?

You wrote:

edit your code and wait that a preview window appear

For me it does not crash the Python process, but that might be related to the code/preview?

Can you provide a small snippet to reproduce it, too?

(Looking at that made me find the fix for #61: #63 (AFAICS).)

from deoplete-jedi.

ysolis avatar ysolis commented on September 28, 2024

@blueyed the preview window is not relevant, i think that was the initial case but no, the problem happens with or without preview window.

from deoplete-jedi.

blueyed avatar blueyed commented on September 28, 2024

@ysolis
So how do you trigger the crash then?
Have you tried #65?

from deoplete-jedi.

ysolis avatar ysolis commented on September 28, 2024

i do a pgrep python when i invoke neovim, i can see the python process called for deoplete and deoplete-jedi. After some time i can check the pid for the python process called by deoplete-jedi and i see that is in zombie mode (defunct) after some minutes get restarted.

i will try #65 in one hour.

from deoplete-jedi.

blueyed avatar blueyed commented on September 28, 2024

After some time i can check the pid for the python process called by deoplete-jedi and i see that is in zombie mode (defunct)

It would be useful to have the debug log(s) when this happens. With #65 there should be a bit more logging for example.

from deoplete-jedi.

ysolis avatar ysolis commented on September 28, 2024

#65 tried ... and the python process that is launched from deoplete-jedi don't go to zombie and defunct in the restart, get restarted without any problem

check my pgrep report:

(analysis) ~/devops/analysis   master  pgrep -af python
22347 /usr/bin/python3.5 -c import sys; sys.path.remove(""); import neovim; neovim.start_host() /home/yonsy/.config/nvim/dein/.dein/rplugin/python3/deoplete
22461 /home/yonsy/.pyenv/versions/pypy2-5.4.1/envs/analysis/bin/python -u /home/yonsy/.config/nvim/dein/repos/github.com/blueyed/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py --desc-length 0
(analysis) ~/devops/analysis   master  pgrep -af python
22347 /usr/bin/python3.5 -c import sys; sys.path.remove(""); import neovim; neovim.start_host() /home/yonsy/.config/nvim/dein/.dein/rplugin/python3/deoplete
24248 /home/yonsy/.pyenv/versions/pypy2-5.4.1/envs/analysis/bin/python -u /home/yonsy/.config/nvim/dein/repos/github.com/blueyed/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py --desc-length 0
(analysis) ~/devops/analysis   master 

the first one was when i open a *.py file. the second one was after i edit the same file and add some python code in few minutes. Previously the python process invoked for deoplete-jedi get defunct before get restarted, and in this time the plugin don't work (no python completion, only name completion). With #65 the process get restarted and the edition and python completion don't get affected, work flawlessly.

from deoplete-jedi.

ysolis avatar ysolis commented on September 28, 2024

https://gist.github.com/ysolis/619bdaf13da14781f0672856156e92b5

from deoplete-jedi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.