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

haskell-language-server crashed in wsl: "clock_getres: invalid argument" #263

Closed
Shangyint opened this issue Jul 31, 2020 · 8 comments
Closed
Labels
os: windows type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@Shangyint
Copy link

I am getting

The Haskell (haskell) server crashed 5 times in the last 3 minutes. The server will not be restarted.

on a Windows Linux Subsystem (VERSION="18.04.2 LTS (Bionic Beaver)"). The log is as follows

[client] run command: "/home/shangyit/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.2.2-linux-8.8.4 --lsp"
[client] debug command: "/home/shangyit/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.2.2-linux-8.8.4 --lsp"
[client] server cwd: undefined
haskell-language-server version: 0.2.2.0 (GHC: 8.8.4) (PATH: /home/shangyit/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.2.2-linux-8.8.4) (GIT hash: e44f618c11b7978264a94beeee00d1f014867f6d)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "eval",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",PluginId "pragmas",PluginId "stylish-haskell"]
  in directory: /home/shangyit/haskell
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 haskell-language-server-0.2.2-linux-8.8.4: clock_getres: invalid argument (Invalid argument)
[Info  - 4:18:43 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 0.2.2.0 (GHC: 8.8.4) (PATH: /home/shangyit/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.2.2-linux-8.8.4) (GIT hash: e44f618c11b7978264a94beeee00d1f014867f6d)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "eval",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",PluginId "pragmas",PluginId "stylish-haskell"]
  in directory: /home/shangyit/haskell
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 haskell-language-server-0.2.2-linux-8.8.4: clock_getres: invalid argument (Invalid argument)
[Info  - 4:18:43 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 0.2.2.0 (GHC: 8.8.4) (PATH: /home/shangyit/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.2.2-linux-8.8.4) (GIT hash: e44f618c11b7978264a94beeee00d1f014867f6d)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "eval",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",PluginId "pragmas",PluginId "stylish-haskell"]
  in directory: /home/shangyit/haskell
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 haskell-language-server-0.2.2-linux-8.8.4: clock_getres: invalid argument (Invalid argument)
......

Any help is appreciated, thanks!

@jneira jneira transferred this issue from haskell/vscode-haskell Jul 31, 2020
@jneira jneira added install type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jul 31, 2020
@lukel97
Copy link
Collaborator

lukel97 commented Jul 31, 2020

Looks like it might be the same issue this person is running into? https://stackoverflow.com/questions/58811317/cant-use-quickcheck-because-of-clock-getress-invalidargument-exception

@jneira
Copy link
Member

jneira commented Jul 31, 2020

maybe the generic linux binaries does not work well in wsl, could you tried a installation from source to check if the error is reproduced?

@jneira jneira changed the title haskell-language-server crashed haskell-language-server crashed in wsl: "clock_getres: invalid argument" Jul 31, 2020
@Shangyint
Copy link
Author

maybe the generic linux binaries does not work well in wsl, could you tried a installation from source to check if the error is reproduced?

I installed it manually using

./cabal-hls-install hls-8.8.4
./cabal-hls-install data

and encountered the same issue.

shangyit@Isaac-OMEN:~/.cabal/bin$ ./haskell-language-server-8.8.4 --lsp
haskell-language-server version: 0.2.2.0 (GHC: 8.8.4) (PATH: /home/shangyit/.cabal/bin/haskell-language-server-8.8.4)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "eval",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",PluginId "pragmas",PluginId "stylish-haskell"]
  in directory: /home/shangyit/.cabal/bin
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 haskell-language-server-8.8.4: clock_getres: invalid argument (Invalid argument)

@lukel97
Copy link
Collaborator

lukel97 commented Jul 31, 2020

Seems to be a general issue with haskell + WSL, another example here: https://discourse.nixos.org/t/how-to-disable-running-tests-when-building-home-manager-module/6792

@1Computer1
Copy link

I think it is likely this issue microsoft/WSL#4898.

@jneira jneira added status: blocked Not actionable, because blocked by upstream/GHC etc. and removed status: needs repro labels Aug 1, 2020
@jneira
Copy link
Member

jneira commented Aug 1, 2020

So it seems we can not do much here.

@jneira
Copy link
Member

jneira commented Nov 9, 2020

@1Computer1 microsoft/WSL#4898 seems to be closed, is this reproduced with a newer version of wsl?

@jneira jneira added status: needs info Not actionable, because there's missing information os: windows labels Nov 9, 2020
@jneira
Copy link
Member

jneira commented Dec 2, 2020

@Shangyint i am gonna close it optimistically as the issue that seems fix the issue is closed, feel free to reopen if that is not the case

@jneira jneira closed this as completed Dec 2, 2020
@jneira jneira removed status: blocked Not actionable, because blocked by upstream/GHC etc. status: needs info Not actionable, because there's missing information labels Dec 2, 2020
pepeiborra pushed a commit that referenced this issue Dec 27, 2020
* Filter out completely warnings not enabled by user

* Suggestions by @cocreature

* Add tests

* Work more on tests

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: windows type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

4 participants