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

RLS Crashing #381

@xogeny

Description

@xogeny

I'm currently running rustc 1.20.0-nightly (fc9ccfdbe 2017-06-25). I've run all of the following commands:

$ rustup install nightly
$ rustup default nightly
$ rustup component add rls
$ rustup component add rust-analysis
$ rustup component add rust-src

While running the vscode extension by @KalitaAlexey, I see RLS: Analysis Started followed by RLS: Analysis finished followed by RLS: Crashed.

In the output window I see:

thread '<unnamed>' panicked at 'could not run cargo: CargoError(Internal(Msg("failed to stat `/Users/mtiller/Source/my_proj/target/rls/debug/.fingerprint/rust-fmu-6371c09f679c0ce2/dep-bin-rust_fmu-6371c09f679c0ce2`")), State { next_error: Some(Error { repr: Os { code: 2, message: "No such file or directory" } }), backtrace: Some(stack backtrace:
   0:        0x10a26b2ae - backtrace::backtrace::trace::h50dae19105635900
   1:        0x10a26b44c - backtrace::capture::Backtrace::new::h29841072e5e6e49b
   2:        0x10a26a62d - error_chain::make_backtrace::hcffe27b0755719f7
   3:        0x10a1ad49e - cargo::ops::cargo_rustc::fingerprint::Fingerprint::update_local::ha46d83db51567a2d
   4:        0x10a1b5fd0 - _$LT$F$u20$as$u20$cargo..ops..cargo_rustc..job..FnBox$LT$A$C$$u20$R$GT$$GT$::call_box::h08ed6a3606a529e4
   5:        0x10a1b7345 - _$LT$F$u20$as$u20$cargo..ops..cargo_rustc..job..FnBox$LT$A$C$$u20$R$GT$$GT$::call_box::h9475d96ef80031bf
   6:        0x10a1c3c6e - cargo::ops::cargo_rustc::job_queue::JobQueue::run::_$u7b$$u7b$closure$u7d$$u7d$::h2d10942c5424dabd
   7:        0x10a089673 - _$LT$F$u20$as$u20$crossbeam..FnBox$GT$::call_box::hac838a5c59ecefc8
   8:        0x10a08bd9f - std::panicking::try::do_call::h683e73cdf03313f2
   9:        0x1102d5b5c - __rust_maybe_catch_panic
  10:        0x10a0cda8f - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h48add3badff46f6a
  11:        0x1102cf6fb - std::sys::imp::thread::Thread::new::thread_start::he5c82b73fbbeead1
  12:     0x7fffa7cfc93a - _pthread_body
  13:     0x7fffa7cfc886 - _pthread_start) })', src/libcore/result.rs:860
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: std::panicking::begin_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::result::unwrap_failed
Missing change, aborting. Found 2, expected Some(4)
[Error - 3:26:24 PM] Connection to server got closed. Server will not be restarted.

I've tried removing my target directory completely and rerunning vscode. I still get the same error. BTW, the error message is correct, the file /Users/mtiller/Source/my_proj/target/rls/debug/.fingerprint/rust-fmu-6371c09f679c0ce2/dep-bin-rust_fmu-6371c09f679c0ce2 does not exist. That seems to bring everything crashing down.

Frankly, given all the unique semantics of Rust, I find it nearly impossible to work with it without good IDE support. I simply don't (yet) use it regularly enough to keep all this stuff in my head. This is basically stopping me dead in my tracks. 😢

Any ideas?

Activity

sophiajt

sophiajt commented on Jun 26, 2017

@sophiajt

The version in rustup right now is currently broken, waiting on the fix mentioned in #378 to land and make its way to rustup

sophiajt

sophiajt commented on Jun 26, 2017

@sophiajt

According to @nrc, if you build the rls from source, you can avoid waiting until rustup gets the new version

xogeny

xogeny commented on Jun 26, 2017

@xogeny
Author

According to #378, the fix was put in master 2 days ago. So shouldn't the nightly already have it?

sophiajt

sophiajt commented on Jun 26, 2017

@sophiajt

There's the manual step of syncing the repo rustup uses with the rls repo. I'm not sure if that step has happened yet (unfortunately both @nrc and myself just traveled half way across the world in the last day). Hopefully it'll go in soon.

xogeny

xogeny commented on Jun 26, 2017

@xogeny
Author

Is there a simple way to downgrade vs. build from source. I don't need bleeding edge. It is just that rls isn't in stable. Do we know at what point the nightly broke?

sophiajt

sophiajt commented on Jun 26, 2017

@sophiajt

Here's the PR: rust-lang/rust#42911

Yes, you should be able to use the rls from a few days ago. Rustup can install other nightly versions. Eg. Instead of nightly install nightly-2017-06-23 or an earlier date (I can't remember the exact date it broke)

sophiajt

sophiajt commented on Jun 26, 2017

@sophiajt

(You may also need to tweak the vscode plugin, I don't remember)

Xanewok

Xanewok commented on Jun 26, 2017

@Xanewok
Member

Change queue sometimes causing the Missing change, aborting. was commited 8 days ago (577ba2c), so anything before that might be a safe bet (I'm not sure which version of RLS rustup includes before that, though), but since it's alpha it may come with different problems of its own (like #330) 😛

nrc

nrc commented on Jun 27, 2017

@nrc
Member

As others have said, this is fixed on master and landing in nightly 'soon' (rust-lang/rust#42911)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sophiajt@nrc@xogeny@Xanewok

        Issue actions

          RLS Crashing · Issue #381 · rust-lang/rls