Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Analysis is stuck if packages are reloaded before it finishes. #1839

Closed

Description

@danzvara

I'm trying to run MLSP in docker container to provide completions for a project i'm working on.
When running on a local machine / VM, everything works fine. In docker container however, the analysis gets stuck, until I trigger a filesystem operation such as running pip install. If I skip the initial workspace/didChangeConfiguration notification, analysis finishes fine.

Reading the code, I'm led to believe this is a problem with PathsWatcher class, which only gets created after workspace/didChangeConfiguration is called. It seems like it could be an issue with running System.IO.FileSystemWatcher in containerized environment, but i'm not 100% sure.

Environment data

  • Language Server version: 0.5.7.0 (also tried 0.4.127)
  • OS and version: Debian 9 (on MacOS host)
  • Python version: 3.7.3

Expected behaviour

Analysis should go through all the packages and finish.

Actual behaviour

In docker, analysis never finishes with "Analysis restarted" message appearing before it gets stuck. When a filesystem operation is made (such as pip install), analysis gets reseted again and this time it finishes fine.

Logs

IN: marks a raw input send to MLSP, OUT: is the raw output i'm getting back. The communication is done through my custom LSP plugin in NodeJS, using vscode-jsonrpc package for jsonrpc comms.

There are 2 logs, first part is until the analysis got stuck, the second is then after I ran pip install in the container, analysis got unstack and finished.

Part 1:
https://gist.github.com/danzvara/8fcd139f5568d38e87957fd6dc3bc9dd

Part2:
https://gist.github.com/danzvara/07f94ceffecb071ab2c6e0e2d5101c75

Thanks for any help!

Activity

  1. MikhailArkhipov commented on Dec 13, 2019

    @MikhailArkhipov

    Related #1623. Yes, file watcher tries to determine if pip install happened or otherwise set of libraries have changed. Perhaps activating watcher should be an option since it technically a convenience feature.

  2. MikhailArkhipov commented on Dec 13, 2019

    @MikhailArkhipov

    Looks like same as #1800

  3. danzvara commented on Dec 16, 2019

    @danzvara
    Author

    So I investigated further - it turns out that workspace/didChangeConfiguration triggers a call to ResetAnalyzer(). It seems like if the analysis is reseted before it finishes it gets stuck.

  4. changed the title [-]Analysis is stuck in docker environment, suspecting System.IO.FileSystemWatcher[/-] [+]Analysis is stuck if packages are reloaded before it finishes.[/+] on Dec 16, 2019
  5. danzvara commented on Dec 16, 2019

    @danzvara
    Author

    Actually, this is not a docker issue. In VSCode Online visualstudio.microsoft.com/services/visual-studio-online, I can trigger the same issue by running pip install something before the initial analysis is done (and their environment seems to be a VM, not a container).

  6. MikhailArkhipov commented on Dec 16, 2019

    @MikhailArkhipov

    File watch turned off by default in #1841.
    LS 0.5.10+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions