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

Rust completion Server Error from racerd #849

Closed
noxdafox opened this issue Sep 29, 2017 · 8 comments · Fixed by #1224
Closed

Rust completion Server Error from racerd #849

noxdafox opened this issue Sep 29, 2017 · 8 comments · Fixed by #1224

Comments

@noxdafox
Copy link

noxdafox commented Sep 29, 2017

Greetings,

I am running Ycmd with emacs. Ycmd and emacs-ycmd are up to date.

Tried both rust from Debian package (version 1.19) and from the official installer (version 1.20).

The rust source is correctly installed via rustup.

This is the ycmd output.

2017-09-29 23:29:32,263 - INFO - Starting new HTTP connection (1): 127.0.0.1
2017-09-29 23:29:32,264 - DEBUG - "POST /list_completions HTTP/1.1" 500 0
Traceback (most recent call last):
  File "/home/noxdafox/development/ycmd/third_party/bottle/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/home/noxdafox/development/ycmd/third_party/bottle/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 108, in wrapper
    return callback( *args, **kwargs )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/hmac_plugin.py", line 70, in wrapper
    body = callback( *args, **kwargs )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/handlers.py", line 103, in GetCompletions
    .ComputeCandidates( request_data ) )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/completers/completer.py", line 218, in ComputeCandidates
    candidates = self._GetCandidatesFromSubclass( request_data )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/completers/completer.py", line 231, in _GetCandidatesFromSubclass
    raw_completions = self.ComputeCandidatesInner( request_data )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/completers/rust/rust_completer.py", line 264, in ComputeCandidatesInner
    completions = self._FetchCompletions( request_data )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/completers/rust/rust_completer.py", line 282, in _FetchCompletions
    return self._GetResponse( '/list_completions', request_data )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/completers/rust/rust_completer.py", line 198, in _GetResponse
    response.raise_for_status()
  File "/home/noxdafox/development/ycmd/third_party/requests/requests/models.py", line 840, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://127.0.0.1:35895/list_completions

Is there a way I can get the racerd logs? That would help clarifying the issue.

@noxdafox
Copy link
Author

Found an issue which could be related: abingham/emacs-ycmd#354

@micbou
Copy link
Collaborator

micbou commented Sep 30, 2017

Run the ycmd-show-debug-info command while editing a Rust file. You'll find the paths to the racerd logfiles on the line:

(completer (servers ((logfiles

By the way, could you paste the full output of the command here?

@noxdafox
Copy link
Author

That's a good tip thanks! Did not expect logs to end up in /tmp

Racerd output:

Ycmd debug information for buffer ast.rs in rust-mode:


((python (version . "3.5.3") (executable . "/usr/bin/python3"))
 (completer (items ((value . "/home/noxdafox/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src")
                    (key . "Rust sources")))
            (name . "Rust")
            (servers ((address . "127.0.0.1")
                      (pid . 9966)
                      (logfiles "/tmp/racerd_35895_stdout_ex_wnbl0.log"
                                "/tmp/racerd_35895_stderr_hhmzo84l.log")
                      (is_running . t)
                      (extras)
                      (port . 35895)
                      (name . "Racerd")
                      (executable . "/home/noxdafox/development/ycmd/third_party/racerd/target/release/racerd"))))
 (extra_conf (is_loaded . t)
             (path . "/home/noxdafox/.emacs.d/ycmd_global_config.py"))
 (clang (has_support . t)
        (version . "clang version 3.8.1-24 (tags/RELEASE_381/final)")))


Server is running at: 127.0.0.1:40883

Ycmd Mode is enabled

--------------------

Ycmd version:   1.3snapshot (package: 20170926.2252)
Emacs version:  25.2.2
System:         x86_64-pc-linux-gnu
Window system:  x

Logs are full of these messages:

ERROR:iron::iron: Error handling:
Request {
    url: Url { generic_url: "http://127.0.0.1:35895/list_completions" }
    method: Post
    remote_addr: V4(127.0.0.1:41090)
    local_addr: V4(127.0.0.1:35895)
}
Error was: Error { repr: Custom(Custom { kind: Other, error: NotSupported }) }

@micbou
Copy link
Collaborator

micbou commented Sep 30, 2017

Thanks. I think you are experiencing issue jwilm/racerd#45.

@noxdafox
Copy link
Author

Yes I was suspecting it was related as the issue abingham/emacs-ycmd#354 points towards the same direction. Is there any available workaround?

@micbou
Copy link
Collaborator

micbou commented Sep 30, 2017

You could try to apply the changes in PR jwilm/racerd#63 (only the changes in Cargo.toml and src/http/mod.rs are needed) then recompile racerd with the command:

cargo build --release

@noxdafox
Copy link
Author

noxdafox commented Oct 1, 2017

Applying the changes fixed the issue. Thanks!

I guess it's better to keep the ticket open until the issue is not fixed upstream.

@bstaletic
Copy link
Collaborator

We have migrated to RLS. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants