Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Handle PoisonError when locking mutex #9

Closed
jwilm opened this issue Dec 22, 2015 · 1 comment
Closed

Handle PoisonError when locking mutex #9

jwilm opened this issue Dec 22, 2015 · 1 comment

Comments

@jwilm
Copy link
Owner

jwilm commented Dec 22, 2015

In the case that a racer call panics, the racerd::engine::Racer mutex becomes poisoned. The mutex protects a data structure which shouldn't panic during mutation, and it should be safe to just handle the poison error.

The server presently just returns 500 Errors after the mutex has been poisoned. We need to either handle this error (which should be safe) or abort the process.

@jwilm
Copy link
Owner Author

jwilm commented Dec 22, 2015

Resolved in 414482a

@jwilm jwilm closed this as completed Dec 23, 2015
homu added a commit to ycm-core/ycmd that referenced this issue Jan 7, 2016
[READY] Add support for the Rust programming language

[racerd][] and the ycmd completer wrapper for racerd are finally ready for some peer review and testing. There are some blocking issues that need to get resolved before we can launch; these are enumerated later.

### Demonstration

This gif shows semantic completion support (module paths and object members) and GoTo jumping (starting with BinaryHeap and further into the standard library). GoTo, GoToDefinition, and GoToDeclaration are all equivalent at this time.

![racerd_ycm](https://cloud.githubusercontent.com/assets/4285147/11676180/e924255e-9de4-11e5-9b32-5eda431f79a3.gif)

### Building ycmd with rust support

1. Install [multirust][] if you don't already have it.
2. Add this branch to your local ycmd installation. For example,

    ```
    cd $YCMD_PATH
    git remote add jwilm https://github.com/jwilm/ycmd.git
    git fetch jwilm
    git checkout rust-support
    ```

3. Run the ycmd build.py script with an additional argument. If you only care about rust support, the build command might look like this.

    ```
    ./build.py --racerd-completer
    ```

### Outstanding Issues

- [x] Racerd `::racer::core::Session` usage leaks memory. Need to patch racer + racerd to support a mutable, long-lived file cache. Until then, the FileCache's Arena grows indefinitely (can be witnessed by watching racerd's memory usage).
- [x] Add tests for the rust completer in ycmd
- [x] racerd HMAC support
- [x] RustCompleter utilizes racerd hmac
- [x] Support specifying rust source path as a ycm option (eg. via .vimrc for vim)
- [x] Remove `multirust` dependency from _build.py_
- [x] Tests pass on appveyor
- [x] Add user option for overriding `racerd` path
- [x] Add logging for racerd output
- [x] Add synchronization for `self._racerd_phandle` (and friends) in RustCompleter
- [x] Update racerd to handle `PoisonError` (jwilm/racerd#9)
- [x] Eliminate OpenSSL dependencies (windows support)
- [x] Rebase and include latest racerd

[racerd]: https://github.com/jwilm/racerd
[multirust]: https://github.com/brson/multirust

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/268)
<!-- Reviewable:end -->
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant